class Ingenico::Connect::SDK::Webhooks::WebhooksEvent
@attr [String] api_version
@attr [String] id @attr [String] created @attr [String] merchant_id
@attr [String] type @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentResponse] payment @attr [Ingenico::Connect::SDK::Domain::Payout::PayoutResponse] refund @attr [Ingenico::Connect::SDK::Domain::Refund::RefundResponse] payout @attr [Ingenico::Connect::SDK::Domain::Token::TokenResponse] token @attr [Ingenico::Connect::SDK::Domain::Dispute::DisputeResponse] dispute
Attributes
api_version[RW]
created[RW]
dispute[RW]
id[RW]
merchant_id[RW]
payment[RW]
payout[RW]
refund[RW]
token[RW]
type[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# 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()
click to toggle source
@return [Hash]
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# 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