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



2262
2263
2264
2265
2266
# File 'lib/webpay/data_types.rb', line 2262

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.



2255
2256
2257
# File 'lib/webpay/data_types.rb', line 2255

def attributes
  @attributes
end

Class Method Details

.fieldsObject



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

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

Instance Method Details

#countObject



2279
2280
2281
# File 'lib/webpay/data_types.rb', line 2279

def count
  attributes['count']
end

#dataObject



2283
2284
2285
# File 'lib/webpay/data_types.rb', line 2283

def data
  attributes['data']
end

#objectObject

attributes accessors



2271
2272
2273
# File 'lib/webpay/data_types.rb', line 2271

def object
  attributes['object']
end

#urlObject



2275
2276
2277
# File 'lib/webpay/data_types.rb', line 2275

def url
  attributes['url']
end