Class: KlaviyoAPI::Collections::Profile
- Inherits:
-
ActiveResource::Collection
- Object
- ActiveResource::Collection
- KlaviyoAPI::Collections::Profile
- Defined in:
- lib/klaviyo_api/collections/profile.rb
Instance Attribute Summary collapse
-
#end ⇒ Object
Returns the value of attribute end.
-
#page ⇒ Object
Returns the value of attribute page.
-
#page_size ⇒ Object
Returns the value of attribute page_size.
-
#start ⇒ Object
Returns the value of attribute start.
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(response = {}) ⇒ Profile
constructor
A new instance of Profile.
Constructor Details
#initialize(response = {}) ⇒ Profile
Returns a new instance of Profile.
7 8 9 10 11 12 13 14 15 |
# File 'lib/klaviyo_api/collections/profile.rb', line 7 def initialize(response = {}) @total = response.delete 'total' @page = response.delete 'page' @page_size = response.delete 'page_size' @start = response.delete 'start' @end = response.delete 'end' @elements = response['data'] || [] end |
Instance Attribute Details
#end ⇒ Object
Returns the value of attribute end.
5 6 7 |
# File 'lib/klaviyo_api/collections/profile.rb', line 5 def end @end end |
#page ⇒ Object
Returns the value of attribute page.
5 6 7 |
# File 'lib/klaviyo_api/collections/profile.rb', line 5 def page @page end |
#page_size ⇒ Object
Returns the value of attribute page_size.
5 6 7 |
# File 'lib/klaviyo_api/collections/profile.rb', line 5 def page_size @page_size end |
#start ⇒ Object
Returns the value of attribute start.
5 6 7 |
# File 'lib/klaviyo_api/collections/profile.rb', line 5 def start @start end |
#total ⇒ Object
Returns the value of attribute total.
5 6 7 |
# File 'lib/klaviyo_api/collections/profile.rb', line 5 def total @total end |