Class: Worldline::Connect::SDK::V1::Domain::CreatePaymentRequest

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/create_payment_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#bank_transfer_payment_method_specific_inputWorldline::Connect::SDK::V1::Domain::BankTransferPaymentMethodSpecificInput

Returns the current value of bank_transfer_payment_method_specific_input.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def bank_transfer_payment_method_specific_input
  @bank_transfer_payment_method_specific_input
end

#card_payment_method_specific_inputWorldline::Connect::SDK::V1::Domain::CardPaymentMethodSpecificInput

Returns the current value of card_payment_method_specific_input.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def card_payment_method_specific_input
  @card_payment_method_specific_input
end

#cash_payment_method_specific_inputWorldline::Connect::SDK::V1::Domain::CashPaymentMethodSpecificInput

Returns the current value of cash_payment_method_specific_input.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def cash_payment_method_specific_input
  @cash_payment_method_specific_input
end

#direct_debit_payment_method_specific_inputWorldline::Connect::SDK::V1::Domain::NonSepaDirectDebitPaymentMethodSpecificInput

Returns the current value of direct_debit_payment_method_specific_input.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def direct_debit_payment_method_specific_input
  @direct_debit_payment_method_specific_input
end

#e_invoice_payment_method_specific_inputWorldline::Connect::SDK::V1::Domain::EInvoicePaymentMethodSpecificInput

Returns the current value of e_invoice_payment_method_specific_input.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def e_invoice_payment_method_specific_input
  @e_invoice_payment_method_specific_input
end

#encrypted_customer_inputString

Returns the current value of encrypted_customer_input.

Returns:

  • (String)

    the current value of encrypted_customer_input



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def encrypted_customer_input
  @encrypted_customer_input
end

#fraud_fieldsWorldline::Connect::SDK::V1::Domain::FraudFields

Returns the current value of fraud_fields.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def fraud_fields
  @fraud_fields
end

#invoice_payment_method_specific_inputWorldline::Connect::SDK::V1::Domain::InvoicePaymentMethodSpecificInput

Returns the current value of invoice_payment_method_specific_input.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def invoice_payment_method_specific_input
  @invoice_payment_method_specific_input
end

#merchantWorldline::Connect::SDK::V1::Domain::Merchant

Returns the current value of merchant.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def merchant
  @merchant
end

#mobile_payment_method_specific_inputWorldline::Connect::SDK::V1::Domain::MobilePaymentMethodSpecificInput

Returns the current value of mobile_payment_method_specific_input.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def mobile_payment_method_specific_input
  @mobile_payment_method_specific_input
end

#orderWorldline::Connect::SDK::V1::Domain::Order

Returns the current value of order.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def order
  @order
end

#redirect_payment_method_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentMethodSpecificInput

Returns the current value of redirect_payment_method_specific_input.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def redirect_payment_method_specific_input
  @redirect_payment_method_specific_input
end

#sepa_direct_debit_payment_method_specific_inputWorldline::Connect::SDK::V1::Domain::SepaDirectDebitPaymentMethodSpecificInput

Returns the current value of sepa_direct_debit_payment_method_specific_input.

Returns:



37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 37

def sepa_direct_debit_payment_method_specific_input
  @sepa_direct_debit_payment_method_specific_input
end

Instance Method Details

#from_hash(hash) ⇒ Object



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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 84

def from_hash(hash)
  super
  if hash.has_key? 'bankTransferPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['bankTransferPaymentMethodSpecificInput']] unless hash['bankTransferPaymentMethodSpecificInput'].is_a? Hash
    @bank_transfer_payment_method_specific_input = Worldline::Connect::SDK::V1::Domain::BankTransferPaymentMethodSpecificInput.new_from_hash(hash['bankTransferPaymentMethodSpecificInput'])
  end
  if hash.has_key? 'cardPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] unless hash['cardPaymentMethodSpecificInput'].is_a? Hash
    @card_payment_method_specific_input = Worldline::Connect::SDK::V1::Domain::CardPaymentMethodSpecificInput.new_from_hash(hash['cardPaymentMethodSpecificInput'])
  end
  if hash.has_key? 'cashPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['cashPaymentMethodSpecificInput']] unless hash['cashPaymentMethodSpecificInput'].is_a? Hash
    @cash_payment_method_specific_input = Worldline::Connect::SDK::V1::Domain::CashPaymentMethodSpecificInput.new_from_hash(hash['cashPaymentMethodSpecificInput'])
  end
  if hash.has_key? 'directDebitPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['directDebitPaymentMethodSpecificInput']] unless hash['directDebitPaymentMethodSpecificInput'].is_a? Hash
    @direct_debit_payment_method_specific_input = Worldline::Connect::SDK::V1::Domain::NonSepaDirectDebitPaymentMethodSpecificInput.new_from_hash(hash['directDebitPaymentMethodSpecificInput'])
  end
  if hash.has_key? 'eInvoicePaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['eInvoicePaymentMethodSpecificInput']] unless hash['eInvoicePaymentMethodSpecificInput'].is_a? Hash
    @e_invoice_payment_method_specific_input = Worldline::Connect::SDK::V1::Domain::EInvoicePaymentMethodSpecificInput.new_from_hash(hash['eInvoicePaymentMethodSpecificInput'])
  end
  if hash.has_key? 'encryptedCustomerInput'
    @encrypted_customer_input = hash['encryptedCustomerInput']
  end
  if hash.has_key? 'fraudFields'
    raise TypeError, "value '%s' is not a Hash" % [hash['fraudFields']] unless hash['fraudFields'].is_a? Hash
    @fraud_fields = Worldline::Connect::SDK::V1::Domain::FraudFields.new_from_hash(hash['fraudFields'])
  end
  if hash.has_key? 'invoicePaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['invoicePaymentMethodSpecificInput']] unless hash['invoicePaymentMethodSpecificInput'].is_a? Hash
    @invoice_payment_method_specific_input = Worldline::Connect::SDK::V1::Domain::InvoicePaymentMethodSpecificInput.new_from_hash(hash['invoicePaymentMethodSpecificInput'])
  end
  if hash.has_key? 'merchant'
    raise TypeError, "value '%s' is not a Hash" % [hash['merchant']] unless hash['merchant'].is_a? Hash
    @merchant = Worldline::Connect::SDK::V1::Domain::Merchant.new_from_hash(hash['merchant'])
  end
  if hash.has_key? 'mobilePaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificInput']] unless hash['mobilePaymentMethodSpecificInput'].is_a? Hash
    @mobile_payment_method_specific_input = Worldline::Connect::SDK::V1::Domain::MobilePaymentMethodSpecificInput.new_from_hash(hash['mobilePaymentMethodSpecificInput'])
  end
  if hash.has_key? 'order'
    raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash
    @order = Worldline::Connect::SDK::V1::Domain::Order.new_from_hash(hash['order'])
  end
  if hash.has_key? 'redirectPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['redirectPaymentMethodSpecificInput']] unless hash['redirectPaymentMethodSpecificInput'].is_a? Hash
    @redirect_payment_method_specific_input = Worldline::Connect::SDK::V1::Domain::RedirectPaymentMethodSpecificInput.new_from_hash(hash['redirectPaymentMethodSpecificInput'])
  end
  if hash.has_key? 'sepaDirectDebitPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebitPaymentMethodSpecificInput']] unless hash['sepaDirectDebitPaymentMethodSpecificInput'].is_a? Hash
    @sepa_direct_debit_payment_method_specific_input = Worldline::Connect::SDK::V1::Domain::SepaDirectDebitPaymentMethodSpecificInput.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificInput'])
  end
end

#to_hHash

Returns:

  • (Hash)


66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_request.rb', line 66

def to_h
  hash = super
  hash['bankTransferPaymentMethodSpecificInput'] = @bank_transfer_payment_method_specific_input.to_h unless @bank_transfer_payment_method_specific_input.nil?
  hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h unless @card_payment_method_specific_input.nil?
  hash['cashPaymentMethodSpecificInput'] = @cash_payment_method_specific_input.to_h unless @cash_payment_method_specific_input.nil?
  hash['directDebitPaymentMethodSpecificInput'] = @direct_debit_payment_method_specific_input.to_h unless @direct_debit_payment_method_specific_input.nil?
  hash['eInvoicePaymentMethodSpecificInput'] = @e_invoice_payment_method_specific_input.to_h unless @e_invoice_payment_method_specific_input.nil?
  hash['encryptedCustomerInput'] = @encrypted_customer_input unless @encrypted_customer_input.nil?
  hash['fraudFields'] = @fraud_fields.to_h unless @fraud_fields.nil?
  hash['invoicePaymentMethodSpecificInput'] = @invoice_payment_method_specific_input.to_h unless @invoice_payment_method_specific_input.nil?
  hash['merchant'] = @merchant.to_h unless @merchant.nil?
  hash['mobilePaymentMethodSpecificInput'] = @mobile_payment_method_specific_input.to_h unless @mobile_payment_method_specific_input.nil?
  hash['order'] = @order.to_h unless @order.nil?
  hash['redirectPaymentMethodSpecificInput'] = @redirect_payment_method_specific_input.to_h unless @redirect_payment_method_specific_input.nil?
  hash['sepaDirectDebitPaymentMethodSpecificInput'] = @sepa_direct_debit_payment_method_specific_input.to_h unless @sepa_direct_debit_payment_method_specific_input.nil?
  hash
end