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.



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

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.



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

def attributes
  @attributes
end

Class Method Details

.fieldsObject



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

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

Instance Method Details

#countObject



2298
2299
2300
# File 'lib/webpay/data_types.rb', line 2298

def count
  attributes['count']
end

#dataObject



2302
2303
2304
# File 'lib/webpay/data_types.rb', line 2302

def data
  attributes['data']
end

#objectObject

attributes accessors



2290
2291
2292
# File 'lib/webpay/data_types.rb', line 2290

def object
  attributes['object']
end

#urlObject



2294
2295
2296
# File 'lib/webpay/data_types.rb', line 2294

def url
  attributes['url']
end