Class: WebPay::ChargeResponseList
- Inherits:
-
Entity
- Object
- Entity
- WebPay::ChargeResponseList
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 ChargeResponseList.
794
795
796
797
798
|
# File 'lib/webpay/data_types.rb', line 794
def initialize(hash = {})
hash = normalize_hash(hash)
hash['data'] = hash['data'].is_a?(Array) ? hash['data'].map { |x| WebPay::ChargeResponse.new(x) if x.is_a?(Hash) } : hash['data']
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
787
788
789
|
# File 'lib/webpay/data_types.rb', line 787
def attributes
@attributes
end
|
Class Method Details
.fields ⇒ Object
789
790
791
|
# File 'lib/webpay/data_types.rb', line 789
def self.fields
['object', 'url', 'count', 'data']
end
|
Instance Method Details
#count ⇒ Object
811
812
813
|
# File 'lib/webpay/data_types.rb', line 811
def count
attributes['count']
end
|
#data ⇒ Object
815
816
817
|
# File 'lib/webpay/data_types.rb', line 815
def data
attributes['data']
end
|
#object ⇒ Object
803
804
805
|
# File 'lib/webpay/data_types.rb', line 803
def object
attributes['object']
end
|
#url ⇒ Object
807
808
809
|
# File 'lib/webpay/data_types.rb', line 807
def url
attributes['url']
end
|