Class: WebPay::EventData
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ EventData
constructor
A new instance of EventData.
-
#object ⇒ Object
attributes accessors.
- #previous_attributes ⇒ Object
Methods inherited from Entity
Constructor Details
#initialize(hash = {}) ⇒ EventData
Returns a new instance of EventData.
1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 |
# File 'lib/webpay/data_types.rb', line 1376 def initialize(hash = {}) hash = normalize_hash(hash) hash['object'] = case hash['object'].is_a?(Hash) && hash['object']['object'] when 'charge'; WebPay::ChargeResponse.new(hash['object']) when 'customer'; WebPay::CustomerResponse.new(hash['object']) when 'shop'; WebPay::ShopResponse.new(hash['object']) when 'recursion'; WebPay::RecursionResponse.new(hash['object']) when 'account'; WebPay::AccountResponse.new(hash['object']) else; hash['object'] end @attributes = hash end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
1369 1370 1371 |
# File 'lib/webpay/data_types.rb', line 1369 def attributes @attributes end |
Class Method Details
.fields ⇒ Object
1371 1372 1373 |
# File 'lib/webpay/data_types.rb', line 1371 def self.fields ['object', 'previous_attributes'] end |
Instance Method Details
#object ⇒ Object
attributes accessors
1393 1394 1395 |
# File 'lib/webpay/data_types.rb', line 1393 def object attributes['object'] end |
#previous_attributes ⇒ Object
1397 1398 1399 |
# File 'lib/webpay/data_types.rb', line 1397 def previous_attributes attributes['previous_attributes'] end |