connect-sdk-ruby 2.4.0 → 2.5.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/lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb +8 -0
- data/lib/ingenico/connect/sdk/domain/token/create_token_response.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/token/token_response.rb +7 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a4c922daf1b8fd19c5997b498998956b60fcc927b4750a801c5a8ae19819334
|
4
|
+
data.tar.gz: 183483a57dda0a54c7031b68e0f9aca7bbda18a3a5f24a22a341fc9899c3cc30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b760a517add39302bec09e15183ab03ec10c84b9c418ec1ca8b063f9478a1f3fc7bb57de431d9e1f071a7721e6630efbdeb391e395e4a82ac63e1751d0227221
|
7
|
+
data.tar.gz: 9efbf9b3a88f2b3cde0e0028b17f80b7561acbd0a394df6c3178d049f44405a0ec92af8e79686e8b30aa3394f564768eeafe85fd5e22c0261815b52b05679236
|
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.5.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}
|
@@ -11,11 +11,14 @@ module Ingenico::Connect::SDK
|
|
11
11
|
module Domain
|
12
12
|
module Payment
|
13
13
|
|
14
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::Address] billing_address
|
14
15
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840CustomerAccount] customer_account
|
15
16
|
# @attr [Ingenico::Connect::SDK::Domain::Definitions::Address] customer_address
|
16
17
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::ProtectionEligibility] protection_eligibility
|
17
18
|
class PaymentProduct840SpecificOutput < Ingenico::Connect::SDK::DataObject
|
18
19
|
|
20
|
+
attr_accessor :billing_address
|
21
|
+
|
19
22
|
attr_accessor :customer_account
|
20
23
|
|
21
24
|
attr_accessor :customer_address
|
@@ -25,6 +28,7 @@ module Ingenico::Connect::SDK
|
|
25
28
|
# @return (Hash)
|
26
29
|
def to_h
|
27
30
|
hash = super
|
31
|
+
hash['billingAddress'] = @billing_address.to_h unless @billing_address.nil?
|
28
32
|
hash['customerAccount'] = @customer_account.to_h unless @customer_account.nil?
|
29
33
|
hash['customerAddress'] = @customer_address.to_h unless @customer_address.nil?
|
30
34
|
hash['protectionEligibility'] = @protection_eligibility.to_h unless @protection_eligibility.nil?
|
@@ -33,6 +37,10 @@ module Ingenico::Connect::SDK
|
|
33
37
|
|
34
38
|
def from_hash(hash)
|
35
39
|
super
|
40
|
+
if hash.has_key? 'billingAddress'
|
41
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['billingAddress']] unless hash['billingAddress'].is_a? Hash
|
42
|
+
@billing_address = Ingenico::Connect::SDK::Domain::Definitions::Address.new_from_hash(hash['billingAddress'])
|
43
|
+
end
|
36
44
|
if hash.has_key? 'customerAccount'
|
37
45
|
raise TypeError, "value '%s' is not a Hash" % [hash['customerAccount']] unless hash['customerAccount'].is_a? Hash
|
38
46
|
@customer_account = Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840CustomerAccount.new_from_hash(hash['customerAccount'])
|
@@ -9,17 +9,21 @@ module Ingenico::Connect::SDK
|
|
9
9
|
module Token
|
10
10
|
|
11
11
|
# @attr [true/false] is_new_token
|
12
|
+
# @attr [String] original_payment_id
|
12
13
|
# @attr [String] token
|
13
14
|
class CreateTokenResponse < Ingenico::Connect::SDK::DataObject
|
14
15
|
|
15
16
|
attr_accessor :is_new_token
|
16
17
|
|
18
|
+
attr_accessor :original_payment_id
|
19
|
+
|
17
20
|
attr_accessor :token
|
18
21
|
|
19
22
|
# @return (Hash)
|
20
23
|
def to_h
|
21
24
|
hash = super
|
22
25
|
hash['isNewToken'] = @is_new_token unless @is_new_token.nil?
|
26
|
+
hash['originalPaymentId'] = @original_payment_id unless @original_payment_id.nil?
|
23
27
|
hash['token'] = @token unless @token.nil?
|
24
28
|
hash
|
25
29
|
end
|
@@ -29,6 +33,9 @@ module Ingenico::Connect::SDK
|
|
29
33
|
if hash.has_key? 'isNewToken'
|
30
34
|
@is_new_token = hash['isNewToken']
|
31
35
|
end
|
36
|
+
if hash.has_key? 'originalPaymentId'
|
37
|
+
@original_payment_id = hash['originalPaymentId']
|
38
|
+
end
|
32
39
|
if hash.has_key? 'token'
|
33
40
|
@token = hash['token']
|
34
41
|
end
|
@@ -16,6 +16,7 @@ module Ingenico::Connect::SDK
|
|
16
16
|
# @attr [Ingenico::Connect::SDK::Domain::Token::TokenEWallet] e_wallet
|
17
17
|
# @attr [String] id
|
18
18
|
# @attr [Ingenico::Connect::SDK::Domain::Token::TokenNonSepaDirectDebit] non_sepa_direct_debit
|
19
|
+
# @attr [String] original_payment_id
|
19
20
|
# @attr [Integer] payment_product_id
|
20
21
|
# @attr [Ingenico::Connect::SDK::Domain::Token::TokenSepaDirectDebit] sepa_direct_debit
|
21
22
|
class TokenResponse < Ingenico::Connect::SDK::DataObject
|
@@ -28,6 +29,8 @@ module Ingenico::Connect::SDK
|
|
28
29
|
|
29
30
|
attr_accessor :non_sepa_direct_debit
|
30
31
|
|
32
|
+
attr_accessor :original_payment_id
|
33
|
+
|
31
34
|
attr_accessor :payment_product_id
|
32
35
|
|
33
36
|
attr_accessor :sepa_direct_debit
|
@@ -39,6 +42,7 @@ module Ingenico::Connect::SDK
|
|
39
42
|
hash['eWallet'] = @e_wallet.to_h unless @e_wallet.nil?
|
40
43
|
hash['id'] = @id unless @id.nil?
|
41
44
|
hash['nonSepaDirectDebit'] = @non_sepa_direct_debit.to_h unless @non_sepa_direct_debit.nil?
|
45
|
+
hash['originalPaymentId'] = @original_payment_id unless @original_payment_id.nil?
|
42
46
|
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
43
47
|
hash['sepaDirectDebit'] = @sepa_direct_debit.to_h unless @sepa_direct_debit.nil?
|
44
48
|
hash
|
@@ -61,6 +65,9 @@ module Ingenico::Connect::SDK
|
|
61
65
|
raise TypeError, "value '%s' is not a Hash" % [hash['nonSepaDirectDebit']] unless hash['nonSepaDirectDebit'].is_a? Hash
|
62
66
|
@non_sepa_direct_debit = Ingenico::Connect::SDK::Domain::Token::TokenNonSepaDirectDebit.new_from_hash(hash['nonSepaDirectDebit'])
|
63
67
|
end
|
68
|
+
if hash.has_key? 'originalPaymentId'
|
69
|
+
@original_payment_id = hash['originalPaymentId']
|
70
|
+
end
|
64
71
|
if hash.has_key? 'paymentProductId'
|
65
72
|
@payment_product_id = hash['paymentProductId']
|
66
73
|
end
|
@@ -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.5.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.5.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: 2019-
|
11
|
+
date: 2019-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|