direct-sdk-ruby 1.6.0 → 1.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb17a610c0fb3905e0e3d7dd8e6db33920a263eaeeddd2d78d40e3ffa598f6c2
4
- data.tar.gz: e154fca29cce669b3334129151efc2d89210c43531c46d7d61474b2f7309e9f3
3
+ metadata.gz: d760a3e89a21e37005358485947cfb7ff4feb53563df85c96b487d808e360bb1
4
+ data.tar.gz: 71570745e91763569f1e74c2d09c6b453db1956ab781b6c8a48a3db460ef3e7e
5
5
  SHA512:
6
- metadata.gz: d828e4c95a47a72161750b7886a0458c8bffe03f4d80d65c0518ff23b34718f8a1bed63a247e76d6b99f5fa87a2b07a9c585bdf45e6e3c235ea9a04d9e570f2e
7
- data.tar.gz: 90f994b1b9f1f47064355a963cc02570910dbf35789e77d3b71bcb49ed63d194e60971104a57077d6f9c4febcc2da19939c911c2e65d3f252fcdac3cabee49fe
6
+ metadata.gz: 9e243365cdf7340eaf4650df349a95b4a202b075088ac832a0ff90ad680a3f8ece59218011adce74025d568b195a17fb4ea33d9005549dc3c10325df5143118d
7
+ data.tar.gz: 5065a5f36e56f65680ece1a92be625b87dfc1005cdb4332a88ddbd542e235bb28997c93cb79d0d35474b8bb9eb45a0dc20d5c29fb6266bf3004b172addba775f
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'direct-sdk-ruby'
3
- spec.version = '1.6.0'
3
+ spec.version = '1.7.0'
4
4
  spec.authors = ['Ingenico ePayments']
5
5
  spec.email = ['60233882+ingenico-dev-team@users.noreply.github.com']
6
6
  spec.summary = %q{SDK to communicate with the Ingenico ePayments platform using the Ingenico Direct Server API}
@@ -7,10 +7,12 @@ require 'ingenico/direct/sdk/data_object'
7
7
  module Ingenico::Direct::SDK
8
8
  module Domain
9
9
 
10
+ # @attr [Array<String>] expired_card_tokens
10
11
  # @attr [String] hosted_tokenization_id
11
12
  # @attr [Array<String>] invalid_tokens
12
13
  # @attr [String] partial_redirect_url
13
14
  class CreateHostedTokenizationResponse < Ingenico::Direct::SDK::DataObject
15
+ attr_accessor :expired_card_tokens
14
16
  attr_accessor :hosted_tokenization_id
15
17
  attr_accessor :invalid_tokens
16
18
  attr_accessor :partial_redirect_url
@@ -18,6 +20,7 @@ module Ingenico::Direct::SDK
18
20
  # @return (Hash)
19
21
  def to_h
20
22
  hash = super
23
+ hash['expiredCardTokens'] = @expired_card_tokens unless @expired_card_tokens.nil?
21
24
  hash['hostedTokenizationId'] = @hosted_tokenization_id unless @hosted_tokenization_id.nil?
22
25
  hash['invalidTokens'] = @invalid_tokens unless @invalid_tokens.nil?
23
26
  hash['partialRedirectUrl'] = @partial_redirect_url unless @partial_redirect_url.nil?
@@ -26,6 +29,13 @@ module Ingenico::Direct::SDK
26
29
 
27
30
  def from_hash(hash)
28
31
  super
32
+ if hash.key? 'expiredCardTokens'
33
+ raise TypeError, "value '%s' is not an Array" % [hash['expiredCardTokens']] unless hash['expiredCardTokens'].is_a? Array
34
+ @expired_card_tokens = []
35
+ hash['expiredCardTokens'].each do |e|
36
+ @expired_card_tokens << e
37
+ end
38
+ end
29
39
  @hosted_tokenization_id = hash['hostedTokenizationId'] if hash.key? 'hostedTokenizationId'
30
40
  if hash.key? 'invalidTokens'
31
41
  raise TypeError, "value '%s' is not an Array" % [hash['invalidTokens']] unless hash['invalidTokens'].is_a? Array
@@ -8,15 +8,18 @@ module Ingenico::Direct::SDK
8
8
  module Domain
9
9
 
10
10
  # @attr [String] descriptor
11
+ # @attr [String] merchant_parameters
11
12
  # @attr [String] merchant_reference
12
13
  class OrderReferences < Ingenico::Direct::SDK::DataObject
13
14
  attr_accessor :descriptor
15
+ attr_accessor :merchant_parameters
14
16
  attr_accessor :merchant_reference
15
17
 
16
18
  # @return (Hash)
17
19
  def to_h
18
20
  hash = super
19
21
  hash['descriptor'] = @descriptor unless @descriptor.nil?
22
+ hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
20
23
  hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
21
24
  hash
22
25
  end
@@ -24,6 +27,7 @@ module Ingenico::Direct::SDK
24
27
  def from_hash(hash)
25
28
  super
26
29
  @descriptor = hash['descriptor'] if hash.key? 'descriptor'
30
+ @merchant_parameters = hash['merchantParameters'] if hash.key? 'merchantParameters'
27
31
  @merchant_reference = hash['merchantReference'] if hash.key? 'merchantReference'
28
32
  end
29
33
  end
@@ -7,19 +7,23 @@ require 'ingenico/direct/sdk/data_object'
7
7
  module Ingenico::Direct::SDK
8
8
  module Domain
9
9
 
10
+ # @attr [String] merchant_parameters
10
11
  # @attr [String] merchant_reference
11
12
  class PaymentReferences < Ingenico::Direct::SDK::DataObject
13
+ attr_accessor :merchant_parameters
12
14
  attr_accessor :merchant_reference
13
15
 
14
16
  # @return (Hash)
15
17
  def to_h
16
18
  hash = super
19
+ hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
17
20
  hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
18
21
  hash
19
22
  end
20
23
 
21
24
  def from_hash(hash)
22
25
  super
26
+ @merchant_parameters = hash['merchantParameters'] if hash.key? 'merchantParameters'
23
27
  @merchant_reference = hash['merchantReference'] if hash.key? 'merchantReference'
24
28
  end
25
29
  end
@@ -25,22 +25,16 @@ module Ingenico::Direct::SDK
25
25
  super(parent, path_context)
26
26
  end
27
27
 
28
- # Resource /v2/!{merchantId}/products
29
- # @return [Ingenico::Direct::SDK::Merchant::Products::ProductsClient]
30
- def products
31
- Ingenico::Direct::SDK::Merchant::Products::ProductsClient.new(self, nil)
32
- end
33
-
34
- # Resource /v2/!{merchantId}/sessions
35
- # @return [Ingenico::Direct::SDK::Merchant::Sessions::SessionsClient]
36
- def sessions
37
- Ingenico::Direct::SDK::Merchant::Sessions::SessionsClient.new(self, nil)
28
+ # Resource /v2/!{merchantId}/hostedcheckouts
29
+ # @return [Ingenico::Direct::SDK::Merchant::HostedCheckout::HostedCheckoutClient]
30
+ def hosted_checkout
31
+ Ingenico::Direct::SDK::Merchant::HostedCheckout::HostedCheckoutClient.new(self, nil)
38
32
  end
39
33
 
40
- # Resource /v2/!{merchantId}/payouts
41
- # @return [Ingenico::Direct::SDK::Merchant::Payouts::PayoutsClient]
42
- def payouts
43
- Ingenico::Direct::SDK::Merchant::Payouts::PayoutsClient.new(self, nil)
34
+ # Resource /v2/!{merchantId}/hostedtokenizations
35
+ # @return [Ingenico::Direct::SDK::Merchant::HostedTokenization::HostedTokenizationClient]
36
+ def hosted_tokenization
37
+ Ingenico::Direct::SDK::Merchant::HostedTokenization::HostedTokenizationClient.new(self, nil)
44
38
  end
45
39
 
46
40
  # Resource /v2/!{merchantId}/payments
@@ -49,10 +43,10 @@ module Ingenico::Direct::SDK
49
43
  Ingenico::Direct::SDK::Merchant::Payments::PaymentsClient.new(self, nil)
50
44
  end
51
45
 
52
- # Resource /v2/!{merchantId}/services
53
- # @return [Ingenico::Direct::SDK::Merchant::Services::ServicesClient]
54
- def services
55
- Ingenico::Direct::SDK::Merchant::Services::ServicesClient.new(self, nil)
46
+ # Resource /v2/!{merchantId}/payouts
47
+ # @return [Ingenico::Direct::SDK::Merchant::Payouts::PayoutsClient]
48
+ def payouts
49
+ Ingenico::Direct::SDK::Merchant::Payouts::PayoutsClient.new(self, nil)
56
50
  end
57
51
 
58
52
  # Resource /v2/!{merchantId}/productgroups
@@ -61,10 +55,22 @@ module Ingenico::Direct::SDK
61
55
  Ingenico::Direct::SDK::Merchant::ProductGroups::ProductGroupsClient.new(self, nil)
62
56
  end
63
57
 
64
- # Resource /v2/!{merchantId}/hostedtokenizations
65
- # @return [Ingenico::Direct::SDK::Merchant::HostedTokenization::HostedTokenizationClient]
66
- def hosted_tokenization
67
- Ingenico::Direct::SDK::Merchant::HostedTokenization::HostedTokenizationClient.new(self, nil)
58
+ # Resource /v2/!{merchantId}/products
59
+ # @return [Ingenico::Direct::SDK::Merchant::Products::ProductsClient]
60
+ def products
61
+ Ingenico::Direct::SDK::Merchant::Products::ProductsClient.new(self, nil)
62
+ end
63
+
64
+ # Resource /v2/!{merchantId}/services
65
+ # @return [Ingenico::Direct::SDK::Merchant::Services::ServicesClient]
66
+ def services
67
+ Ingenico::Direct::SDK::Merchant::Services::ServicesClient.new(self, nil)
68
+ end
69
+
70
+ # Resource /v2/!{merchantId}/sessions
71
+ # @return [Ingenico::Direct::SDK::Merchant::Sessions::SessionsClient]
72
+ def sessions
73
+ Ingenico::Direct::SDK::Merchant::Sessions::SessionsClient.new(self, nil)
68
74
  end
69
75
 
70
76
  # Resource /v2/!{merchantId}/tokens
@@ -72,12 +78,6 @@ module Ingenico::Direct::SDK
72
78
  def tokens
73
79
  Ingenico::Direct::SDK::Merchant::Tokens::TokensClient.new(self, nil)
74
80
  end
75
-
76
- # Resource /v2/!{merchantId}/hostedcheckouts
77
- # @return [Ingenico::Direct::SDK::Merchant::HostedCheckout::HostedCheckoutClient]
78
- def hosted_checkout
79
- Ingenico::Direct::SDK::Merchant::HostedCheckout::HostedCheckoutClient.new(self, nil)
80
- end
81
81
  end
82
82
  end
83
83
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: direct-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.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: 2021-10-01 00:00:00.000000000 Z
11
+ date: 2021-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient