Class: Worldline::Connect::SDK::V1::Domain::WebhooksEvent
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::WebhooksEvent
- Defined in:
- lib/worldline/connect/sdk/v1/domain/webhooks_event.rb
Instance Attribute Summary collapse
-
#api_version ⇒ String
The current value of api_version.
-
#capture ⇒ Worldline::Connect::SDK::V1::Domain::CaptureResponse
The current value of capture.
-
#created ⇒ String
The current value of created.
-
#dispute ⇒ Worldline::Connect::SDK::V1::Domain::DisputeResponse
The current value of dispute.
-
#id ⇒ String
The current value of id.
-
#merchant_id ⇒ String
The current value of merchant_id.
-
#payment ⇒ Worldline::Connect::SDK::V1::Domain::PaymentResponse
The current value of payment.
-
#payout ⇒ Worldline::Connect::SDK::V1::Domain::PayoutResponse
The current value of payout.
-
#refund ⇒ Worldline::Connect::SDK::V1::Domain::RefundResponse
The current value of refund.
-
#token ⇒ Worldline::Connect::SDK::V1::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.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def api_version @api_version end |
#capture ⇒ Worldline::Connect::SDK::V1::Domain::CaptureResponse
Returns the current value of capture.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def capture @capture end |
#created ⇒ String
Returns the current value of created.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def created @created end |
#dispute ⇒ Worldline::Connect::SDK::V1::Domain::DisputeResponse
Returns the current value of dispute.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def dispute @dispute end |
#id ⇒ String
Returns the current value of id.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def id @id end |
#merchant_id ⇒ String
Returns the current value of merchant_id.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def merchant_id @merchant_id end |
#payment ⇒ Worldline::Connect::SDK::V1::Domain::PaymentResponse
Returns the current value of payment.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def payment @payment end |
#payout ⇒ Worldline::Connect::SDK::V1::Domain::PayoutResponse
Returns the current value of payout.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def payout @payout end |
#refund ⇒ Worldline::Connect::SDK::V1::Domain::RefundResponse
Returns the current value of refund.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def refund @refund end |
#token ⇒ Worldline::Connect::SDK::V1::Domain::TokenResponse
Returns the current value of token.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def token @token end |
#type ⇒ String
Returns the current value of type.
29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 29 def type @type end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 70 def from_hash(hash) super if hash.has_key? 'apiVersion' @api_version = hash['apiVersion'] end if hash.has_key? 'capture' raise TypeError, "value '%s' is not a Hash" % [hash['capture']] unless hash['capture'].is_a? Hash @capture = Worldline::Connect::SDK::V1::Domain::CaptureResponse.new_from_hash(hash['capture']) end if hash.has_key? 'created' @created = hash['created'] end if hash.has_key? 'dispute' raise TypeError, "value '%s' is not a Hash" % [hash['dispute']] unless hash['dispute'].is_a? Hash @dispute = Worldline::Connect::SDK::V1::Domain::DisputeResponse.new_from_hash(hash['dispute']) end if hash.has_key? 'id' @id = hash['id'] end if hash.has_key? 'merchantId' @merchant_id = hash['merchantId'] end if hash.has_key? 'payment' raise TypeError, "value '%s' is not a Hash" % [hash['payment']] unless hash['payment'].is_a? Hash @payment = Worldline::Connect::SDK::V1::Domain::PaymentResponse.new_from_hash(hash['payment']) end if hash.has_key? 'payout' raise TypeError, "value '%s' is not a Hash" % [hash['payout']] unless hash['payout'].is_a? Hash @payout = Worldline::Connect::SDK::V1::Domain::PayoutResponse.new_from_hash(hash['payout']) end if hash.has_key? 'refund' raise TypeError, "value '%s' is not a Hash" % [hash['refund']] unless hash['refund'].is_a? Hash @refund = Worldline::Connect::SDK::V1::Domain::RefundResponse.new_from_hash(hash['refund']) end if hash.has_key? 'token' raise TypeError, "value '%s' is not a Hash" % [hash['token']] unless hash['token'].is_a? Hash @token = Worldline::Connect::SDK::V1::Domain::TokenResponse.new_from_hash(hash['token']) end if hash.has_key? 'type' @type = hash['type'] end end |
#to_h ⇒ Hash
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/worldline/connect/sdk/v1/domain/webhooks_event.rb', line 54 def to_h hash = super hash['apiVersion'] = @api_version unless @api_version.nil? hash['capture'] = @capture.to_h unless @capture.nil? hash['created'] = @created unless @created.nil? hash['dispute'] = @dispute.to_h unless @dispute.nil? hash['id'] = @id unless @id.nil? hash['merchantId'] = @merchant_id unless @merchant_id.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['type'] = @type unless @type.nil? hash end |