Class: WebPay::ShopResponseList
- Inherits:
-
Entity
- Object
- Entity
- WebPay::ShopResponseList
show all
- Defined in:
- lib/webpay/data_types.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Entity
#normalize_hash, #to_h, #to_s
Constructor Details
Returns a new instance of ShopResponseList.
1858
1859
1860
1861
1862
|
# File 'lib/webpay/data_types.rb', line 1858
def initialize(hash = {})
hash = normalize_hash(hash)
hash['data'] = hash['data'].is_a?(Array) ? hash['data'].map { |x| WebPay::ShopResponse.new(x) if x.is_a?(Hash) } : hash['data']
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1851
1852
1853
|
# File 'lib/webpay/data_types.rb', line 1851
def attributes
@attributes
end
|
Class Method Details
.fields ⇒ Object
1853
1854
1855
|
# File 'lib/webpay/data_types.rb', line 1853
def self.fields
['object', 'url', 'count', 'data']
end
|
Instance Method Details
#count ⇒ Object
1875
1876
1877
|
# File 'lib/webpay/data_types.rb', line 1875
def count
attributes['count']
end
|
#data ⇒ Object
1879
1880
1881
|
# File 'lib/webpay/data_types.rb', line 1879
def data
attributes['data']
end
|
#object ⇒ Object
1867
1868
1869
|
# File 'lib/webpay/data_types.rb', line 1867
def object
attributes['object']
end
|
#url ⇒ Object
1871
1872
1873
|
# File 'lib/webpay/data_types.rb', line 1871
def url
attributes['url']
end
|