connect-sdk-ruby 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/connect-sdk-ruby.gemspec +1 -1
- data/lib/ingenico/connect/sdk/api_resource.rb +4 -4
- data/lib/ingenico/connect/sdk/declined_transaction_exception.rb +2 -2
- data/lib/ingenico/connect/sdk/domain/payment/abstract_bank_transfer_payment_method_specific_input.rb +31 -0
- data/lib/ingenico/connect/sdk/domain/payment/abstract_card_payment_method_specific_input.rb +101 -0
- data/lib/ingenico/connect/sdk/domain/payment/abstract_cash_payment_method_specific_input.rb +15 -0
- data/lib/ingenico/connect/sdk/domain/payment/abstract_e_invoice_payment_method_specific_input.rb +31 -0
- data/lib/ingenico/connect/sdk/domain/payment/abstract_redirect_payment_method_specific_input.rb +59 -0
- data/lib/ingenico/connect/sdk/domain/payment/bank_transfer_payment_method_specific_input.rb +2 -2
- data/lib/ingenico/connect/sdk/domain/payment/bank_transfer_payment_method_specific_input_base.rb +2 -18
- data/lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb +2 -2
- data/lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb +2 -88
- data/lib/ingenico/connect/sdk/domain/payment/cash_payment_method_specific_input.rb +2 -2
- data/lib/ingenico/connect/sdk/domain/payment/cash_payment_method_specific_input_base.rb +2 -2
- data/lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_method_specific_input.rb +2 -2
- data/lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_method_specific_input_base.rb +2 -18
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb +13 -2
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input_base.rb +2 -46
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_product863_specific_input.rb +31 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product.rb +33 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product302_specific_data.rb +37 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product320_specific_data.rb +37 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product863_specific_data.rb +37 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- data/lib/ingenico/connect/sdk/not_found_exception.rb +1 -1
- data/lib/ingenico/connect/sdk/param_request.rb +2 -2
- data/spec/integration_setup.rb +9 -9
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a219204f513cf57e30c1ededfe45339bdc0e891780c8e902c84a1b45f02054c
|
4
|
+
data.tar.gz: 258898e59696c82b8efbf028b44d758b8d213b4c589a87b0a0b604a1e6baaa31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c4f90897809e77f8290d4df6b9b17eabb7e8c56ea7b642873b07f0c7eda70548d2c828a1d9bdbe545836ca0a29ebdd13acb057b2cf11ec1f03a628e05bb965b
|
7
|
+
data.tar.gz: b06a15ef5cdd7842133226506fd66106002117ed6cdada97e3e87e1ed3de9d60f56feb502c4bbe048c4f855b4ebedd42e1816f0b54ac0e5df2fb222c75d8ca51
|
data/README.md
CHANGED
@@ -83,9 +83,9 @@ After the Ruby SDK has been installed, it can be required in Ruby program as fol
|
|
83
83
|
There are two types of tests: unit tests and integration tests. The unit tests will work out-of-the-box; for the integration tests some configuration is required.
|
84
84
|
First, some environment variables need to be set:
|
85
85
|
|
86
|
-
* `
|
87
|
-
* `
|
88
|
-
* `
|
86
|
+
* `connect_api_apiKeyId` for the API key id to use. This can be retrieved from the Configuration Center.
|
87
|
+
* `connect_api_secretApiKey` for the secret API key to use. This can be retrieved from the Configuration Center.
|
88
|
+
* `connect_api_merchantId` for your merchant ID.
|
89
89
|
|
90
90
|
In addition, to run the proxy integration tests, the proxy URI, username and password should be set in the `spec/fixtures/resources/properties.proxy.yml` file.
|
91
91
|
|
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 = '1.
|
3
|
+
spec.version = '1.27.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}
|
@@ -16,8 +16,8 @@ module Ingenico::Connect::SDK
|
|
16
16
|
# !{'version' => 'v1', 'merchantId' => '1234'}. The final url in this case will be
|
17
17
|
# https://api-sandbox.globalcollect.com/v1/1234/payments.
|
18
18
|
# client_meta_info:: JSON string containing the meta data for the client.
|
19
|
-
def initialize(arg, path_context, client_meta_info=
|
20
|
-
if client_meta_info ==
|
19
|
+
def initialize(arg, path_context, client_meta_info=false)
|
20
|
+
if client_meta_info == false
|
21
21
|
if arg.nil?
|
22
22
|
raise ArgumentError.new('parent is required')
|
23
23
|
end
|
@@ -53,8 +53,8 @@ module Ingenico::Connect::SDK
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
def instantiate_uri(uri, path_context=
|
57
|
-
if path_context ==
|
56
|
+
def instantiate_uri(uri, path_context=false)
|
57
|
+
if path_context == false
|
58
58
|
uri = replace_all(uri, @path_context)
|
59
59
|
unless @parent.nil?
|
60
60
|
uri = @parent.instantiate_uri(uri)
|
@@ -5,8 +5,8 @@ module Ingenico::Connect::SDK
|
|
5
5
|
|
6
6
|
# Create a new DeclinedTransactionException.
|
7
7
|
# @see ApiException#initialize
|
8
|
-
def initialize(status_code, response_body, error_id, errors, message=
|
9
|
-
if message ==
|
8
|
+
def initialize(status_code, response_body, error_id, errors, message=false)
|
9
|
+
if message == false
|
10
10
|
super(status_code, response_body, error_id, errors)
|
11
11
|
else
|
12
12
|
super(status_code, response_body, error_id, errors, message)
|
data/lib/ingenico/connect/sdk/domain/payment/abstract_bank_transfer_payment_method_specific_input.rb
ADDED
@@ -0,0 +1,31 @@
|
|
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/domain/definitions/abstract_payment_method_specific_input'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
class AbstractBankTransferPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
|
12
|
+
|
13
|
+
# String
|
14
|
+
attr_accessor :additional_reference
|
15
|
+
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
add_to_hash(hash, 'additionalReference', @additional_reference)
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
|
22
|
+
def from_hash(hash)
|
23
|
+
super
|
24
|
+
if hash.has_key?('additionalReference')
|
25
|
+
@additional_reference = hash['additionalReference']
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,101 @@
|
|
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/domain/definitions/abstract_payment_method_specific_input'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
class AbstractCardPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
|
12
|
+
|
13
|
+
# String
|
14
|
+
attr_accessor :authorization_mode
|
15
|
+
|
16
|
+
# String
|
17
|
+
attr_accessor :customer_reference
|
18
|
+
|
19
|
+
# String
|
20
|
+
attr_accessor :recurring_payment_sequence_indicator
|
21
|
+
|
22
|
+
# true/false
|
23
|
+
attr_accessor :requires_approval
|
24
|
+
|
25
|
+
# true/false
|
26
|
+
attr_accessor :skip_authentication
|
27
|
+
|
28
|
+
# true/false
|
29
|
+
attr_accessor :skip_fraud_service
|
30
|
+
|
31
|
+
# String
|
32
|
+
attr_accessor :token
|
33
|
+
|
34
|
+
# true/false
|
35
|
+
attr_accessor :tokenize
|
36
|
+
|
37
|
+
# String
|
38
|
+
attr_accessor :transaction_channel
|
39
|
+
|
40
|
+
# String
|
41
|
+
attr_accessor :unscheduled_card_on_file_indicator
|
42
|
+
|
43
|
+
# String
|
44
|
+
attr_accessor :unscheduled_card_on_file_requestor
|
45
|
+
|
46
|
+
def to_h
|
47
|
+
hash = super
|
48
|
+
add_to_hash(hash, 'authorizationMode', @authorization_mode)
|
49
|
+
add_to_hash(hash, 'customerReference', @customer_reference)
|
50
|
+
add_to_hash(hash, 'recurringPaymentSequenceIndicator', @recurring_payment_sequence_indicator)
|
51
|
+
add_to_hash(hash, 'requiresApproval', @requires_approval)
|
52
|
+
add_to_hash(hash, 'skipAuthentication', @skip_authentication)
|
53
|
+
add_to_hash(hash, 'skipFraudService', @skip_fraud_service)
|
54
|
+
add_to_hash(hash, 'token', @token)
|
55
|
+
add_to_hash(hash, 'tokenize', @tokenize)
|
56
|
+
add_to_hash(hash, 'transactionChannel', @transaction_channel)
|
57
|
+
add_to_hash(hash, 'unscheduledCardOnFileIndicator', @unscheduled_card_on_file_indicator)
|
58
|
+
add_to_hash(hash, 'unscheduledCardOnFileRequestor', @unscheduled_card_on_file_requestor)
|
59
|
+
hash
|
60
|
+
end
|
61
|
+
|
62
|
+
def from_hash(hash)
|
63
|
+
super
|
64
|
+
if hash.has_key?('authorizationMode')
|
65
|
+
@authorization_mode = hash['authorizationMode']
|
66
|
+
end
|
67
|
+
if hash.has_key?('customerReference')
|
68
|
+
@customer_reference = hash['customerReference']
|
69
|
+
end
|
70
|
+
if hash.has_key?('recurringPaymentSequenceIndicator')
|
71
|
+
@recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
|
72
|
+
end
|
73
|
+
if hash.has_key?('requiresApproval')
|
74
|
+
@requires_approval = hash['requiresApproval']
|
75
|
+
end
|
76
|
+
if hash.has_key?('skipAuthentication')
|
77
|
+
@skip_authentication = hash['skipAuthentication']
|
78
|
+
end
|
79
|
+
if hash.has_key?('skipFraudService')
|
80
|
+
@skip_fraud_service = hash['skipFraudService']
|
81
|
+
end
|
82
|
+
if hash.has_key?('token')
|
83
|
+
@token = hash['token']
|
84
|
+
end
|
85
|
+
if hash.has_key?('tokenize')
|
86
|
+
@tokenize = hash['tokenize']
|
87
|
+
end
|
88
|
+
if hash.has_key?('transactionChannel')
|
89
|
+
@transaction_channel = hash['transactionChannel']
|
90
|
+
end
|
91
|
+
if hash.has_key?('unscheduledCardOnFileIndicator')
|
92
|
+
@unscheduled_card_on_file_indicator = hash['unscheduledCardOnFileIndicator']
|
93
|
+
end
|
94
|
+
if hash.has_key?('unscheduledCardOnFileRequestor')
|
95
|
+
@unscheduled_card_on_file_requestor = hash['unscheduledCardOnFileRequestor']
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,15 @@
|
|
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/domain/definitions/abstract_payment_method_specific_input'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
class AbstractCashPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/ingenico/connect/sdk/domain/payment/abstract_e_invoice_payment_method_specific_input.rb
ADDED
@@ -0,0 +1,31 @@
|
|
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/domain/definitions/abstract_payment_method_specific_input'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
class AbstractEInvoicePaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
|
12
|
+
|
13
|
+
# true/false
|
14
|
+
attr_accessor :requires_approval
|
15
|
+
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
add_to_hash(hash, 'requiresApproval', @requires_approval)
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
|
22
|
+
def from_hash(hash)
|
23
|
+
super
|
24
|
+
if hash.has_key?('requiresApproval')
|
25
|
+
@requires_approval = hash['requiresApproval']
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/ingenico/connect/sdk/domain/payment/abstract_redirect_payment_method_specific_input.rb
ADDED
@@ -0,0 +1,59 @@
|
|
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/domain/definitions/abstract_payment_method_specific_input'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
class AbstractRedirectPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
|
12
|
+
|
13
|
+
# Integer
|
14
|
+
attr_accessor :expiration_period
|
15
|
+
|
16
|
+
# String
|
17
|
+
attr_accessor :recurring_payment_sequence_indicator
|
18
|
+
|
19
|
+
# true/false
|
20
|
+
attr_accessor :requires_approval
|
21
|
+
|
22
|
+
# String
|
23
|
+
attr_accessor :token
|
24
|
+
|
25
|
+
# true/false
|
26
|
+
attr_accessor :tokenize
|
27
|
+
|
28
|
+
def to_h
|
29
|
+
hash = super
|
30
|
+
add_to_hash(hash, 'expirationPeriod', @expiration_period)
|
31
|
+
add_to_hash(hash, 'recurringPaymentSequenceIndicator', @recurring_payment_sequence_indicator)
|
32
|
+
add_to_hash(hash, 'requiresApproval', @requires_approval)
|
33
|
+
add_to_hash(hash, 'token', @token)
|
34
|
+
add_to_hash(hash, 'tokenize', @tokenize)
|
35
|
+
hash
|
36
|
+
end
|
37
|
+
|
38
|
+
def from_hash(hash)
|
39
|
+
super
|
40
|
+
if hash.has_key?('expirationPeriod')
|
41
|
+
@expiration_period = hash['expirationPeriod']
|
42
|
+
end
|
43
|
+
if hash.has_key?('recurringPaymentSequenceIndicator')
|
44
|
+
@recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
|
45
|
+
end
|
46
|
+
if hash.has_key?('requiresApproval')
|
47
|
+
@requires_approval = hash['requiresApproval']
|
48
|
+
end
|
49
|
+
if hash.has_key?('token')
|
50
|
+
@token = hash['token']
|
51
|
+
end
|
52
|
+
if hash.has_key?('tokenize')
|
53
|
+
@tokenize = hash['tokenize']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -2,13 +2,13 @@
|
|
2
2
|
# This class was auto-generated from the API references found at
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
|
-
require 'ingenico/connect/sdk/domain/payment/
|
5
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_bank_transfer_payment_method_specific_input'
|
6
6
|
|
7
7
|
module Ingenico::Connect::SDK
|
8
8
|
module Domain
|
9
9
|
module Payment
|
10
10
|
|
11
|
-
class BankTransferPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::
|
11
|
+
class BankTransferPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::AbstractBankTransferPaymentMethodSpecificInput
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
data/lib/ingenico/connect/sdk/domain/payment/bank_transfer_payment_method_specific_input_base.rb
CHANGED
@@ -2,29 +2,13 @@
|
|
2
2
|
# This class was auto-generated from the API references found at
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
|
-
require 'ingenico/connect/sdk/domain/
|
5
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_bank_transfer_payment_method_specific_input'
|
6
6
|
|
7
7
|
module Ingenico::Connect::SDK
|
8
8
|
module Domain
|
9
9
|
module Payment
|
10
10
|
|
11
|
-
class BankTransferPaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::
|
12
|
-
|
13
|
-
# String
|
14
|
-
attr_accessor :additional_reference
|
15
|
-
|
16
|
-
def to_h
|
17
|
-
hash = super
|
18
|
-
add_to_hash(hash, 'additionalReference', @additional_reference)
|
19
|
-
hash
|
20
|
-
end
|
21
|
-
|
22
|
-
def from_hash(hash)
|
23
|
-
super
|
24
|
-
if hash.has_key?('additionalReference')
|
25
|
-
@additional_reference = hash['additionalReference']
|
26
|
-
end
|
27
|
-
end
|
11
|
+
class BankTransferPaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::Payment::AbstractBankTransferPaymentMethodSpecificInput
|
28
12
|
end
|
29
13
|
end
|
30
14
|
end
|
@@ -3,14 +3,14 @@
|
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/domain/definitions/card'
|
6
|
-
require 'ingenico/connect/sdk/domain/payment/
|
6
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_card_payment_method_specific_input'
|
7
7
|
require 'ingenico/connect/sdk/domain/payment/external_cardholder_authentication_data'
|
8
8
|
|
9
9
|
module Ingenico::Connect::SDK
|
10
10
|
module Domain
|
11
11
|
module Payment
|
12
12
|
|
13
|
-
class CardPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::
|
13
|
+
class CardPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::AbstractCardPaymentMethodSpecificInput
|
14
14
|
|
15
15
|
# {Ingenico::Connect::SDK::Domain::Definitions::Card}
|
16
16
|
attr_accessor :card
|
@@ -2,99 +2,13 @@
|
|
2
2
|
# This class was auto-generated from the API references found at
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
|
-
require 'ingenico/connect/sdk/domain/
|
5
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_card_payment_method_specific_input'
|
6
6
|
|
7
7
|
module Ingenico::Connect::SDK
|
8
8
|
module Domain
|
9
9
|
module Payment
|
10
10
|
|
11
|
-
class CardPaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::
|
12
|
-
|
13
|
-
# String
|
14
|
-
attr_accessor :authorization_mode
|
15
|
-
|
16
|
-
# String
|
17
|
-
attr_accessor :customer_reference
|
18
|
-
|
19
|
-
# String
|
20
|
-
attr_accessor :recurring_payment_sequence_indicator
|
21
|
-
|
22
|
-
# true/false
|
23
|
-
attr_accessor :requires_approval
|
24
|
-
|
25
|
-
# true/false
|
26
|
-
attr_accessor :skip_authentication
|
27
|
-
|
28
|
-
# true/false
|
29
|
-
attr_accessor :skip_fraud_service
|
30
|
-
|
31
|
-
# String
|
32
|
-
attr_accessor :token
|
33
|
-
|
34
|
-
# true/false
|
35
|
-
attr_accessor :tokenize
|
36
|
-
|
37
|
-
# String
|
38
|
-
attr_accessor :transaction_channel
|
39
|
-
|
40
|
-
# String
|
41
|
-
attr_accessor :unscheduled_card_on_file_indicator
|
42
|
-
|
43
|
-
# String
|
44
|
-
attr_accessor :unscheduled_card_on_file_requestor
|
45
|
-
|
46
|
-
def to_h
|
47
|
-
hash = super
|
48
|
-
add_to_hash(hash, 'authorizationMode', @authorization_mode)
|
49
|
-
add_to_hash(hash, 'customerReference', @customer_reference)
|
50
|
-
add_to_hash(hash, 'recurringPaymentSequenceIndicator', @recurring_payment_sequence_indicator)
|
51
|
-
add_to_hash(hash, 'requiresApproval', @requires_approval)
|
52
|
-
add_to_hash(hash, 'skipAuthentication', @skip_authentication)
|
53
|
-
add_to_hash(hash, 'skipFraudService', @skip_fraud_service)
|
54
|
-
add_to_hash(hash, 'token', @token)
|
55
|
-
add_to_hash(hash, 'tokenize', @tokenize)
|
56
|
-
add_to_hash(hash, 'transactionChannel', @transaction_channel)
|
57
|
-
add_to_hash(hash, 'unscheduledCardOnFileIndicator', @unscheduled_card_on_file_indicator)
|
58
|
-
add_to_hash(hash, 'unscheduledCardOnFileRequestor', @unscheduled_card_on_file_requestor)
|
59
|
-
hash
|
60
|
-
end
|
61
|
-
|
62
|
-
def from_hash(hash)
|
63
|
-
super
|
64
|
-
if hash.has_key?('authorizationMode')
|
65
|
-
@authorization_mode = hash['authorizationMode']
|
66
|
-
end
|
67
|
-
if hash.has_key?('customerReference')
|
68
|
-
@customer_reference = hash['customerReference']
|
69
|
-
end
|
70
|
-
if hash.has_key?('recurringPaymentSequenceIndicator')
|
71
|
-
@recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
|
72
|
-
end
|
73
|
-
if hash.has_key?('requiresApproval')
|
74
|
-
@requires_approval = hash['requiresApproval']
|
75
|
-
end
|
76
|
-
if hash.has_key?('skipAuthentication')
|
77
|
-
@skip_authentication = hash['skipAuthentication']
|
78
|
-
end
|
79
|
-
if hash.has_key?('skipFraudService')
|
80
|
-
@skip_fraud_service = hash['skipFraudService']
|
81
|
-
end
|
82
|
-
if hash.has_key?('token')
|
83
|
-
@token = hash['token']
|
84
|
-
end
|
85
|
-
if hash.has_key?('tokenize')
|
86
|
-
@tokenize = hash['tokenize']
|
87
|
-
end
|
88
|
-
if hash.has_key?('transactionChannel')
|
89
|
-
@transaction_channel = hash['transactionChannel']
|
90
|
-
end
|
91
|
-
if hash.has_key?('unscheduledCardOnFileIndicator')
|
92
|
-
@unscheduled_card_on_file_indicator = hash['unscheduledCardOnFileIndicator']
|
93
|
-
end
|
94
|
-
if hash.has_key?('unscheduledCardOnFileRequestor')
|
95
|
-
@unscheduled_card_on_file_requestor = hash['unscheduledCardOnFileRequestor']
|
96
|
-
end
|
97
|
-
end
|
11
|
+
class CardPaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::Payment::AbstractCardPaymentMethodSpecificInput
|
98
12
|
end
|
99
13
|
end
|
100
14
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# This class was auto-generated from the API references found at
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
|
-
require 'ingenico/connect/sdk/domain/payment/
|
5
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_cash_payment_method_specific_input'
|
6
6
|
require 'ingenico/connect/sdk/domain/payment/cash_payment_product1503_specific_input'
|
7
7
|
require 'ingenico/connect/sdk/domain/payment/cash_payment_product1504_specific_input'
|
8
8
|
|
@@ -10,7 +10,7 @@ module Ingenico::Connect::SDK
|
|
10
10
|
module Domain
|
11
11
|
module Payment
|
12
12
|
|
13
|
-
class CashPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::
|
13
|
+
class CashPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::AbstractCashPaymentMethodSpecificInput
|
14
14
|
|
15
15
|
# {Ingenico::Connect::SDK::Domain::Payment::CashPaymentProduct1503SpecificInput}
|
16
16
|
attr_accessor :payment_product1503_specific_input
|
@@ -2,13 +2,13 @@
|
|
2
2
|
# This class was auto-generated from the API references found at
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
|
-
require 'ingenico/connect/sdk/domain/
|
5
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_cash_payment_method_specific_input'
|
6
6
|
|
7
7
|
module Ingenico::Connect::SDK
|
8
8
|
module Domain
|
9
9
|
module Payment
|
10
10
|
|
11
|
-
class CashPaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::
|
11
|
+
class CashPaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::Payment::AbstractCashPaymentMethodSpecificInput
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -2,14 +2,14 @@
|
|
2
2
|
# This class was auto-generated from the API references found at
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
|
-
require 'ingenico/connect/sdk/domain/payment/
|
5
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_e_invoice_payment_method_specific_input'
|
6
6
|
require 'ingenico/connect/sdk/domain/payment/e_invoice_payment_product9000_specific_input'
|
7
7
|
|
8
8
|
module Ingenico::Connect::SDK
|
9
9
|
module Domain
|
10
10
|
module Payment
|
11
11
|
|
12
|
-
class EInvoicePaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::
|
12
|
+
class EInvoicePaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::AbstractEInvoicePaymentMethodSpecificInput
|
13
13
|
|
14
14
|
# true/false
|
15
15
|
attr_accessor :accepted_terms_and_conditions
|
data/lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_method_specific_input_base.rb
CHANGED
@@ -2,29 +2,13 @@
|
|
2
2
|
# This class was auto-generated from the API references found at
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
|
-
require 'ingenico/connect/sdk/domain/
|
5
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_e_invoice_payment_method_specific_input'
|
6
6
|
|
7
7
|
module Ingenico::Connect::SDK
|
8
8
|
module Domain
|
9
9
|
module Payment
|
10
10
|
|
11
|
-
class EInvoicePaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::
|
12
|
-
|
13
|
-
# true/false
|
14
|
-
attr_accessor :requires_approval
|
15
|
-
|
16
|
-
def to_h
|
17
|
-
hash = super
|
18
|
-
add_to_hash(hash, 'requiresApproval', @requires_approval)
|
19
|
-
hash
|
20
|
-
end
|
21
|
-
|
22
|
-
def from_hash(hash)
|
23
|
-
super
|
24
|
-
if hash.has_key?('requiresApproval')
|
25
|
-
@requires_approval = hash['requiresApproval']
|
26
|
-
end
|
27
|
-
end
|
11
|
+
class EInvoicePaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::Payment::AbstractEInvoicePaymentMethodSpecificInput
|
28
12
|
end
|
29
13
|
end
|
30
14
|
end
|
@@ -2,17 +2,18 @@
|
|
2
2
|
# This class was auto-generated from the API references found at
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
|
-
require 'ingenico/connect/sdk/domain/payment/
|
5
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_redirect_payment_method_specific_input'
|
6
6
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product809_specific_input'
|
7
7
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product816_specific_input'
|
8
8
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product840_specific_input'
|
9
|
+
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product863_specific_input'
|
9
10
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product882_specific_input'
|
10
11
|
|
11
12
|
module Ingenico::Connect::SDK
|
12
13
|
module Domain
|
13
14
|
module Payment
|
14
15
|
|
15
|
-
class RedirectPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::
|
16
|
+
class RedirectPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::AbstractRedirectPaymentMethodSpecificInput
|
16
17
|
|
17
18
|
# true/false
|
18
19
|
attr_accessor :is_recurring
|
@@ -26,6 +27,9 @@ module Ingenico::Connect::SDK
|
|
26
27
|
# {Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct840SpecificInput}
|
27
28
|
attr_accessor :payment_product840_specific_input
|
28
29
|
|
30
|
+
# {Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct863SpecificInput}
|
31
|
+
attr_accessor :payment_product863_specific_input
|
32
|
+
|
29
33
|
# {Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct882SpecificInput}
|
30
34
|
attr_accessor :payment_product882_specific_input
|
31
35
|
|
@@ -38,6 +42,7 @@ module Ingenico::Connect::SDK
|
|
38
42
|
add_to_hash(hash, 'paymentProduct809SpecificInput', @payment_product809_specific_input)
|
39
43
|
add_to_hash(hash, 'paymentProduct816SpecificInput', @payment_product816_specific_input)
|
40
44
|
add_to_hash(hash, 'paymentProduct840SpecificInput', @payment_product840_specific_input)
|
45
|
+
add_to_hash(hash, 'paymentProduct863SpecificInput', @payment_product863_specific_input)
|
41
46
|
add_to_hash(hash, 'paymentProduct882SpecificInput', @payment_product882_specific_input)
|
42
47
|
add_to_hash(hash, 'returnUrl', @return_url)
|
43
48
|
hash
|
@@ -66,6 +71,12 @@ module Ingenico::Connect::SDK
|
|
66
71
|
end
|
67
72
|
@payment_product840_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct840SpecificInput.new_from_hash(hash['paymentProduct840SpecificInput'])
|
68
73
|
end
|
74
|
+
if hash.has_key?('paymentProduct863SpecificInput')
|
75
|
+
if !(hash['paymentProduct863SpecificInput'].is_a? Hash)
|
76
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct863SpecificInput']]
|
77
|
+
end
|
78
|
+
@payment_product863_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct863SpecificInput.new_from_hash(hash['paymentProduct863SpecificInput'])
|
79
|
+
end
|
69
80
|
if hash.has_key?('paymentProduct882SpecificInput')
|
70
81
|
if !(hash['paymentProduct882SpecificInput'].is_a? Hash)
|
71
82
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct882SpecificInput']]
|
@@ -2,57 +2,13 @@
|
|
2
2
|
# This class was auto-generated from the API references found at
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
|
-
require 'ingenico/connect/sdk/domain/
|
5
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_redirect_payment_method_specific_input'
|
6
6
|
|
7
7
|
module Ingenico::Connect::SDK
|
8
8
|
module Domain
|
9
9
|
module Payment
|
10
10
|
|
11
|
-
class RedirectPaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::
|
12
|
-
|
13
|
-
# Integer
|
14
|
-
attr_accessor :expiration_period
|
15
|
-
|
16
|
-
# String
|
17
|
-
attr_accessor :recurring_payment_sequence_indicator
|
18
|
-
|
19
|
-
# true/false
|
20
|
-
attr_accessor :requires_approval
|
21
|
-
|
22
|
-
# String
|
23
|
-
attr_accessor :token
|
24
|
-
|
25
|
-
# true/false
|
26
|
-
attr_accessor :tokenize
|
27
|
-
|
28
|
-
def to_h
|
29
|
-
hash = super
|
30
|
-
add_to_hash(hash, 'expirationPeriod', @expiration_period)
|
31
|
-
add_to_hash(hash, 'recurringPaymentSequenceIndicator', @recurring_payment_sequence_indicator)
|
32
|
-
add_to_hash(hash, 'requiresApproval', @requires_approval)
|
33
|
-
add_to_hash(hash, 'token', @token)
|
34
|
-
add_to_hash(hash, 'tokenize', @tokenize)
|
35
|
-
hash
|
36
|
-
end
|
37
|
-
|
38
|
-
def from_hash(hash)
|
39
|
-
super
|
40
|
-
if hash.has_key?('expirationPeriod')
|
41
|
-
@expiration_period = hash['expirationPeriod']
|
42
|
-
end
|
43
|
-
if hash.has_key?('recurringPaymentSequenceIndicator')
|
44
|
-
@recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
|
45
|
-
end
|
46
|
-
if hash.has_key?('requiresApproval')
|
47
|
-
@requires_approval = hash['requiresApproval']
|
48
|
-
end
|
49
|
-
if hash.has_key?('token')
|
50
|
-
@token = hash['token']
|
51
|
-
end
|
52
|
-
if hash.has_key?('tokenize')
|
53
|
-
@tokenize = hash['tokenize']
|
54
|
-
end
|
55
|
-
end
|
11
|
+
class RedirectPaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::Payment::AbstractRedirectPaymentMethodSpecificInput
|
56
12
|
end
|
57
13
|
end
|
58
14
|
end
|
@@ -0,0 +1,31 @@
|
|
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
|
+
class RedirectPaymentProduct863SpecificInput < Ingenico::Connect::SDK::DataObject
|
12
|
+
|
13
|
+
# String
|
14
|
+
attr_accessor :integration_type
|
15
|
+
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
add_to_hash(hash, 'integrationType', @integration_type)
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
|
22
|
+
def from_hash(hash)
|
23
|
+
super
|
24
|
+
if hash.has_key?('integrationType')
|
25
|
+
@integration_type = hash['integrationType']
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -5,6 +5,9 @@
|
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
6
|
require 'ingenico/connect/sdk/domain/product/account_on_file'
|
7
7
|
require 'ingenico/connect/sdk/domain/product/authentication_indicator'
|
8
|
+
require 'ingenico/connect/sdk/domain/product/payment_product302_specific_data'
|
9
|
+
require 'ingenico/connect/sdk/domain/product/payment_product320_specific_data'
|
10
|
+
require 'ingenico/connect/sdk/domain/product/payment_product863_specific_data'
|
8
11
|
require 'ingenico/connect/sdk/domain/product/payment_product_display_hints'
|
9
12
|
require 'ingenico/connect/sdk/domain/product/payment_product_field'
|
10
13
|
|
@@ -59,6 +62,15 @@ module Ingenico::Connect::SDK
|
|
59
62
|
# String
|
60
63
|
attr_accessor :payment_method
|
61
64
|
|
65
|
+
# {Ingenico::Connect::SDK::Domain::Product::PaymentProduct302SpecificData}
|
66
|
+
attr_accessor :payment_product302_specific_data
|
67
|
+
|
68
|
+
# {Ingenico::Connect::SDK::Domain::Product::PaymentProduct320SpecificData}
|
69
|
+
attr_accessor :payment_product320_specific_data
|
70
|
+
|
71
|
+
# {Ingenico::Connect::SDK::Domain::Product::PaymentProduct863SpecificData}
|
72
|
+
attr_accessor :payment_product863_specific_data
|
73
|
+
|
62
74
|
# String
|
63
75
|
attr_accessor :payment_product_group
|
64
76
|
|
@@ -82,6 +94,9 @@ module Ingenico::Connect::SDK
|
|
82
94
|
add_to_hash(hash, 'minAmount', @min_amount)
|
83
95
|
add_to_hash(hash, 'mobileIntegrationLevel', @mobile_integration_level)
|
84
96
|
add_to_hash(hash, 'paymentMethod', @payment_method)
|
97
|
+
add_to_hash(hash, 'paymentProduct302SpecificData', @payment_product302_specific_data)
|
98
|
+
add_to_hash(hash, 'paymentProduct320SpecificData', @payment_product320_specific_data)
|
99
|
+
add_to_hash(hash, 'paymentProduct863SpecificData', @payment_product863_specific_data)
|
85
100
|
add_to_hash(hash, 'paymentProductGroup', @payment_product_group)
|
86
101
|
add_to_hash(hash, 'usesRedirectionTo3rdParty', @uses_redirection_to3rd_party)
|
87
102
|
hash
|
@@ -152,6 +167,24 @@ module Ingenico::Connect::SDK
|
|
152
167
|
if hash.has_key?('paymentMethod')
|
153
168
|
@payment_method = hash['paymentMethod']
|
154
169
|
end
|
170
|
+
if hash.has_key?('paymentProduct302SpecificData')
|
171
|
+
if !(hash['paymentProduct302SpecificData'].is_a? Hash)
|
172
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct302SpecificData']]
|
173
|
+
end
|
174
|
+
@payment_product302_specific_data = Ingenico::Connect::SDK::Domain::Product::PaymentProduct302SpecificData.new_from_hash(hash['paymentProduct302SpecificData'])
|
175
|
+
end
|
176
|
+
if hash.has_key?('paymentProduct320SpecificData')
|
177
|
+
if !(hash['paymentProduct320SpecificData'].is_a? Hash)
|
178
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificData']]
|
179
|
+
end
|
180
|
+
@payment_product320_specific_data = Ingenico::Connect::SDK::Domain::Product::PaymentProduct320SpecificData.new_from_hash(hash['paymentProduct320SpecificData'])
|
181
|
+
end
|
182
|
+
if hash.has_key?('paymentProduct863SpecificData')
|
183
|
+
if !(hash['paymentProduct863SpecificData'].is_a? Hash)
|
184
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct863SpecificData']]
|
185
|
+
end
|
186
|
+
@payment_product863_specific_data = Ingenico::Connect::SDK::Domain::Product::PaymentProduct863SpecificData.new_from_hash(hash['paymentProduct863SpecificData'])
|
187
|
+
end
|
155
188
|
if hash.has_key?('paymentProductGroup')
|
156
189
|
@payment_product_group = hash['paymentProductGroup']
|
157
190
|
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
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Product
|
10
|
+
|
11
|
+
class PaymentProduct302SpecificData < Ingenico::Connect::SDK::DataObject
|
12
|
+
|
13
|
+
# Array of String
|
14
|
+
attr_accessor :networks
|
15
|
+
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
add_to_hash(hash, 'networks', @networks)
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
|
22
|
+
def from_hash(hash)
|
23
|
+
super
|
24
|
+
if hash.has_key?('networks')
|
25
|
+
if !(hash['networks'].is_a? Array)
|
26
|
+
raise TypeError, "value '%s' is not an Array" % [hash['networks']]
|
27
|
+
end
|
28
|
+
@networks = []
|
29
|
+
hash['networks'].each do |e|
|
30
|
+
@networks << e
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
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
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Product
|
10
|
+
|
11
|
+
class PaymentProduct320SpecificData < Ingenico::Connect::SDK::DataObject
|
12
|
+
|
13
|
+
# Array of String
|
14
|
+
attr_accessor :networks
|
15
|
+
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
add_to_hash(hash, 'networks', @networks)
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
|
22
|
+
def from_hash(hash)
|
23
|
+
super
|
24
|
+
if hash.has_key?('networks')
|
25
|
+
if !(hash['networks'].is_a? Array)
|
26
|
+
raise TypeError, "value '%s' is not an Array" % [hash['networks']]
|
27
|
+
end
|
28
|
+
@networks = []
|
29
|
+
hash['networks'].each do |e|
|
30
|
+
@networks << e
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
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
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Product
|
10
|
+
|
11
|
+
class PaymentProduct863SpecificData < Ingenico::Connect::SDK::DataObject
|
12
|
+
|
13
|
+
# Array of String
|
14
|
+
attr_accessor :integration_types
|
15
|
+
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
add_to_hash(hash, 'integrationTypes', @integration_types)
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
|
22
|
+
def from_hash(hash)
|
23
|
+
super
|
24
|
+
if hash.has_key?('integrationTypes')
|
25
|
+
if !(hash['integrationTypes'].is_a? Array)
|
26
|
+
raise TypeError, "value '%s' is not an Array" % [hash['integrationTypes']]
|
27
|
+
end
|
28
|
+
@integration_types = []
|
29
|
+
hash['integrationTypes'].each do |e|
|
30
|
+
@integration_types << e
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -5,7 +5,7 @@ module Ingenico::Connect::SDK
|
|
5
5
|
|
6
6
|
# Manages metadata about the server using the SDK
|
7
7
|
class MetaDataProvider
|
8
|
-
@@SDK_VERSION = '1.
|
8
|
+
@@SDK_VERSION = '1.27.0'
|
9
9
|
@@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'
|
10
10
|
@@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key',
|
11
11
|
'Date', 'Content-Type', 'Authorization'].sort!.freeze
|
@@ -17,13 +17,13 @@ module Ingenico::Connect::SDK
|
|
17
17
|
|
18
18
|
private
|
19
19
|
|
20
|
-
def add_param(request_parameters, name, value, allow_collection =
|
20
|
+
def add_param(request_parameters, name, value, allow_collection = true)
|
21
21
|
if value.is_a?(String) || value.is_a?(Integer) || value.class == TrueClass ||
|
22
22
|
value.class == FalseClass
|
23
23
|
request_parameters.push(RequestParam.new(name, value.to_s))
|
24
24
|
elsif allow_collection && value.class == Array
|
25
25
|
value.each { |element|
|
26
|
-
add_param(request_parameters, name, element,
|
26
|
+
add_param(request_parameters, name, element, false)
|
27
27
|
}
|
28
28
|
elsif !value.nil?
|
29
29
|
raise ArgumentError.new("Unsupported request parameter type: #{value.class}")
|
data/spec/integration_setup.rb
CHANGED
@@ -2,12 +2,12 @@ require 'spec_helper'
|
|
2
2
|
require 'yaml'
|
3
3
|
|
4
4
|
module Integration
|
5
|
-
MERCHANT_ID = ENV['
|
6
|
-
API_KEY_ID = ENV['
|
7
|
-
SECRET_API_KEY = ENV['
|
8
|
-
raise 'could not access environment variable
|
9
|
-
raise 'could not access environment variable
|
10
|
-
raise 'could not access environment variable
|
5
|
+
MERCHANT_ID = ENV['connect_api_merchantId']
|
6
|
+
API_KEY_ID = ENV['connect_api_apiKeyId']
|
7
|
+
SECRET_API_KEY = ENV['connect_api_secretApiKey']
|
8
|
+
raise 'could not access environment variable connect_api_merchantId required for testing' unless MERCHANT_ID
|
9
|
+
raise 'could not access environment variable connect_api_apiKeyId required for testing' unless API_KEY_ID
|
10
|
+
raise 'could not access environment variable connect_api_secretApiKey required for testing' unless SECRET_API_KEY
|
11
11
|
PROPERTIES_URI = File.absolute_path(File.join(__FILE__, '../fixtures/resources/properties.yml'))
|
12
12
|
PROPERTIES_URI_PROXY = File.absolute_path(File.join(__FILE__, '../fixtures/resources/properties.proxy.yml'))
|
13
13
|
|
@@ -27,10 +27,10 @@ module Integration
|
|
27
27
|
api_key_id: API_KEY_ID,
|
28
28
|
secret_api_key: SECRET_API_KEY,
|
29
29
|
max_connections: max_connections)
|
30
|
-
host = ENV['
|
30
|
+
host = ENV['connect_api_endpoint_host']
|
31
31
|
if host
|
32
|
-
scheme = ENV.fetch('
|
33
|
-
port = ENV.fetch('
|
32
|
+
scheme = ENV.fetch('connect_api_endpoint_scheme', 'https')
|
33
|
+
port = ENV.fetch('connect_api_endpoint_port', -1)
|
34
34
|
configuration.api_endpoint = create_uri(scheme, host, port)
|
35
35
|
end
|
36
36
|
configuration
|
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: 1.
|
4
|
+
version: 1.27.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: 2018-10-
|
11
|
+
date: 2018-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -265,7 +265,12 @@ files:
|
|
265
265
|
- lib/ingenico/connect/sdk/domain/mandates/mandate_redirect_data.rb
|
266
266
|
- lib/ingenico/connect/sdk/domain/mandates/mandate_response.rb
|
267
267
|
- lib/ingenico/connect/sdk/domain/metadata/shopping_cart_extension.rb
|
268
|
+
- lib/ingenico/connect/sdk/domain/payment/abstract_bank_transfer_payment_method_specific_input.rb
|
269
|
+
- lib/ingenico/connect/sdk/domain/payment/abstract_card_payment_method_specific_input.rb
|
270
|
+
- lib/ingenico/connect/sdk/domain/payment/abstract_cash_payment_method_specific_input.rb
|
271
|
+
- lib/ingenico/connect/sdk/domain/payment/abstract_e_invoice_payment_method_specific_input.rb
|
268
272
|
- lib/ingenico/connect/sdk/domain/payment/abstract_payment_method_specific_output.rb
|
273
|
+
- lib/ingenico/connect/sdk/domain/payment/abstract_redirect_payment_method_specific_input.rb
|
269
274
|
- lib/ingenico/connect/sdk/domain/payment/abstract_sepa_direct_debit_payment_method_specific_input.rb
|
270
275
|
- lib/ingenico/connect/sdk/domain/payment/abstract_sepa_direct_debit_payment_product771_specific_input.rb
|
271
276
|
- lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb
|
@@ -357,6 +362,7 @@ files:
|
|
357
362
|
- lib/ingenico/connect/sdk/domain/payment/redirect_payment_product809_specific_input.rb
|
358
363
|
- lib/ingenico/connect/sdk/domain/payment/redirect_payment_product816_specific_input.rb
|
359
364
|
- lib/ingenico/connect/sdk/domain/payment/redirect_payment_product840_specific_input.rb
|
365
|
+
- lib/ingenico/connect/sdk/domain/payment/redirect_payment_product863_specific_input.rb
|
360
366
|
- lib/ingenico/connect/sdk/domain/payment/redirect_payment_product882_specific_input.rb
|
361
367
|
- lib/ingenico/connect/sdk/domain/payment/refund_bank_method_specific_output.rb
|
362
368
|
- lib/ingenico/connect/sdk/domain/payment/refund_card_method_specific_output.rb
|
@@ -405,6 +411,9 @@ files:
|
|
405
411
|
- lib/ingenico/connect/sdk/domain/product/label_template_element.rb
|
406
412
|
- lib/ingenico/connect/sdk/domain/product/length_validator.rb
|
407
413
|
- lib/ingenico/connect/sdk/domain/product/payment_product.rb
|
414
|
+
- lib/ingenico/connect/sdk/domain/product/payment_product302_specific_data.rb
|
415
|
+
- lib/ingenico/connect/sdk/domain/product/payment_product320_specific_data.rb
|
416
|
+
- lib/ingenico/connect/sdk/domain/product/payment_product863_specific_data.rb
|
408
417
|
- lib/ingenico/connect/sdk/domain/product/payment_product_display_hints.rb
|
409
418
|
- lib/ingenico/connect/sdk/domain/product/payment_product_field.rb
|
410
419
|
- lib/ingenico/connect/sdk/domain/product/payment_product_field_data_restrictions.rb
|