Class: Worldline::Connect::SDK::V1::Domain::CaptureOutput
- Inherits:
-
OrderOutput
show all
- Defined in:
- lib/worldline/connect/sdk/v1/domain/capture_output.rb
Instance Attribute Summary collapse
Attributes inherited from OrderOutput
#amount_of_money, #references
Instance Method Summary
collapse
new_from_hash
Instance Attribute Details
#amount_paid ⇒ Integer
26
27
28
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 26
def amount_paid
@amount_paid
end
|
#amount_reversed ⇒ Integer
26
27
28
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 26
def amount_reversed
@amount_reversed
end
|
26
27
28
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 26
def bank_transfer_payment_method_specific_output
@bank_transfer_payment_method_specific_output
end
|
26
27
28
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 26
def card_payment_method_specific_output
@card_payment_method_specific_output
end
|
26
27
28
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 26
def cash_payment_method_specific_output
@cash_payment_method_specific_output
end
|
#payment_method ⇒ String
26
27
28
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 26
def payment_method
@payment_method
end
|
26
27
28
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 26
def redirect_payment_method_specific_output
@redirect_payment_method_specific_output
end
|
#reversal_reason ⇒ String
26
27
28
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 26
def reversal_reason
@reversal_reason
end
|
26
27
28
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 26
def sepa_direct_debit_payment_method_specific_output
@sepa_direct_debit_payment_method_specific_output
end
|
Instance Method Details
#from_hash(hash) ⇒ Object
61
62
63
64
65
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
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 61
def from_hash(hash)
super
if hash.has_key? 'amountPaid'
@amount_paid = hash['amountPaid']
end
if hash.has_key? 'amountReversed'
@amount_reversed = hash['amountReversed']
end
if hash.has_key? 'bankTransferPaymentMethodSpecificOutput'
raise TypeError, "value '%s' is not a Hash" % [hash['bankTransferPaymentMethodSpecificOutput']] unless hash['bankTransferPaymentMethodSpecificOutput'].is_a? Hash
@bank_transfer_payment_method_specific_output = Worldline::Connect::SDK::V1::Domain::BankTransferPaymentMethodSpecificOutput.new_from_hash(hash['bankTransferPaymentMethodSpecificOutput'])
end
if hash.has_key? 'cardPaymentMethodSpecificOutput'
raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificOutput']] unless hash['cardPaymentMethodSpecificOutput'].is_a? Hash
@card_payment_method_specific_output = Worldline::Connect::SDK::V1::Domain::CardPaymentMethodSpecificOutput.new_from_hash(hash['cardPaymentMethodSpecificOutput'])
end
if hash.has_key? 'cashPaymentMethodSpecificOutput'
raise TypeError, "value '%s' is not a Hash" % [hash['cashPaymentMethodSpecificOutput']] unless hash['cashPaymentMethodSpecificOutput'].is_a? Hash
@cash_payment_method_specific_output = Worldline::Connect::SDK::V1::Domain::CashPaymentMethodSpecificOutput.new_from_hash(hash['cashPaymentMethodSpecificOutput'])
end
if hash.has_key? 'paymentMethod'
@payment_method = hash['paymentMethod']
end
if hash.has_key? 'redirectPaymentMethodSpecificOutput'
raise TypeError, "value '%s' is not a Hash" % [hash['redirectPaymentMethodSpecificOutput']] unless hash['redirectPaymentMethodSpecificOutput'].is_a? Hash
@redirect_payment_method_specific_output = Worldline::Connect::SDK::V1::Domain::RedirectPaymentMethodSpecificOutput.new_from_hash(hash['redirectPaymentMethodSpecificOutput'])
end
if hash.has_key? 'reversalReason'
@reversal_reason = hash['reversalReason']
end
if hash.has_key? 'sepaDirectDebitPaymentMethodSpecificOutput'
raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebitPaymentMethodSpecificOutput']] unless hash['sepaDirectDebitPaymentMethodSpecificOutput'].is_a? Hash
@sepa_direct_debit_payment_method_specific_output = Worldline::Connect::SDK::V1::Domain::SepaDirectDebitPaymentMethodSpecificOutput.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificOutput'])
end
end
|
#to_h ⇒ Hash
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/worldline/connect/sdk/v1/domain/capture_output.rb', line 47
def to_h
hash = super
hash['amountPaid'] = @amount_paid unless @amount_paid.nil?
hash['amountReversed'] = @amount_reversed unless @amount_reversed.nil?
hash['bankTransferPaymentMethodSpecificOutput'] = @bank_transfer_payment_method_specific_output.to_h unless @bank_transfer_payment_method_specific_output.nil?
hash['cardPaymentMethodSpecificOutput'] = @card_payment_method_specific_output.to_h unless @card_payment_method_specific_output.nil?
hash['cashPaymentMethodSpecificOutput'] = @cash_payment_method_specific_output.to_h unless @cash_payment_method_specific_output.nil?
hash['paymentMethod'] = @payment_method unless @payment_method.nil?
hash['redirectPaymentMethodSpecificOutput'] = @redirect_payment_method_specific_output.to_h unless @redirect_payment_method_specific_output.nil?
hash['reversalReason'] = @reversal_reason unless @reversal_reason.nil?
hash['sepaDirectDebitPaymentMethodSpecificOutput'] = @sepa_direct_debit_payment_method_specific_output.to_h unless @sepa_direct_debit_payment_method_specific_output.nil?
hash
end
|