Class: KillBillClient::Model::Resources
- Inherits:
-
Array
- Object
- Array
- KillBillClient::Model::Resources
- Defined in:
- lib/killbill_client/models/resources.rb
Instance Attribute Summary collapse
-
#clazz ⇒ Object
readonly
Returns the value of attribute clazz.
-
#etag ⇒ Object
readonly
Returns the value of attribute etag.
-
#pagination_max_nb_records ⇒ Object
readonly
Returns the value of attribute pagination_max_nb_records.
-
#pagination_next_page ⇒ Object
readonly
Returns the value of attribute pagination_next_page.
-
#pagination_total_nb_records ⇒ Object
readonly
Returns the value of attribute pagination_total_nb_records.
-
#session_id ⇒ Object
readonly
Returns the value of attribute session_id.
Instance Method Summary collapse
-
#each_in_batches(&block) ⇒ Object
Same as .each, but fetch remaining pages as we go.
Instance Attribute Details
#clazz ⇒ Object (readonly)
Returns the value of attribute clazz.
5 6 7 |
# File 'lib/killbill_client/models/resources.rb', line 5 def clazz @clazz end |
#etag ⇒ Object (readonly)
Returns the value of attribute etag.
5 6 7 |
# File 'lib/killbill_client/models/resources.rb', line 5 def etag @etag end |
#pagination_max_nb_records ⇒ Object (readonly)
Returns the value of attribute pagination_max_nb_records.
5 6 7 |
# File 'lib/killbill_client/models/resources.rb', line 5 def pagination_max_nb_records @pagination_max_nb_records end |
#pagination_next_page ⇒ Object (readonly)
Returns the value of attribute pagination_next_page.
5 6 7 |
# File 'lib/killbill_client/models/resources.rb', line 5 def pagination_next_page @pagination_next_page end |
#pagination_total_nb_records ⇒ Object (readonly)
Returns the value of attribute pagination_total_nb_records.
5 6 7 |
# File 'lib/killbill_client/models/resources.rb', line 5 def pagination_total_nb_records @pagination_total_nb_records end |
#session_id ⇒ Object (readonly)
Returns the value of attribute session_id.
5 6 7 |
# File 'lib/killbill_client/models/resources.rb', line 5 def session_id @session_id end |
Instance Method Details
#each_in_batches(&block) ⇒ Object
Same as .each, but fetch remaining pages as we go
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/killbill_client/models/resources.rb', line 14 def each_in_batches(&block) each(&block) # Non-pagination usecase or last page reached return if @pagination_next_page.nil? # Query the server for the next page resources = Resource.get(@pagination_next_page, {}, {}, @clazz) resources.each_in_batches(&block) end |