Class: Ingenico::Connect::SDK::Webhooks::WebhooksEvent
- Inherits:
-
DataObject
- Object
- DataObject
- Ingenico::Connect::SDK::Webhooks::WebhooksEvent
- Defined in:
- lib/ingenico/connect/sdk/webhooks/webhooks_event.rb
Instance Attribute Summary collapse
-
#api_version ⇒ String
The current value of api_version.
-
#created ⇒ String
The current value of created.
-
#dispute ⇒ Ingenico::Connect::SDK::Domain::Dispute::DisputeResponse
The current value of dispute.
-
#id ⇒ String
The current value of id.
-
#merchant_id ⇒ String
The current value of merchant_id.
-
#payment ⇒ Ingenico::Connect::SDK::Domain::Payment::PaymentResponse
The current value of payment.
-
#payout ⇒ Ingenico::Connect::SDK::Domain::Refund::RefundResponse
The current value of payout.
-
#refund ⇒ Ingenico::Connect::SDK::Domain::Payout::PayoutResponse
The current value of refund.
-
#token ⇒ Ingenico::Connect::SDK::Domain::Token::TokenResponse
The current value of token.
-
#type ⇒ String
The current value of type.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#api_version ⇒ String
Returns the current value of api_version.
14 15 16 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 14 def api_version @api_version end |
#created ⇒ String
Returns the current value of created.
14 15 16 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 14 def created @created end |
#dispute ⇒ Ingenico::Connect::SDK::Domain::Dispute::DisputeResponse
Returns the current value of dispute.
14 15 16 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 14 def dispute @dispute end |
#id ⇒ String
Returns the current value of id.
14 15 16 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 14 def id @id end |
#merchant_id ⇒ String
Returns the current value of merchant_id.
14 15 16 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 14 def merchant_id @merchant_id end |
#payment ⇒ Ingenico::Connect::SDK::Domain::Payment::PaymentResponse
Returns the current value of payment.
14 15 16 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 14 def payment @payment end |
#payout ⇒ Ingenico::Connect::SDK::Domain::Refund::RefundResponse
Returns the current value of payout.
14 15 16 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 14 def payout @payout end |
#refund ⇒ Ingenico::Connect::SDK::Domain::Payout::PayoutResponse
Returns the current value of refund.
14 15 16 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 14 def refund @refund end |
#token ⇒ Ingenico::Connect::SDK::Domain::Token::TokenResponse
Returns the current value of token.
14 15 16 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 14 def token @token end |
#type ⇒ String
Returns the current value of type.
14 15 16 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 14 def type @type end |
Instance Method Details
#from_hash(hash) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 44 def from_hash(hash) super @api_version = hash['apiVersion'] if hash.has_key? 'apiVersion' @id = hash['id'] if hash.has_key? 'id' @created = hash['created'] if hash.has_key? 'created' @merchant_id = hash['merchantId'] if hash.has_key? 'merchantId' @type = hash['type'] if hash.has_key? 'type' @payment = Ingenico::Connect::SDK::Domain::Payment::PaymentResponse.new_from_hash(hash['payment']) if hash.has_key? 'payment' @refund = Ingenico::Connect::SDK::Domain::Refund::RefundResponse.new_from_hash(hash['refund']) if hash.has_key? 'refund' @payout = Ingenico::Connect::SDK::Domain::Payout::PayoutResponse.new_from_hash(hash['payout']) if hash.has_key? 'payout' @token = Ingenico::Connect::SDK::Domain::Token::TokenResponse.new_from_hash(hash['token']) if hash.has_key? 'token' @dispute = Ingenico::Connect::SDK::Domain::Dispute::DisputeResponse.new_from_hash(hash['dispute']) if hash.has_key? 'dispute' end |
#to_h ⇒ Hash
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ingenico/connect/sdk/webhooks/webhooks_event.rb', line 29 def to_h hash = super hash['apiVersion'] = @api_version unless @api_version.nil? hash['id'] = @id unless @id.nil? hash['created'] = @created unless @created.nil? hash['merchantId'] = @merchant_id unless @merchant_id.nil? hash['type'] = @type unless @type.nil? hash['payment'] = @payment.to_h unless @payment.nil? hash['refund'] = @refund.to_h unless @refund.nil? hash['payout'] = @payout.to_h unless @payout.nil? hash['token'] = @token.to_h unless @token.nil? hash['dispute'] = @dispute.to_h unless @dispute.nil? hash end |