Class: WebPay::CustomerResponseList
- Inherits:
-
Entity
- Object
- Entity
- WebPay::CustomerResponseList
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 CustomerResponseList.
1222
1223
1224
1225
1226
|
# File 'lib/webpay/data_types.rb', line 1222
def initialize(hash = {})
hash = normalize_hash(hash)
hash['data'] = hash['data'].is_a?(Array) ? hash['data'].map { |x| WebPay::CustomerResponse.new(x) if x.is_a?(Hash) } : hash['data']
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1215
1216
1217
|
# File 'lib/webpay/data_types.rb', line 1215
def attributes
@attributes
end
|
Class Method Details
.fields ⇒ Object
1217
1218
1219
|
# File 'lib/webpay/data_types.rb', line 1217
def self.fields
['object', 'url', 'count', 'data']
end
|
Instance Method Details
#count ⇒ Object
1239
1240
1241
|
# File 'lib/webpay/data_types.rb', line 1239
def count
attributes['count']
end
|
#data ⇒ Object
1243
1244
1245
|
# File 'lib/webpay/data_types.rb', line 1243
def data
attributes['data']
end
|
#object ⇒ Object
1231
1232
1233
|
# File 'lib/webpay/data_types.rb', line 1231
def object
attributes['object']
end
|
#url ⇒ Object
1235
1236
1237
|
# File 'lib/webpay/data_types.rb', line 1235
def url
attributes['url']
end
|