Class: Cadenya::Types::ListObjectivesResponse
- Inherits:
-
Object
- Object
- Cadenya::Types::ListObjectivesResponse
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#pagination ⇒ Object
readonly
Returns the value of attribute pagination.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(items: nil, pagination: nil) ⇒ ListObjectivesResponse
constructor
A new instance of ListObjectivesResponse.
- #to_h ⇒ Object
Constructor Details
#initialize(items: nil, pagination: nil) ⇒ ListObjectivesResponse
Returns a new instance of ListObjectivesResponse.
2700 2701 2702 2703 |
# File 'lib/cadenya/types.rb', line 2700 def initialize(items: nil, pagination: nil) @items = items @pagination = pagination end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
2698 2699 2700 |
# File 'lib/cadenya/types.rb', line 2698 def items @items end |
#pagination ⇒ Object (readonly)
Returns the value of attribute pagination.
2698 2699 2700 |
# File 'lib/cadenya/types.rb', line 2698 def pagination @pagination end |
Class Method Details
.from_json(data) ⇒ Object
2705 2706 2707 2708 2709 2710 |
# File 'lib/cadenya/types.rb', line 2705 def self.from_json(data) new( items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::Objective.from_json(item) }, pagination: data["pagination"].nil? ? nil : Types::Page.from_json(data["pagination"]), ) end |