connect-sdk-ruby 2.42.0 → 2.43.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e20d6aa13d9992688be8e8486a3fc96b9a930f6672ccd3e18fc6e0f467103c9c
4
- data.tar.gz: 6c9891000e0b3ca4a7f84c38ef28a0bbd03385a54a30cd013c4069068e8762c9
3
+ metadata.gz: 0ccbd5c5e5a1bfc862f437b25be46a8d4b6042237206a8800a05d86225962e4b
4
+ data.tar.gz: 733cde41347c66fb23ab5e554bdc188d31a015a2f997fb0ea568fa8275414182
5
5
  SHA512:
6
- metadata.gz: 0fb4b543d25bd8ea3c7c185d80b8005fdb8e1c4a1c7ce69340c28a3e7498cc6a9a233aff42085fe199601232e2410d1277f6fd08d2557e0654c467c9325940f8
7
- data.tar.gz: 40ede975dd17efe318ffb3ffd058e13923c46f2587946261acdf93eda34ac75f68bd520e39eee2e79f128dc4e31b31edc1d3802ac09c91fafb56ff477238ad81
6
+ metadata.gz: 41574e2990ddab8b6f7396847a9257b2468de4807d1f404f2cd63414a036572b16eca6621eedd558ca06f107ac34f5ac3d173641822656485fa95da89e1f3f74
7
+ data.tar.gz: b8c102463d9ae5b17eabedf3b40399cc640a8dd8e41571d4401ed1b2ffaa0121ce717668c1f2a4cbebd3882c265b66d9faee7a77eec336d68c43b743640222d7
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '2.42.0'
3
+ spec.version = '2.43.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
@@ -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
@@ -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.42.0'
10
+ @@SDK_VERSION = '2.43.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.42.0
4
+ version: 2.43.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-08-11 00:00:00.000000000 Z
11
+ date: 2023-10-16 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
@@ -625,6 +634,7 @@ files:
625
634
  - lib/ingenico/connect/sdk/merchant/files/files_client.rb
626
635
  - lib/ingenico/connect/sdk/merchant/hostedcheckouts/hostedcheckouts_client.rb
627
636
  - lib/ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb
637
+ - lib/ingenico/connect/sdk/merchant/installments/installments_client.rb
628
638
  - lib/ingenico/connect/sdk/merchant/mandates/mandates_client.rb
629
639
  - lib/ingenico/connect/sdk/merchant/merchant_client.rb
630
640
  - lib/ingenico/connect/sdk/merchant/payments/find_payments_params.rb