Class: WebPay::RecursionResponseList

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 = {}) ⇒ RecursionResponseList

Returns a new instance of RecursionResponseList.



2197
2198
2199
2200
2201
# File 'lib/webpay/data_types.rb', line 2197

def initialize(hash = {})
  hash = normalize_hash(hash)
  hash['data'] = hash['data'].is_a?(Array) ? hash['data'].map { |x| WebPay::RecursionResponse.new(x) if x.is_a?(Hash) }  : hash['data']
  @attributes = hash
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



2190
2191
2192
# File 'lib/webpay/data_types.rb', line 2190

def attributes
  @attributes
end

Class Method Details

.fieldsObject



2192
2193
2194
# File 'lib/webpay/data_types.rb', line 2192

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

Instance Method Details

#countObject



2214
2215
2216
# File 'lib/webpay/data_types.rb', line 2214

def count
  attributes['count']
end

#dataObject



2218
2219
2220
# File 'lib/webpay/data_types.rb', line 2218

def data
  attributes['data']
end

#objectObject

attributes accessors



2206
2207
2208
# File 'lib/webpay/data_types.rb', line 2206

def object
  attributes['object']
end

#urlObject



2210
2211
2212
# File 'lib/webpay/data_types.rb', line 2210

def url
  attributes['url']
end