Class: OnlinePayments::SDK::Webhooks::WebhooksEvent
- Inherits:
-
Domain::DataObject
- Object
- Domain::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.
-
#direct_batch ⇒ OnlinePayments::SDK::V2::Domain::GetBatchStatusResponse
The current value of direct_batch.
-
#dispute ⇒ Object
Returns the value of attribute dispute.
-
#id ⇒ String
The current value of id.
-
#merchant_id ⇒ String
The current value of merchant_id.
-
#payment ⇒ OnlinePayments::SDK::V2::Domain::PaymentResponse
The current value of payment.
-
#payment_link ⇒ OnlinePayments::SDK::V2::Domain::PaymentLinkResponse
The current value of payment_link.
-
#payout ⇒ OnlinePayments::SDK::V2::Domain::PayoutResponse
The current value of payout.
-
#refund ⇒ OnlinePayments::SDK::V2::Domain::RefundResponse
The current value of refund.
-
#token ⇒ OnlinePayments::SDK::V2::Domain::TokenResponse
The current value of token.
-
#type ⇒ String
The current value of type.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#api_version ⇒ String
Returns the current value of api_version.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def api_version @api_version end |
#created ⇒ String
Returns the current value of created.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def created @created end |
#direct_batch ⇒ OnlinePayments::SDK::V2::Domain::GetBatchStatusResponse
Returns the current value of direct_batch.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def direct_batch @direct_batch end |
#dispute ⇒ Object
Returns the value of attribute dispute.
29 30 31 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 29 def dispute @dispute end |
#id ⇒ String
Returns the current value of id.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def id @id end |
#merchant_id ⇒ String
Returns the current value of merchant_id.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def merchant_id @merchant_id end |
#payment ⇒ OnlinePayments::SDK::V2::Domain::PaymentResponse
Returns the current value of payment.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def payment @payment end |
#payment_link ⇒ OnlinePayments::SDK::V2::Domain::PaymentLinkResponse
Returns the current value of payment_link.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def payment_link @payment_link end |
#payout ⇒ OnlinePayments::SDK::V2::Domain::PayoutResponse
Returns the current value of payout.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def payout @payout end |
#refund ⇒ OnlinePayments::SDK::V2::Domain::RefundResponse
Returns the current value of refund.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def refund @refund end |
#token ⇒ OnlinePayments::SDK::V2::Domain::TokenResponse
Returns the current value of token.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def token @token end |
#type ⇒ String
Returns the current value of type.
23 24 25 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 23 def type @type end |
Instance Method Details
#from_hash(hash) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 66 def from_hash(hash) super if hash.has_key? 'apiVersion' @api_version = hash['apiVersion'] end if hash.has_key? 'created' @created = hash['created'] end if hash.has_key? 'id' @id = hash['id'] end if hash.has_key? 'merchantId' @merchant_id = hash['merchantId'] end if hash.has_key? 'type' @type = hash['type'] end if hash.has_key? 'directBatch' @direct_batch = OnlinePayments::SDK::Domain::GetBatchStatusResponse.new_from_hash(hash['directBatch']) end if hash.has_key? 'paymentLink' @payment_link = OnlinePayments::SDK::Domain::PaymentLinkResponse.new_from_hash(hash['paymentLink']) end if hash.has_key? 'payment' @payment = OnlinePayments::SDK::Domain::PaymentResponse.new_from_hash(hash['payment']) end if hash.has_key? 'payout' @payout = OnlinePayments::SDK::Domain::PayoutResponse.new_from_hash(hash['payout']) end if hash.has_key? 'refund' @refund = OnlinePayments::SDK::Domain::RefundResponse.new_from_hash(hash['refund']) end if hash.has_key? 'token' @token = OnlinePayments::SDK::Domain::TokenResponse.new_from_hash(hash['token']) end end |
#to_h ⇒ Hash
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/onlinepayments/sdk/webhooks/webhooks_event.rb', line 50 def to_h hash = super hash['apiVersion'] = @api_version unless @api_version.nil? hash['created'] = @created unless @created.nil? hash['id'] = @id unless @id.nil? hash['merchantId'] = @merchant_id unless @merchant_id.nil? hash['type'] = @type unless @type.nil? hash['directBatch'] = @direct_batch.to_h unless @direct_batch.nil? hash['paymentLink'] = @payment_link.to_h unless @payment_link.nil? hash['payment'] = @payment.to_h unless @payment.nil? hash['payout'] = @payout.to_h unless @payout.nil? hash['refund'] = @refund.to_h unless @refund.nil? hash['token'] = @token.to_h unless @token.nil? hash end |