connect-sdk-ruby 2.42.0 → 2.44.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/connect-sdk-ruby.gemspec +1 -1
- data/examples/merchant/installments/get_installments_info_example.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/frequency.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb +9 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/recurring_payments_data.rb +43 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/trial_information.rb +66 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/trial_period.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/installments/get_installment_request.rb +55 -0
- data/lib/ingenico/connect/sdk/domain/installments/installment_display_hints.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/installments/installment_options.rb +53 -0
- data/lib/ingenico/connect/sdk/domain/installments/installment_options_response.rb +37 -0
- data/lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb +71 -0
- data/lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb +11 -0
- data/lib/ingenico/connect/sdk/domain/payment/afr_name.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/customer.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/payment/installments.rb +8 -0
- data/lib/ingenico/connect/sdk/domain/payment/loan_recipient.rb +11 -0
- data/lib/ingenico/connect/sdk/domain/payment/order_type_information.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/payment/personal_identification.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/payment/personal_information.rb +9 -0
- data/lib/ingenico/connect/sdk/merchant/installments/installments_client.rb +53 -0
- data/lib/ingenico/connect/sdk/merchant/merchant_client.rb +7 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- metadata +15 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a4479204c7df80d10d1e59327b6a423b7e061673795bfb4f372ade976dfdcd3
|
4
|
+
data.tar.gz: 20cc189d6a52dbedad3c285c1c171c8231e45928e2149b3142098eb8b8d4eb25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa36cebfdb4fcf4c0f1566d8bee5d888aaddd58ca59564e5a829371374cbfd6f867f7395911dda4cdc123db22430d28b88361e87cda008360eda59efbe222493
|
7
|
+
data.tar.gz: eefd9c48ca5acad65b5005ada5b85911edd1f6190d66ef596e33343bf1fe22b848f6bd9b92865040e1a2921f7c53a3f6133f6827f191ed542419ae4ea0beaa01
|
data/connect-sdk-ruby.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'connect-sdk-ruby'
|
3
|
-
spec.version = '2.
|
3
|
+
spec.version = '2.44.0'
|
4
4
|
spec.authors = ['Ingenico ePayments']
|
5
5
|
spec.email = ['github@epay.ingenico.com']
|
6
6
|
spec.summary = %q{SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/factory'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
|
7
|
+
require 'ingenico/connect/sdk/domain/installments/get_installment_request'
|
8
|
+
|
9
|
+
Definitions = Ingenico::Connect::SDK::Domain::Definitions
|
10
|
+
Installments = Ingenico::Connect::SDK::Domain::Installments
|
11
|
+
|
12
|
+
def example
|
13
|
+
get_client do |client|
|
14
|
+
amount_of_money = Definitions::AmountOfMoney.new
|
15
|
+
amount_of_money.amount = 123
|
16
|
+
amount_of_money.currency_code = 'EUR'
|
17
|
+
|
18
|
+
body = Installments::GetInstallmentRequest.new
|
19
|
+
body.amount_of_money = amount_of_money
|
20
|
+
body.bin = '123455'
|
21
|
+
body.country_code = 'NL'
|
22
|
+
body.payment_product_id = 123
|
23
|
+
|
24
|
+
response = client.merchant('merchantId').installments.get_installments_info(body)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def get_client
|
29
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
30
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
31
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
32
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
33
|
+
ensure
|
34
|
+
# Free networking resources when done
|
35
|
+
client.close unless client.nil?
|
36
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Hostedcheckout
|
10
|
+
|
11
|
+
# @attr [String] interval
|
12
|
+
# @attr [Integer] interval_frequency
|
13
|
+
class Frequency < Ingenico::Connect::SDK::DataObject
|
14
|
+
|
15
|
+
attr_accessor :interval
|
16
|
+
|
17
|
+
attr_accessor :interval_frequency
|
18
|
+
|
19
|
+
# @return (Hash)
|
20
|
+
def to_h
|
21
|
+
hash = super
|
22
|
+
hash['interval'] = @interval unless @interval.nil?
|
23
|
+
hash['intervalFrequency'] = @interval_frequency unless @interval_frequency.nil?
|
24
|
+
hash
|
25
|
+
end
|
26
|
+
|
27
|
+
def from_hash(hash)
|
28
|
+
super
|
29
|
+
if hash.has_key? 'interval'
|
30
|
+
@interval = hash['interval']
|
31
|
+
end
|
32
|
+
if hash.has_key? 'intervalFrequency'
|
33
|
+
@interval_frequency = hash['intervalFrequency']
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -4,6 +4,7 @@
|
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
6
|
require 'ingenico/connect/sdk/domain/hostedcheckout/payment_product_filters_hosted_checkout'
|
7
|
+
require 'ingenico/connect/sdk/domain/hostedcheckout/recurring_payments_data'
|
7
8
|
|
8
9
|
module Ingenico::Connect::SDK
|
9
10
|
module Domain
|
@@ -12,6 +13,7 @@ module Ingenico::Connect::SDK
|
|
12
13
|
# @attr [true/false] is_recurring
|
13
14
|
# @attr [String] locale
|
14
15
|
# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::PaymentProductFiltersHostedCheckout] payment_product_filters
|
16
|
+
# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::RecurringPaymentsData] recurring_payments_data
|
15
17
|
# @attr [true/false] return_cancel_state
|
16
18
|
# @attr [String] return_url
|
17
19
|
# @attr [true/false] show_result_page
|
@@ -26,6 +28,8 @@ module Ingenico::Connect::SDK
|
|
26
28
|
|
27
29
|
attr_accessor :payment_product_filters
|
28
30
|
|
31
|
+
attr_accessor :recurring_payments_data
|
32
|
+
|
29
33
|
attr_accessor :return_cancel_state
|
30
34
|
|
31
35
|
attr_accessor :return_url
|
@@ -44,6 +48,7 @@ module Ingenico::Connect::SDK
|
|
44
48
|
hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
|
45
49
|
hash['locale'] = @locale unless @locale.nil?
|
46
50
|
hash['paymentProductFilters'] = @payment_product_filters.to_h unless @payment_product_filters.nil?
|
51
|
+
hash['recurringPaymentsData'] = @recurring_payments_data.to_h unless @recurring_payments_data.nil?
|
47
52
|
hash['returnCancelState'] = @return_cancel_state unless @return_cancel_state.nil?
|
48
53
|
hash['returnUrl'] = @return_url unless @return_url.nil?
|
49
54
|
hash['showResultPage'] = @show_result_page unless @show_result_page.nil?
|
@@ -65,6 +70,10 @@ module Ingenico::Connect::SDK
|
|
65
70
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductFilters']] unless hash['paymentProductFilters'].is_a? Hash
|
66
71
|
@payment_product_filters = Ingenico::Connect::SDK::Domain::Hostedcheckout::PaymentProductFiltersHostedCheckout.new_from_hash(hash['paymentProductFilters'])
|
67
72
|
end
|
73
|
+
if hash.has_key? 'recurringPaymentsData'
|
74
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['recurringPaymentsData']] unless hash['recurringPaymentsData'].is_a? Hash
|
75
|
+
@recurring_payments_data = Ingenico::Connect::SDK::Domain::Hostedcheckout::RecurringPaymentsData.new_from_hash(hash['recurringPaymentsData'])
|
76
|
+
end
|
68
77
|
if hash.has_key? 'returnCancelState'
|
69
78
|
@return_cancel_state = hash['returnCancelState']
|
70
79
|
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/hostedcheckout/frequency'
|
7
|
+
require 'ingenico/connect/sdk/domain/hostedcheckout/trial_information'
|
8
|
+
|
9
|
+
module Ingenico::Connect::SDK
|
10
|
+
module Domain
|
11
|
+
module Hostedcheckout
|
12
|
+
|
13
|
+
# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::Frequency] recurring_interval
|
14
|
+
# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::TrialInformation] trial_information
|
15
|
+
class RecurringPaymentsData < Ingenico::Connect::SDK::DataObject
|
16
|
+
|
17
|
+
attr_accessor :recurring_interval
|
18
|
+
|
19
|
+
attr_accessor :trial_information
|
20
|
+
|
21
|
+
# @return (Hash)
|
22
|
+
def to_h
|
23
|
+
hash = super
|
24
|
+
hash['recurringInterval'] = @recurring_interval.to_h unless @recurring_interval.nil?
|
25
|
+
hash['trialInformation'] = @trial_information.to_h unless @trial_information.nil?
|
26
|
+
hash
|
27
|
+
end
|
28
|
+
|
29
|
+
def from_hash(hash)
|
30
|
+
super
|
31
|
+
if hash.has_key? 'recurringInterval'
|
32
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['recurringInterval']] unless hash['recurringInterval'].is_a? Hash
|
33
|
+
@recurring_interval = Ingenico::Connect::SDK::Domain::Hostedcheckout::Frequency.new_from_hash(hash['recurringInterval'])
|
34
|
+
end
|
35
|
+
if hash.has_key? 'trialInformation'
|
36
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['trialInformation']] unless hash['trialInformation'].is_a? Hash
|
37
|
+
@trial_information = Ingenico::Connect::SDK::Domain::Hostedcheckout::TrialInformation.new_from_hash(hash['trialInformation'])
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
|
7
|
+
require 'ingenico/connect/sdk/domain/hostedcheckout/frequency'
|
8
|
+
require 'ingenico/connect/sdk/domain/hostedcheckout/trial_period'
|
9
|
+
|
10
|
+
module Ingenico::Connect::SDK
|
11
|
+
module Domain
|
12
|
+
module Hostedcheckout
|
13
|
+
|
14
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] amount_of_money_after_trial
|
15
|
+
# @attr [String] end_date
|
16
|
+
# @attr [true/false] is_recurring
|
17
|
+
# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::TrialPeriod] trial_period
|
18
|
+
# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::Frequency] trial_period_recurring
|
19
|
+
class TrialInformation < Ingenico::Connect::SDK::DataObject
|
20
|
+
|
21
|
+
attr_accessor :amount_of_money_after_trial
|
22
|
+
|
23
|
+
attr_accessor :end_date
|
24
|
+
|
25
|
+
attr_accessor :is_recurring
|
26
|
+
|
27
|
+
attr_accessor :trial_period
|
28
|
+
|
29
|
+
attr_accessor :trial_period_recurring
|
30
|
+
|
31
|
+
# @return (Hash)
|
32
|
+
def to_h
|
33
|
+
hash = super
|
34
|
+
hash['amountOfMoneyAfterTrial'] = @amount_of_money_after_trial.to_h unless @amount_of_money_after_trial.nil?
|
35
|
+
hash['endDate'] = @end_date unless @end_date.nil?
|
36
|
+
hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
|
37
|
+
hash['trialPeriod'] = @trial_period.to_h unless @trial_period.nil?
|
38
|
+
hash['trialPeriodRecurring'] = @trial_period_recurring.to_h unless @trial_period_recurring.nil?
|
39
|
+
hash
|
40
|
+
end
|
41
|
+
|
42
|
+
def from_hash(hash)
|
43
|
+
super
|
44
|
+
if hash.has_key? 'amountOfMoneyAfterTrial'
|
45
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoneyAfterTrial']] unless hash['amountOfMoneyAfterTrial'].is_a? Hash
|
46
|
+
@amount_of_money_after_trial = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoneyAfterTrial'])
|
47
|
+
end
|
48
|
+
if hash.has_key? 'endDate'
|
49
|
+
@end_date = hash['endDate']
|
50
|
+
end
|
51
|
+
if hash.has_key? 'isRecurring'
|
52
|
+
@is_recurring = hash['isRecurring']
|
53
|
+
end
|
54
|
+
if hash.has_key? 'trialPeriod'
|
55
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['trialPeriod']] unless hash['trialPeriod'].is_a? Hash
|
56
|
+
@trial_period = Ingenico::Connect::SDK::Domain::Hostedcheckout::TrialPeriod.new_from_hash(hash['trialPeriod'])
|
57
|
+
end
|
58
|
+
if hash.has_key? 'trialPeriodRecurring'
|
59
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['trialPeriodRecurring']] unless hash['trialPeriodRecurring'].is_a? Hash
|
60
|
+
@trial_period_recurring = Ingenico::Connect::SDK::Domain::Hostedcheckout::Frequency.new_from_hash(hash['trialPeriodRecurring'])
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Hostedcheckout
|
10
|
+
|
11
|
+
# @attr [Integer] duration
|
12
|
+
# @attr [String] interval
|
13
|
+
class TrialPeriod < Ingenico::Connect::SDK::DataObject
|
14
|
+
|
15
|
+
attr_accessor :duration
|
16
|
+
|
17
|
+
attr_accessor :interval
|
18
|
+
|
19
|
+
# @return (Hash)
|
20
|
+
def to_h
|
21
|
+
hash = super
|
22
|
+
hash['duration'] = @duration unless @duration.nil?
|
23
|
+
hash['interval'] = @interval unless @interval.nil?
|
24
|
+
hash
|
25
|
+
end
|
26
|
+
|
27
|
+
def from_hash(hash)
|
28
|
+
super
|
29
|
+
if hash.has_key? 'duration'
|
30
|
+
@duration = hash['duration']
|
31
|
+
end
|
32
|
+
if hash.has_key? 'interval'
|
33
|
+
@interval = hash['interval']
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Installments
|
11
|
+
|
12
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] amount_of_money
|
13
|
+
# @attr [String] bin
|
14
|
+
# @attr [String] country_code
|
15
|
+
# @attr [Integer] payment_product_id
|
16
|
+
class GetInstallmentRequest < Ingenico::Connect::SDK::DataObject
|
17
|
+
|
18
|
+
attr_accessor :amount_of_money
|
19
|
+
|
20
|
+
attr_accessor :bin
|
21
|
+
|
22
|
+
attr_accessor :country_code
|
23
|
+
|
24
|
+
attr_accessor :payment_product_id
|
25
|
+
|
26
|
+
# @return (Hash)
|
27
|
+
def to_h
|
28
|
+
hash = super
|
29
|
+
hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
|
30
|
+
hash['bin'] = @bin unless @bin.nil?
|
31
|
+
hash['countryCode'] = @country_code unless @country_code.nil?
|
32
|
+
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
33
|
+
hash
|
34
|
+
end
|
35
|
+
|
36
|
+
def from_hash(hash)
|
37
|
+
super
|
38
|
+
if hash.has_key? 'amountOfMoney'
|
39
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
|
40
|
+
@amount_of_money = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
|
41
|
+
end
|
42
|
+
if hash.has_key? 'bin'
|
43
|
+
@bin = hash['bin']
|
44
|
+
end
|
45
|
+
if hash.has_key? 'countryCode'
|
46
|
+
@country_code = hash['countryCode']
|
47
|
+
end
|
48
|
+
if hash.has_key? 'paymentProductId'
|
49
|
+
@payment_product_id = hash['paymentProductId']
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Installments
|
10
|
+
|
11
|
+
# @attr [Integer] display_order
|
12
|
+
# @attr [String] label
|
13
|
+
# @attr [String] logo
|
14
|
+
class InstallmentDisplayHints < Ingenico::Connect::SDK::DataObject
|
15
|
+
|
16
|
+
attr_accessor :display_order
|
17
|
+
|
18
|
+
attr_accessor :label
|
19
|
+
|
20
|
+
attr_accessor :logo
|
21
|
+
|
22
|
+
# @return (Hash)
|
23
|
+
def to_h
|
24
|
+
hash = super
|
25
|
+
hash['displayOrder'] = @display_order unless @display_order.nil?
|
26
|
+
hash['label'] = @label unless @label.nil?
|
27
|
+
hash['logo'] = @logo unless @logo.nil?
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
|
31
|
+
def from_hash(hash)
|
32
|
+
super
|
33
|
+
if hash.has_key? 'displayOrder'
|
34
|
+
@display_order = hash['displayOrder']
|
35
|
+
end
|
36
|
+
if hash.has_key? 'label'
|
37
|
+
@label = hash['label']
|
38
|
+
end
|
39
|
+
if hash.has_key? 'logo'
|
40
|
+
@logo = hash['logo']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/installments/installment_display_hints'
|
7
|
+
require 'ingenico/connect/sdk/domain/payment/installments'
|
8
|
+
|
9
|
+
module Ingenico::Connect::SDK
|
10
|
+
module Domain
|
11
|
+
module Installments
|
12
|
+
|
13
|
+
# @attr [Ingenico::Connect::SDK::Domain::Installments::InstallmentDisplayHints] display_hints
|
14
|
+
# @attr [String] id
|
15
|
+
# @attr [Array<Ingenico::Connect::SDK::Domain::Payment::Installments>] installment_plans
|
16
|
+
class InstallmentOptions < Ingenico::Connect::SDK::DataObject
|
17
|
+
|
18
|
+
attr_accessor :display_hints
|
19
|
+
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
attr_accessor :installment_plans
|
23
|
+
|
24
|
+
# @return (Hash)
|
25
|
+
def to_h
|
26
|
+
hash = super
|
27
|
+
hash['displayHints'] = @display_hints.to_h unless @display_hints.nil?
|
28
|
+
hash['id'] = @id unless @id.nil?
|
29
|
+
hash['installmentPlans'] = @installment_plans.collect{|val| val.to_h} unless @installment_plans.nil?
|
30
|
+
hash
|
31
|
+
end
|
32
|
+
|
33
|
+
def from_hash(hash)
|
34
|
+
super
|
35
|
+
if hash.has_key? 'displayHints'
|
36
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash
|
37
|
+
@display_hints = Ingenico::Connect::SDK::Domain::Installments::InstallmentDisplayHints.new_from_hash(hash['displayHints'])
|
38
|
+
end
|
39
|
+
if hash.has_key? 'id'
|
40
|
+
@id = hash['id']
|
41
|
+
end
|
42
|
+
if hash.has_key? 'installmentPlans'
|
43
|
+
raise TypeError, "value '%s' is not an Array" % [hash['installmentPlans']] unless hash['installmentPlans'].is_a? Array
|
44
|
+
@installment_plans = []
|
45
|
+
hash['installmentPlans'].each do |e|
|
46
|
+
@installment_plans << Ingenico::Connect::SDK::Domain::Payment::Installments.new_from_hash(e)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/installments/installment_options'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Installments
|
11
|
+
|
12
|
+
# @attr [Array<Ingenico::Connect::SDK::Domain::Installments::InstallmentOptions>] installment_options
|
13
|
+
class InstallmentOptionsResponse < Ingenico::Connect::SDK::DataObject
|
14
|
+
|
15
|
+
attr_accessor :installment_options
|
16
|
+
|
17
|
+
# @return (Hash)
|
18
|
+
def to_h
|
19
|
+
hash = super
|
20
|
+
hash['installmentOptions'] = @installment_options.collect{|val| val.to_h} unless @installment_options.nil?
|
21
|
+
hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_hash(hash)
|
25
|
+
super
|
26
|
+
if hash.has_key? 'installmentOptions'
|
27
|
+
raise TypeError, "value '%s' is not an Array" % [hash['installmentOptions']] unless hash['installmentOptions'].is_a? Array
|
28
|
+
@installment_options = []
|
29
|
+
hash['installmentOptions'].each do |e|
|
30
|
+
@installment_options << Ingenico::Connect::SDK::Domain::Installments::InstallmentOptions.new_from_hash(e)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/address'
|
7
|
+
require 'ingenico/connect/sdk/domain/payment/afr_name'
|
8
|
+
|
9
|
+
module Ingenico::Connect::SDK
|
10
|
+
module Domain
|
11
|
+
module Payment
|
12
|
+
|
13
|
+
# @attr [String] account_number
|
14
|
+
# @attr [String] account_number_type
|
15
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::Address] address
|
16
|
+
# @attr [String] date_of_birth
|
17
|
+
# @attr [Ingenico::Connect::SDK::Domain::Payment::AfrName] name
|
18
|
+
# @attr [String] partial_pan
|
19
|
+
class AccountFundingRecipient < Ingenico::Connect::SDK::DataObject
|
20
|
+
|
21
|
+
attr_accessor :account_number
|
22
|
+
|
23
|
+
attr_accessor :account_number_type
|
24
|
+
|
25
|
+
attr_accessor :address
|
26
|
+
|
27
|
+
attr_accessor :date_of_birth
|
28
|
+
|
29
|
+
attr_accessor :name
|
30
|
+
|
31
|
+
attr_accessor :partial_pan
|
32
|
+
|
33
|
+
# @return (Hash)
|
34
|
+
def to_h
|
35
|
+
hash = super
|
36
|
+
hash['accountNumber'] = @account_number unless @account_number.nil?
|
37
|
+
hash['accountNumberType'] = @account_number_type unless @account_number_type.nil?
|
38
|
+
hash['address'] = @address.to_h unless @address.nil?
|
39
|
+
hash['dateOfBirth'] = @date_of_birth unless @date_of_birth.nil?
|
40
|
+
hash['name'] = @name.to_h unless @name.nil?
|
41
|
+
hash['partialPan'] = @partial_pan unless @partial_pan.nil?
|
42
|
+
hash
|
43
|
+
end
|
44
|
+
|
45
|
+
def from_hash(hash)
|
46
|
+
super
|
47
|
+
if hash.has_key? 'accountNumber'
|
48
|
+
@account_number = hash['accountNumber']
|
49
|
+
end
|
50
|
+
if hash.has_key? 'accountNumberType'
|
51
|
+
@account_number_type = hash['accountNumberType']
|
52
|
+
end
|
53
|
+
if hash.has_key? 'address'
|
54
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['address']] unless hash['address'].is_a? Hash
|
55
|
+
@address = Ingenico::Connect::SDK::Domain::Definitions::Address.new_from_hash(hash['address'])
|
56
|
+
end
|
57
|
+
if hash.has_key? 'dateOfBirth'
|
58
|
+
@date_of_birth = hash['dateOfBirth']
|
59
|
+
end
|
60
|
+
if hash.has_key? 'name'
|
61
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['name']] unless hash['name'].is_a? Hash
|
62
|
+
@name = Ingenico::Connect::SDK::Domain::Payment::AfrName.new_from_hash(hash['name'])
|
63
|
+
end
|
64
|
+
if hash.has_key? 'partialPan'
|
65
|
+
@partial_pan = hash['partialPan']
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
6
|
require 'ingenico/connect/sdk/domain/definitions/airline_data'
|
7
7
|
require 'ingenico/connect/sdk/domain/definitions/lodging_data'
|
8
|
+
require 'ingenico/connect/sdk/domain/payment/account_funding_recipient'
|
8
9
|
require 'ingenico/connect/sdk/domain/payment/installments'
|
9
10
|
require 'ingenico/connect/sdk/domain/payment/level3_summary_data'
|
10
11
|
require 'ingenico/connect/sdk/domain/payment/loan_recipient'
|
@@ -14,6 +15,7 @@ module Ingenico::Connect::SDK
|
|
14
15
|
module Domain
|
15
16
|
module Payment
|
16
17
|
|
18
|
+
# @attr [Ingenico::Connect::SDK::Domain::Payment::AccountFundingRecipient] account_funding_recipient
|
17
19
|
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AirlineData] airline_data
|
18
20
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::Installments] installments
|
19
21
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData] level3_summary_data
|
@@ -24,6 +26,8 @@ module Ingenico::Connect::SDK
|
|
24
26
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::OrderTypeInformation] type_information
|
25
27
|
class AdditionalOrderInput < Ingenico::Connect::SDK::DataObject
|
26
28
|
|
29
|
+
attr_accessor :account_funding_recipient
|
30
|
+
|
27
31
|
attr_accessor :airline_data
|
28
32
|
|
29
33
|
attr_accessor :installments
|
@@ -32,6 +36,8 @@ module Ingenico::Connect::SDK
|
|
32
36
|
# @deprecated Use Order.shoppingCart.amountBreakdown instead
|
33
37
|
attr_accessor :level3_summary_data
|
34
38
|
|
39
|
+
#
|
40
|
+
# @deprecated No replacement
|
35
41
|
attr_accessor :loan_recipient
|
36
42
|
|
37
43
|
attr_accessor :lodging_data
|
@@ -47,6 +53,7 @@ module Ingenico::Connect::SDK
|
|
47
53
|
# @return (Hash)
|
48
54
|
def to_h
|
49
55
|
hash = super
|
56
|
+
hash['accountFundingRecipient'] = @account_funding_recipient.to_h unless @account_funding_recipient.nil?
|
50
57
|
hash['airlineData'] = @airline_data.to_h unless @airline_data.nil?
|
51
58
|
hash['installments'] = @installments.to_h unless @installments.nil?
|
52
59
|
hash['level3SummaryData'] = @level3_summary_data.to_h unless @level3_summary_data.nil?
|
@@ -60,6 +67,10 @@ module Ingenico::Connect::SDK
|
|
60
67
|
|
61
68
|
def from_hash(hash)
|
62
69
|
super
|
70
|
+
if hash.has_key? 'accountFundingRecipient'
|
71
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['accountFundingRecipient']] unless hash['accountFundingRecipient'].is_a? Hash
|
72
|
+
@account_funding_recipient = Ingenico::Connect::SDK::Domain::Payment::AccountFundingRecipient.new_from_hash(hash['accountFundingRecipient'])
|
73
|
+
end
|
63
74
|
if hash.has_key? 'airlineData'
|
64
75
|
raise TypeError, "value '%s' is not a Hash" % [hash['airlineData']] unless hash['airlineData'].is_a? Hash
|
65
76
|
@airline_data = Ingenico::Connect::SDK::Domain::Definitions::AirlineData.new_from_hash(hash['airlineData'])
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
# @attr [String] first_name
|
12
|
+
# @attr [String] surname
|
13
|
+
class AfrName < Ingenico::Connect::SDK::DataObject
|
14
|
+
|
15
|
+
attr_accessor :first_name
|
16
|
+
|
17
|
+
attr_accessor :surname
|
18
|
+
|
19
|
+
# @return (Hash)
|
20
|
+
def to_h
|
21
|
+
hash = super
|
22
|
+
hash['firstName'] = @first_name unless @first_name.nil?
|
23
|
+
hash['surname'] = @surname unless @surname.nil?
|
24
|
+
hash
|
25
|
+
end
|
26
|
+
|
27
|
+
def from_hash(hash)
|
28
|
+
super
|
29
|
+
if hash.has_key? 'firstName'
|
30
|
+
@first_name = hash['firstName']
|
31
|
+
end
|
32
|
+
if hash.has_key? 'surname'
|
33
|
+
@surname = hash['surname']
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -20,6 +20,7 @@ module Ingenico::Connect::SDK
|
|
20
20
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::ContactDetails] contact_details
|
21
21
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::CustomerDevice] device
|
22
22
|
# @attr [String] fiscal_number
|
23
|
+
# @attr [true/false] is_company
|
23
24
|
# @attr [true/false] is_previous_customer
|
24
25
|
# @attr [String] locale
|
25
26
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::PersonalInformation] personal_information
|
@@ -38,6 +39,8 @@ module Ingenico::Connect::SDK
|
|
38
39
|
|
39
40
|
attr_accessor :fiscal_number
|
40
41
|
|
42
|
+
attr_accessor :is_company
|
43
|
+
|
41
44
|
attr_accessor :is_previous_customer
|
42
45
|
|
43
46
|
attr_accessor :locale
|
@@ -57,6 +60,7 @@ module Ingenico::Connect::SDK
|
|
57
60
|
hash['contactDetails'] = @contact_details.to_h unless @contact_details.nil?
|
58
61
|
hash['device'] = @device.to_h unless @device.nil?
|
59
62
|
hash['fiscalNumber'] = @fiscal_number unless @fiscal_number.nil?
|
63
|
+
hash['isCompany'] = @is_company unless @is_company.nil?
|
60
64
|
hash['isPreviousCustomer'] = @is_previous_customer unless @is_previous_customer.nil?
|
61
65
|
hash['locale'] = @locale unless @locale.nil?
|
62
66
|
hash['personalInformation'] = @personal_information.to_h unless @personal_information.nil?
|
@@ -88,6 +92,9 @@ module Ingenico::Connect::SDK
|
|
88
92
|
if hash.has_key? 'fiscalNumber'
|
89
93
|
@fiscal_number = hash['fiscalNumber']
|
90
94
|
end
|
95
|
+
if hash.has_key? 'isCompany'
|
96
|
+
@is_company = hash['isCompany']
|
97
|
+
end
|
91
98
|
if hash.has_key? 'isPreviousCustomer'
|
92
99
|
@is_previous_customer = hash['isPreviousCustomer']
|
93
100
|
end
|
@@ -10,6 +10,7 @@ module Ingenico::Connect::SDK
|
|
10
10
|
module Payment
|
11
11
|
|
12
12
|
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] amount_of_money_per_installment
|
13
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] amount_of_money_total
|
13
14
|
# @attr [String] frequency_of_installments
|
14
15
|
# @attr [Integer] installment_plan_code
|
15
16
|
# @attr [String] interest_rate
|
@@ -18,6 +19,8 @@ module Ingenico::Connect::SDK
|
|
18
19
|
|
19
20
|
attr_accessor :amount_of_money_per_installment
|
20
21
|
|
22
|
+
attr_accessor :amount_of_money_total
|
23
|
+
|
21
24
|
attr_accessor :frequency_of_installments
|
22
25
|
|
23
26
|
attr_accessor :installment_plan_code
|
@@ -30,6 +33,7 @@ module Ingenico::Connect::SDK
|
|
30
33
|
def to_h
|
31
34
|
hash = super
|
32
35
|
hash['amountOfMoneyPerInstallment'] = @amount_of_money_per_installment.to_h unless @amount_of_money_per_installment.nil?
|
36
|
+
hash['amountOfMoneyTotal'] = @amount_of_money_total.to_h unless @amount_of_money_total.nil?
|
33
37
|
hash['frequencyOfInstallments'] = @frequency_of_installments unless @frequency_of_installments.nil?
|
34
38
|
hash['installmentPlanCode'] = @installment_plan_code unless @installment_plan_code.nil?
|
35
39
|
hash['interestRate'] = @interest_rate unless @interest_rate.nil?
|
@@ -43,6 +47,10 @@ module Ingenico::Connect::SDK
|
|
43
47
|
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoneyPerInstallment']] unless hash['amountOfMoneyPerInstallment'].is_a? Hash
|
44
48
|
@amount_of_money_per_installment = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoneyPerInstallment'])
|
45
49
|
end
|
50
|
+
if hash.has_key? 'amountOfMoneyTotal'
|
51
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoneyTotal']] unless hash['amountOfMoneyTotal'].is_a? Hash
|
52
|
+
@amount_of_money_total = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoneyTotal'])
|
53
|
+
end
|
46
54
|
if hash.has_key? 'frequencyOfInstallments'
|
47
55
|
@frequency_of_installments = hash['frequencyOfInstallments']
|
48
56
|
end
|
@@ -13,16 +13,27 @@ module Ingenico::Connect::SDK
|
|
13
13
|
# @attr [String] partial_pan
|
14
14
|
# @attr [String] surname
|
15
15
|
# @attr [String] zip
|
16
|
+
# @deprecated No replacement
|
16
17
|
class LoanRecipient < Ingenico::Connect::SDK::DataObject
|
17
18
|
|
19
|
+
#
|
20
|
+
# @deprecated No replacement
|
18
21
|
attr_accessor :account_number
|
19
22
|
|
23
|
+
#
|
24
|
+
# @deprecated No replacement
|
20
25
|
attr_accessor :date_of_birth
|
21
26
|
|
27
|
+
#
|
28
|
+
# @deprecated No replacement
|
22
29
|
attr_accessor :partial_pan
|
23
30
|
|
31
|
+
#
|
32
|
+
# @deprecated No replacement
|
24
33
|
attr_accessor :surname
|
25
34
|
|
35
|
+
#
|
36
|
+
# @deprecated No replacement
|
26
37
|
attr_accessor :zip
|
27
38
|
|
28
39
|
# @return (Hash)
|
@@ -8,11 +8,14 @@ module Ingenico::Connect::SDK
|
|
8
8
|
module Domain
|
9
9
|
module Payment
|
10
10
|
|
11
|
+
# @attr [String] funding_type
|
11
12
|
# @attr [String] purchase_type
|
12
13
|
# @attr [String] transaction_type
|
13
14
|
# @attr [String] usage_type
|
14
15
|
class OrderTypeInformation < Ingenico::Connect::SDK::DataObject
|
15
16
|
|
17
|
+
attr_accessor :funding_type
|
18
|
+
|
16
19
|
attr_accessor :purchase_type
|
17
20
|
|
18
21
|
attr_accessor :transaction_type
|
@@ -22,6 +25,7 @@ module Ingenico::Connect::SDK
|
|
22
25
|
# @return (Hash)
|
23
26
|
def to_h
|
24
27
|
hash = super
|
28
|
+
hash['fundingType'] = @funding_type unless @funding_type.nil?
|
25
29
|
hash['purchaseType'] = @purchase_type unless @purchase_type.nil?
|
26
30
|
hash['transactionType'] = @transaction_type unless @transaction_type.nil?
|
27
31
|
hash['usageType'] = @usage_type unless @usage_type.nil?
|
@@ -30,6 +34,9 @@ module Ingenico::Connect::SDK
|
|
30
34
|
|
31
35
|
def from_hash(hash)
|
32
36
|
super
|
37
|
+
if hash.has_key? 'fundingType'
|
38
|
+
@funding_type = hash['fundingType']
|
39
|
+
end
|
33
40
|
if hash.has_key? 'purchaseType'
|
34
41
|
@purchase_type = hash['purchaseType']
|
35
42
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
# @attr [String] id_issuing_country_code
|
12
|
+
# @attr [String] id_type
|
13
|
+
# @attr [String] id_value
|
14
|
+
class PersonalIdentification < Ingenico::Connect::SDK::DataObject
|
15
|
+
|
16
|
+
attr_accessor :id_issuing_country_code
|
17
|
+
|
18
|
+
attr_accessor :id_type
|
19
|
+
|
20
|
+
attr_accessor :id_value
|
21
|
+
|
22
|
+
# @return (Hash)
|
23
|
+
def to_h
|
24
|
+
hash = super
|
25
|
+
hash['idIssuingCountryCode'] = @id_issuing_country_code unless @id_issuing_country_code.nil?
|
26
|
+
hash['idType'] = @id_type unless @id_type.nil?
|
27
|
+
hash['idValue'] = @id_value unless @id_value.nil?
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
|
31
|
+
def from_hash(hash)
|
32
|
+
super
|
33
|
+
if hash.has_key? 'idIssuingCountryCode'
|
34
|
+
@id_issuing_country_code = hash['idIssuingCountryCode']
|
35
|
+
end
|
36
|
+
if hash.has_key? 'idType'
|
37
|
+
@id_type = hash['idType']
|
38
|
+
end
|
39
|
+
if hash.has_key? 'idValue'
|
40
|
+
@id_value = hash['idValue']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/payment/personal_identification'
|
6
7
|
require 'ingenico/connect/sdk/domain/payment/personal_name'
|
7
8
|
|
8
9
|
module Ingenico::Connect::SDK
|
@@ -11,6 +12,7 @@ module Ingenico::Connect::SDK
|
|
11
12
|
|
12
13
|
# @attr [String] date_of_birth
|
13
14
|
# @attr [String] gender
|
15
|
+
# @attr [Ingenico::Connect::SDK::Domain::Payment::PersonalIdentification] identification
|
14
16
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::PersonalName] name
|
15
17
|
class PersonalInformation < Ingenico::Connect::SDK::DataObject
|
16
18
|
|
@@ -18,6 +20,8 @@ module Ingenico::Connect::SDK
|
|
18
20
|
|
19
21
|
attr_accessor :gender
|
20
22
|
|
23
|
+
attr_accessor :identification
|
24
|
+
|
21
25
|
attr_accessor :name
|
22
26
|
|
23
27
|
# @return (Hash)
|
@@ -25,6 +29,7 @@ module Ingenico::Connect::SDK
|
|
25
29
|
hash = super
|
26
30
|
hash['dateOfBirth'] = @date_of_birth unless @date_of_birth.nil?
|
27
31
|
hash['gender'] = @gender unless @gender.nil?
|
32
|
+
hash['identification'] = @identification.to_h unless @identification.nil?
|
28
33
|
hash['name'] = @name.to_h unless @name.nil?
|
29
34
|
hash
|
30
35
|
end
|
@@ -37,6 +42,10 @@ module Ingenico::Connect::SDK
|
|
37
42
|
if hash.has_key? 'gender'
|
38
43
|
@gender = hash['gender']
|
39
44
|
end
|
45
|
+
if hash.has_key? 'identification'
|
46
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['identification']] unless hash['identification'].is_a? Hash
|
47
|
+
@identification = Ingenico::Connect::SDK::Domain::Payment::PersonalIdentification.new_from_hash(hash['identification'])
|
48
|
+
end
|
40
49
|
if hash.has_key? 'name'
|
41
50
|
raise TypeError, "value '%s' is not a Hash" % [hash['name']] unless hash['name'].is_a? Hash
|
42
51
|
@name = Ingenico::Connect::SDK::Domain::Payment::PersonalName.new_from_hash(hash['name'])
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/api_resource'
|
6
|
+
require 'ingenico/connect/sdk/response_exception'
|
7
|
+
require 'ingenico/connect/sdk/domain/errors/error_response'
|
8
|
+
require 'ingenico/connect/sdk/domain/installments/installment_options_response'
|
9
|
+
|
10
|
+
module Ingenico::Connect::SDK
|
11
|
+
module Merchant
|
12
|
+
module Installments
|
13
|
+
|
14
|
+
# Installments client. Thread-safe.
|
15
|
+
class InstallmentsClient < Ingenico::Connect::SDK::ApiResource
|
16
|
+
|
17
|
+
# @param parent [Ingenico::Connect::SDK::ApiResource]
|
18
|
+
# @param path_context [Hash]
|
19
|
+
def initialize(parent, path_context)
|
20
|
+
super(parent, path_context)
|
21
|
+
end
|
22
|
+
|
23
|
+
# Resource /!{merchantId}/installments/getInstallmentsInfo - {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/installments/getInstallmentsInfo.html Get Installment Info}
|
24
|
+
# @param body [Ingenico::Connect::SDK::Domain::Installments::GetInstallmentRequest]
|
25
|
+
# @param context [Ingenico::Connect::SDK::CallContext]
|
26
|
+
# @return [Ingenico::Connect::SDK::Domain::Installments::InstallmentOptionsResponse]
|
27
|
+
# @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
28
|
+
# @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
29
|
+
# @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
30
|
+
# @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
31
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
32
|
+
# @raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
33
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
34
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
35
|
+
# @raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
36
|
+
def get_installments_info(body, context=nil)
|
37
|
+
uri = instantiate_uri('/v1/{merchantId}/installments/getInstallmentsInfo', nil)
|
38
|
+
return @communicator.post(
|
39
|
+
uri,
|
40
|
+
client_headers,
|
41
|
+
nil,
|
42
|
+
body,
|
43
|
+
Ingenico::Connect::SDK::Domain::Installments::InstallmentOptionsResponse,
|
44
|
+
context)
|
45
|
+
rescue ResponseException => e
|
46
|
+
error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
|
47
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
48
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -8,6 +8,7 @@ require 'ingenico/connect/sdk/merchant/disputes/disputes_client'
|
|
8
8
|
require 'ingenico/connect/sdk/merchant/files/files_client'
|
9
9
|
require 'ingenico/connect/sdk/merchant/hostedcheckouts/hostedcheckouts_client'
|
10
10
|
require 'ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client'
|
11
|
+
require 'ingenico/connect/sdk/merchant/installments/installments_client'
|
11
12
|
require 'ingenico/connect/sdk/merchant/mandates/mandates_client'
|
12
13
|
require 'ingenico/connect/sdk/merchant/payments/payments_client'
|
13
14
|
require 'ingenico/connect/sdk/merchant/payouts/payouts_client'
|
@@ -115,6 +116,12 @@ module Ingenico::Connect::SDK
|
|
115
116
|
Ingenico::Connect::SDK::Merchant::Sessions::SessionsClient.new(self, nil)
|
116
117
|
end
|
117
118
|
|
119
|
+
# Resource /!{merchantId}/installments
|
120
|
+
# @return [Ingenico::Connect::SDK::Merchant::Installments::InstallmentsClient]
|
121
|
+
def installments
|
122
|
+
Ingenico::Connect::SDK::Merchant::Installments::InstallmentsClient.new(self, nil)
|
123
|
+
end
|
124
|
+
|
118
125
|
# Resource /!{merchantId}/files
|
119
126
|
# @return [Ingenico::Connect::SDK::Merchant::Files::FilesClient]
|
120
127
|
def files
|
@@ -7,7 +7,7 @@ module Ingenico::Connect::SDK
|
|
7
7
|
#
|
8
8
|
# @attr_reader [Array<Ingenico::Connect::SDK::RequestHeader>] meta_data_headers List of headers that should be used in all requests.
|
9
9
|
class MetaDataProvider
|
10
|
-
@@SDK_VERSION = '2.
|
10
|
+
@@SDK_VERSION = '2.44.0'
|
11
11
|
@@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'
|
12
12
|
@@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key',
|
13
13
|
'Date', 'Content-Type', 'Authorization'].sort!.freeze
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: connect-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.44.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ingenico ePayments
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- examples/merchant/hostedcheckouts/get_hosted_checkout_example.rb
|
155
155
|
- examples/merchant/hostedmandatemanagements/create_hosted_mandate_management_example.rb
|
156
156
|
- examples/merchant/hostedmandatemanagements/get_hosted_mandate_management_example.rb
|
157
|
+
- examples/merchant/installments/get_installments_info_example.rb
|
157
158
|
- examples/merchant/mandates/block_mandate_example.rb
|
158
159
|
- examples/merchant/mandates/create_mandate_example.rb
|
159
160
|
- examples/merchant/mandates/create_mandate_with_reference_example.rb
|
@@ -290,17 +291,25 @@ files:
|
|
290
291
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb
|
291
292
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb
|
292
293
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/displayed_data.rb
|
294
|
+
- lib/ingenico/connect/sdk/domain/hostedcheckout/frequency.rb
|
293
295
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/get_hosted_checkout_response.rb
|
294
296
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb
|
295
297
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_method_specific_input_hosted_checkout.rb
|
296
298
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product302_specific_input_hosted_checkout.rb
|
297
299
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product320_specific_input_hosted_checkout.rb
|
298
300
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/payment_product_filters_hosted_checkout.rb
|
301
|
+
- lib/ingenico/connect/sdk/domain/hostedcheckout/recurring_payments_data.rb
|
302
|
+
- lib/ingenico/connect/sdk/domain/hostedcheckout/trial_information.rb
|
303
|
+
- lib/ingenico/connect/sdk/domain/hostedcheckout/trial_period.rb
|
299
304
|
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/create_hosted_mandate_management_request.rb
|
300
305
|
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/create_hosted_mandate_management_response.rb
|
301
306
|
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/get_hosted_mandate_management_response.rb
|
302
307
|
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/hosted_mandate_info.rb
|
303
308
|
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/hosted_mandate_management_specific_input.rb
|
309
|
+
- lib/ingenico/connect/sdk/domain/installments/get_installment_request.rb
|
310
|
+
- lib/ingenico/connect/sdk/domain/installments/installment_display_hints.rb
|
311
|
+
- lib/ingenico/connect/sdk/domain/installments/installment_options.rb
|
312
|
+
- lib/ingenico/connect/sdk/domain/installments/installment_options_response.rb
|
304
313
|
- lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb
|
305
314
|
- lib/ingenico/connect/sdk/domain/mandates/create_mandate_request.rb
|
306
315
|
- lib/ingenico/connect/sdk/domain/mandates/create_mandate_response.rb
|
@@ -326,8 +335,10 @@ files:
|
|
326
335
|
- lib/ingenico/connect/sdk/domain/payment/abstract_sepa_direct_debit_payment_method_specific_input.rb
|
327
336
|
- lib/ingenico/connect/sdk/domain/payment/abstract_sepa_direct_debit_payment_product771_specific_input.rb
|
328
337
|
- lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb
|
338
|
+
- lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb
|
329
339
|
- lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb
|
330
340
|
- lib/ingenico/connect/sdk/domain/payment/address_personal.rb
|
341
|
+
- lib/ingenico/connect/sdk/domain/payment/afr_name.rb
|
331
342
|
- lib/ingenico/connect/sdk/domain/payment/amount_breakdown.rb
|
332
343
|
- lib/ingenico/connect/sdk/domain/payment/approve_payment_card_payment_method_specific_output.rb
|
333
344
|
- lib/ingenico/connect/sdk/domain/payment/approve_payment_direct_debit_payment_method_specific_input.rb
|
@@ -431,6 +442,7 @@ files:
|
|
431
442
|
- lib/ingenico/connect/sdk/domain/payment/payment_references.rb
|
432
443
|
- lib/ingenico/connect/sdk/domain/payment/payment_response.rb
|
433
444
|
- lib/ingenico/connect/sdk/domain/payment/payment_status_output.rb
|
445
|
+
- lib/ingenico/connect/sdk/domain/payment/personal_identification.rb
|
434
446
|
- lib/ingenico/connect/sdk/domain/payment/personal_information.rb
|
435
447
|
- lib/ingenico/connect/sdk/domain/payment/personal_name.rb
|
436
448
|
- lib/ingenico/connect/sdk/domain/payment/protection_eligibility.rb
|
@@ -625,6 +637,7 @@ files:
|
|
625
637
|
- lib/ingenico/connect/sdk/merchant/files/files_client.rb
|
626
638
|
- lib/ingenico/connect/sdk/merchant/hostedcheckouts/hostedcheckouts_client.rb
|
627
639
|
- lib/ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb
|
640
|
+
- lib/ingenico/connect/sdk/merchant/installments/installments_client.rb
|
628
641
|
- lib/ingenico/connect/sdk/merchant/mandates/mandates_client.rb
|
629
642
|
- lib/ingenico/connect/sdk/merchant/merchant_client.rb
|
630
643
|
- lib/ingenico/connect/sdk/merchant/payments/find_payments_params.rb
|