Class: WebPay::CustomerResponseList

Inherits:
Entity
  • Object
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

#initialize(hash = {}) ⇒ CustomerResponseList

Returns a new instance of CustomerResponseList.



1139
1140
1141
1142
1143
# File 'lib/webpay/data_types.rb', line 1139

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

#attributesObject (readonly)

Returns the value of attribute attributes.



1132
1133
1134
# File 'lib/webpay/data_types.rb', line 1132

def attributes
  @attributes
end

Class Method Details

.fieldsObject



1134
1135
1136
# File 'lib/webpay/data_types.rb', line 1134

def self.fields
  ['object', 'url', 'count', 'data']
end

Instance Method Details

#countObject



1156
1157
1158
# File 'lib/webpay/data_types.rb', line 1156

def count
  attributes['count']
end

#dataObject



1160
1161
1162
# File 'lib/webpay/data_types.rb', line 1160

def data
  attributes['data']
end

#objectObject

attributes accessors



1148
1149
1150
# File 'lib/webpay/data_types.rb', line 1148

def object
  attributes['object']
end

#urlObject



1152
1153
1154
# File 'lib/webpay/data_types.rb', line 1152

def url
  attributes['url']
end