Class: KlaviyoAPI::Collections::Profile

Inherits:
ActiveResource::Collection
  • Object
show all
Defined in:
lib/klaviyo_api/collections/profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#endObject

Returns the value of attribute end.



5
6
7
# File 'lib/klaviyo_api/collections/profile.rb', line 5

def end
  @end
end

#pageObject

Returns the value of attribute page.



5
6
7
# File 'lib/klaviyo_api/collections/profile.rb', line 5

def page
  @page
end

#page_sizeObject

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

#startObject

Returns the value of attribute start.



5
6
7
# File 'lib/klaviyo_api/collections/profile.rb', line 5

def start
  @start
end

#totalObject

Returns the value of attribute total.



5
6
7
# File 'lib/klaviyo_api/collections/profile.rb', line 5

def total
  @total
end