Class: OnlinePayments::SDK::Webhooks::WebhooksEvent
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Webhooks::WebhooksEvent
- Defined in:
- lib/onlinepayments/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 ⇒ OnlinePayments::SDK::Domain::DisputeResponse
The current value of dispute.
-
#id ⇒ String
The current value of id.
-
#merchant_id ⇒ String
The current value of merchant_id.
-
#payment ⇒ OnlinePayments::SDK::Domain::PaymentResponse
The current value of payment.
-
#payout ⇒ OnlinePayments::SDK::Domain::RefundResponse
The current value of payout.
-
#refund ⇒ OnlinePayments::SDK::Domain::PayoutResponse
The current value of refund.
-
#token ⇒ OnlinePayments::SDK::Domain::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/onlinepayments/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/onlinepayments/sdk/webhooks/webhooks_event.rb', line 14 def created @created end |
#dispute ⇒ OnlinePayments::SDK::Domain::DisputeResponse
Returns the current value of dispute.
14 15 16 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 14 def dispute @dispute end |
#id ⇒ String
Returns the current value of id.
14 15 16 |
# File 'lib/onlinepayments/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/onlinepayments/sdk/webhooks/webhooks_event.rb', line 14 def merchant_id @merchant_id end |
#payment ⇒ OnlinePayments::SDK::Domain::PaymentResponse
Returns the current value of payment.
14 15 16 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 14 def payment @payment end |
#payout ⇒ OnlinePayments::SDK::Domain::RefundResponse
Returns the current value of payout.
14 15 16 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 14 def payout @payout end |
#refund ⇒ OnlinePayments::SDK::Domain::PayoutResponse
Returns the current value of refund.
14 15 16 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 14 def refund @refund end |
#token ⇒ OnlinePayments::SDK::Domain::TokenResponse
Returns the current value of token.
14 15 16 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 14 def token @token end |
#type ⇒ String
Returns the current value of type.
14 15 16 |
# File 'lib/onlinepayments/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 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 44 def from_hash(hash) super @api_version = hash['apiVersion'] if hash.key? 'apiVersion' @id = hash['id'] if hash.key? 'id' @created = hash['created'] if hash.key? 'created' @merchant_id = hash['merchantId'] if hash.key? 'merchantId' @type = hash['type'] if hash.key? 'type' @payment = OnlinePayments::SDK::Domain::PaymentResponse.new_from_hash(hash['payment']) if hash.key? 'payment' @refund = OnlinePayments::SDK::Domain::RefundResponse.new_from_hash(hash['refund']) if hash.key? 'refund' @payout = OnlinePayments::SDK::Domain::PayoutResponse.new_from_hash(hash['payout']) if hash.key? 'payout' @token = OnlinePayments::SDK::Domain::TokenResponse.new_from_hash(hash['token']) if hash.key? 'token' end |
#to_h ⇒ Hash
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 29 def to_h hash = super hash['apiVersion'] = @api_version if @api_version hash['id'] = @id if @id hash['created'] = @created if @created hash['merchantId'] = @merchant_id if @merchant_id hash['type'] = @type if @type hash['payment'] = @payment.to_h if @payment hash['refund'] = @refund.to_h if @refund hash['payout'] = @payout.to_h if @payout hash['token'] = @token.to_h if @token hash['dispute'] = @dispute.to_h if @dispute hash end |