Class: WebPay::EventResponseList

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

Returns a new instance of EventResponseList.



1609
1610
1611
1612
1613
# File 'lib/webpay/data_types.rb', line 1609

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

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



1602
1603
1604
# File 'lib/webpay/data_types.rb', line 1602

def attributes
  @attributes
end

Class Method Details

.fieldsObject



1604
1605
1606
# File 'lib/webpay/data_types.rb', line 1604

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

Instance Method Details

#countObject



1626
1627
1628
# File 'lib/webpay/data_types.rb', line 1626

def count
  attributes['count']
end

#dataObject



1630
1631
1632
# File 'lib/webpay/data_types.rb', line 1630

def data
  attributes['data']
end

#objectObject

attributes accessors



1618
1619
1620
# File 'lib/webpay/data_types.rb', line 1618

def object
  attributes['object']
end

#urlObject



1622
1623
1624
# File 'lib/webpay/data_types.rb', line 1622

def url
  attributes['url']
end