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.



2256
2257
2258
2259
2260
# File 'lib/webpay/data_types.rb', line 2256

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.



2249
2250
2251
# File 'lib/webpay/data_types.rb', line 2249

def attributes
  @attributes
end

Class Method Details

.fieldsObject



2251
2252
2253
# File 'lib/webpay/data_types.rb', line 2251

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

Instance Method Details

#countObject



2273
2274
2275
# File 'lib/webpay/data_types.rb', line 2273

def count
  attributes['count']
end

#dataObject



2277
2278
2279
# File 'lib/webpay/data_types.rb', line 2277

def data
  attributes['data']
end

#objectObject

attributes accessors



2265
2266
2267
# File 'lib/webpay/data_types.rb', line 2265

def object
  attributes['object']
end

#urlObject



2269
2270
2271
# File 'lib/webpay/data_types.rb', line 2269

def url
  attributes['url']
end