onlinepayments-sdk-ruby 7.3.0 → 7.4.1

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: a0b52c80c4be84834cd391c9921e283f7880a133d528702f1633fc5b8774e6a9
4
- data.tar.gz: 00570bddfd30d757ddce8255519661643a8612224ff4fca7dcaa098e19e31b7b
3
+ metadata.gz: 93b6f25e1127bae1954090272d755ad7029c6a557908bc59110bc78930d1f2ea
4
+ data.tar.gz: 75180a9a49109699f4aa10a01e07de49e5fe8f7e9daf942c63ae4f2c024ff734
5
5
  SHA512:
6
- metadata.gz: 4770f3e35ef811e3f1f758360d43a7bd149c2a00d16a96d6edcd16f66770ae3a74782c289d462b2775046f940fb7694c8416bb0bd2097b70156f496f5d14713e
7
- data.tar.gz: 22a31731e385d8ad4229303099189e5866bf616b18e5a8a4d18a8ebe145edeb53ff7101173a270040b15e06795b4a7dba6afb420a89e9223f9989c29dc35fb65
6
+ metadata.gz: c3bef9c13d7fed5205c25d22db07d948e3ed39f6a9f430cbbe691adb6823e2a879dc1e65a5b5c1ed25090c9c71adced560292161d4478e8d90b155f6b752e713
7
+ data.tar.gz: 71175493cc9a7e9a1d742af3e3ab7b4a7406b9686fc06db08b2feae4b38dd137bee65d1a899c4496e8f07892ecfbebb5ce87f083108cf7aa73d1951c89d2ca96
@@ -13,7 +13,7 @@ module OnlinePayments
13
13
  class MetadataProvider
14
14
  private
15
15
 
16
- SDK_VERSION = '7.3.0'.freeze
16
+ SDK_VERSION = '7.4.1'.freeze
17
17
  SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'.freeze
18
18
  PROHIBITED_HEADERS = [SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key', 'Date', 'Content-Type', 'Authorization'].sort!.freeze
19
19
  CHARSET = 'utf-8'.freeze
@@ -5,6 +5,7 @@ require 'onlinepayments/sdk/domain/amount_of_money'
5
5
  require 'onlinepayments/sdk/domain/data_object'
6
6
  require 'onlinepayments/sdk/domain/line_item_detail'
7
7
  require 'onlinepayments/sdk/domain/operation_payment_references'
8
+ require 'onlinepayments/sdk/domain/shipping_detail'
8
9
 
9
10
  module OnlinePayments
10
11
  module SDK
@@ -13,6 +14,7 @@ module OnlinePayments
13
14
  # @attr [true/false] is_final
14
15
  # @attr [Array<OnlinePayments::SDK::Domain::LineItemDetail>] line_item_details
15
16
  # @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences] operation_references
17
+ # @attr [OnlinePayments::SDK::Domain::ShippingDetail] shipping
16
18
  class CancelPaymentRequest < OnlinePayments::SDK::Domain::DataObject
17
19
 
18
20
  attr_accessor :amount_of_money
@@ -23,6 +25,8 @@ module OnlinePayments
23
25
 
24
26
  attr_accessor :operation_references
25
27
 
28
+ attr_accessor :shipping
29
+
26
30
  # @return (Hash)
27
31
  def to_h
28
32
  hash = super
@@ -30,6 +34,7 @@ module OnlinePayments
30
34
  hash['isFinal'] = @is_final unless @is_final.nil?
31
35
  hash['lineItemDetails'] = @line_item_details.collect{|val| val.to_h} unless @line_item_details.nil?
32
36
  hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
37
+ hash['shipping'] = @shipping.to_h unless @shipping.nil?
33
38
  hash
34
39
  end
35
40
 
@@ -53,6 +58,10 @@ module OnlinePayments
53
58
  raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
54
59
  @operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
55
60
  end
61
+ if hash.has_key? 'shipping'
62
+ raise TypeError, "value '%s' is not a Hash" % [hash['shipping']] unless hash['shipping'].is_a? Hash
63
+ @shipping = OnlinePayments::SDK::Domain::ShippingDetail.new_from_hash(hash['shipping'])
64
+ end
56
65
  end
57
66
  end
58
67
  end
@@ -5,6 +5,7 @@ require 'onlinepayments/sdk/domain/data_object'
5
5
  require 'onlinepayments/sdk/domain/line_item_detail'
6
6
  require 'onlinepayments/sdk/domain/operation_payment_references'
7
7
  require 'onlinepayments/sdk/domain/payment_references'
8
+ require 'onlinepayments/sdk/domain/shipping_detail'
8
9
 
9
10
  module OnlinePayments
10
11
  module SDK
@@ -14,6 +15,7 @@ module OnlinePayments
14
15
  # @attr [Array<OnlinePayments::SDK::Domain::LineItemDetail>] line_item_details
15
16
  # @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences] operation_references
16
17
  # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
18
+ # @attr [OnlinePayments::SDK::Domain::ShippingDetail] shipping
17
19
  class CapturePaymentRequest < OnlinePayments::SDK::Domain::DataObject
18
20
 
19
21
  attr_accessor :amount
@@ -26,6 +28,8 @@ module OnlinePayments
26
28
 
27
29
  attr_accessor :references
28
30
 
31
+ attr_accessor :shipping
32
+
29
33
  # @return (Hash)
30
34
  def to_h
31
35
  hash = super
@@ -34,6 +38,7 @@ module OnlinePayments
34
38
  hash['lineItemDetails'] = @line_item_details.collect{|val| val.to_h} unless @line_item_details.nil?
35
39
  hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
36
40
  hash['references'] = @references.to_h unless @references.nil?
41
+ hash['shipping'] = @shipping.to_h unless @shipping.nil?
37
42
  hash
38
43
  end
39
44
 
@@ -60,6 +65,10 @@ module OnlinePayments
60
65
  raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
61
66
  @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
62
67
  end
68
+ if hash.has_key? 'shipping'
69
+ raise TypeError, "value '%s' is not a Hash" % [hash['shipping']] unless hash['shipping'].is_a? Hash
70
+ @shipping = OnlinePayments::SDK::Domain::ShippingDetail.new_from_hash(hash['shipping'])
71
+ end
63
72
  end
64
73
  end
65
74
  end
@@ -6,6 +6,7 @@ require 'onlinepayments/sdk/domain/acquirer_information'
6
6
  require 'onlinepayments/sdk/domain/card_essentials'
7
7
  require 'onlinepayments/sdk/domain/card_fraud_results'
8
8
  require 'onlinepayments/sdk/domain/click_to_pay'
9
+ require 'onlinepayments/sdk/domain/crm_token'
9
10
  require 'onlinepayments/sdk/domain/currency_conversion'
10
11
  require 'onlinepayments/sdk/domain/data_object'
11
12
  require 'onlinepayments/sdk/domain/external_token_linked'
@@ -25,6 +26,7 @@ module OnlinePayments
25
26
  # @attr [OnlinePayments::SDK::Domain::CardEssentials] card
26
27
  # @attr [OnlinePayments::SDK::Domain::ClickToPay] click_to_pay
27
28
  # @attr [String] cobrand_selection_indicator
29
+ # @attr [OnlinePayments::SDK::Domain::CrmToken] crm_token
28
30
  # @attr [OnlinePayments::SDK::Domain::CurrencyConversion] currency_conversion
29
31
  # @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
30
32
  # @attr [OnlinePayments::SDK::Domain::CardFraudResults] fraud_results
@@ -55,6 +57,8 @@ module OnlinePayments
55
57
 
56
58
  attr_accessor :cobrand_selection_indicator
57
59
 
60
+ attr_accessor :crm_token
61
+
58
62
  attr_accessor :currency_conversion
59
63
 
60
64
  attr_accessor :external_token_linked
@@ -93,6 +97,7 @@ module OnlinePayments
93
97
  hash['card'] = @card.to_h unless @card.nil?
94
98
  hash['clickToPay'] = @click_to_pay.to_h unless @click_to_pay.nil?
95
99
  hash['cobrandSelectionIndicator'] = @cobrand_selection_indicator unless @cobrand_selection_indicator.nil?
100
+ hash['crmToken'] = @crm_token.to_h unless @crm_token.nil?
96
101
  hash['currencyConversion'] = @currency_conversion.to_h unless @currency_conversion.nil?
97
102
  hash['externalTokenLinked'] = @external_token_linked.to_h unless @external_token_linked.nil?
98
103
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
@@ -137,6 +142,10 @@ module OnlinePayments
137
142
  if hash.has_key? 'cobrandSelectionIndicator'
138
143
  @cobrand_selection_indicator = hash['cobrandSelectionIndicator']
139
144
  end
145
+ if hash.has_key? 'crmToken'
146
+ raise TypeError, "value '%s' is not a Hash" % [hash['crmToken']] unless hash['crmToken'].is_a? Hash
147
+ @crm_token = OnlinePayments::SDK::Domain::CrmToken.new_from_hash(hash['crmToken'])
148
+ end
140
149
  if hash.has_key? 'currencyConversion'
141
150
  raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
142
151
  @currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversion.new_from_hash(hash['currencyConversion'])
@@ -6,30 +6,44 @@ require 'onlinepayments/sdk/domain/data_object'
6
6
  module OnlinePayments
7
7
  module SDK
8
8
  module Domain
9
+ # @attr [Integer] discount_amount
9
10
  # @attr [String] line_item_id
10
11
  # @attr [Integer] quantity
12
+ # @attr [Integer] tax_amount
11
13
  class LineItemDetail < OnlinePayments::SDK::Domain::DataObject
12
14
 
15
+ attr_accessor :discount_amount
16
+
13
17
  attr_accessor :line_item_id
14
18
 
15
19
  attr_accessor :quantity
16
20
 
21
+ attr_accessor :tax_amount
22
+
17
23
  # @return (Hash)
18
24
  def to_h
19
25
  hash = super
26
+ hash['discountAmount'] = @discount_amount unless @discount_amount.nil?
20
27
  hash['lineItemId'] = @line_item_id unless @line_item_id.nil?
21
28
  hash['quantity'] = @quantity unless @quantity.nil?
29
+ hash['taxAmount'] = @tax_amount unless @tax_amount.nil?
22
30
  hash
23
31
  end
24
32
 
25
33
  def from_hash(hash)
26
34
  super
35
+ if hash.has_key? 'discountAmount'
36
+ @discount_amount = hash['discountAmount']
37
+ end
27
38
  if hash.has_key? 'lineItemId'
28
39
  @line_item_id = hash['lineItemId']
29
40
  end
30
41
  if hash.has_key? 'quantity'
31
42
  @quantity = hash['quantity']
32
43
  end
44
+ if hash.has_key? 'taxAmount'
45
+ @tax_amount = hash['taxAmount']
46
+ end
33
47
  end
34
48
  end
35
49
  end
@@ -14,6 +14,7 @@ module OnlinePayments
14
14
  module Domain
15
15
  # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
16
16
  # @attr [String] capture_id
17
+ # @attr [true/false] is_final
17
18
  # @attr [Array<OnlinePayments::SDK::Domain::LineItemDetail>] line_item_details
18
19
  # @attr [OnlinePayments::SDK::Domain::OmnichannelRefundSpecificInput] omnichannel_refund_specific_input
19
20
  # @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences] operation_references
@@ -26,6 +27,8 @@ module OnlinePayments
26
27
 
27
28
  attr_accessor :capture_id
28
29
 
30
+ attr_accessor :is_final
31
+
29
32
  attr_accessor :line_item_details
30
33
 
31
34
  attr_accessor :omnichannel_refund_specific_input
@@ -43,6 +46,7 @@ module OnlinePayments
43
46
  hash = super
44
47
  hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
45
48
  hash['captureId'] = @capture_id unless @capture_id.nil?
49
+ hash['isFinal'] = @is_final unless @is_final.nil?
46
50
  hash['lineItemDetails'] = @line_item_details.collect{|val| val.to_h} unless @line_item_details.nil?
47
51
  hash['omnichannelRefundSpecificInput'] = @omnichannel_refund_specific_input.to_h unless @omnichannel_refund_specific_input.nil?
48
52
  hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
@@ -61,6 +65,9 @@ module OnlinePayments
61
65
  if hash.has_key? 'captureId'
62
66
  @capture_id = hash['captureId']
63
67
  end
68
+ if hash.has_key? 'isFinal'
69
+ @is_final = hash['isFinal']
70
+ end
64
71
  if hash.has_key? 'lineItemDetails'
65
72
  raise TypeError, "value '%s' is not an Array" % [hash['lineItemDetails']] unless hash['lineItemDetails'].is_a? Array
66
73
  @line_item_details = []
@@ -0,0 +1,37 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [Integer] shipping_cost
10
+ # @attr [Integer] shipping_cost_tax
11
+ class ShippingDetail < OnlinePayments::SDK::Domain::DataObject
12
+
13
+ attr_accessor :shipping_cost
14
+
15
+ attr_accessor :shipping_cost_tax
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['shippingCost'] = @shipping_cost unless @shipping_cost.nil?
21
+ hash['shippingCostTax'] = @shipping_cost_tax unless @shipping_cost_tax.nil?
22
+ hash
23
+ end
24
+
25
+ def from_hash(hash)
26
+ super
27
+ if hash.has_key? 'shippingCost'
28
+ @shipping_cost = hash['shippingCost']
29
+ end
30
+ if hash.has_key? 'shippingCostTax'
31
+ @shipping_cost_tax = hash['shippingCostTax']
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'onlinepayments-sdk-ruby'
3
- spec.version = '7.3.0'
3
+ spec.version = '7.4.1'
4
4
  spec.authors = ['Worldline Direct support team']
5
5
  spec.email = ['82139942+worldline-direct-support-team@users.noreply.github.com']
6
6
  spec.summary = %q{SDK to communicate with the Online Payments platform using the Online Payments Server API}
@@ -16,14 +16,15 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.required_ruby_version = '>= 2.0'
18
18
 
19
- spec.add_dependency 'httpclient', '~> 2.8'
20
- spec.add_dependency 'concurrent-ruby', '~>1.0'
19
+ spec.add_dependency 'httpclient', '~> 2.9'
20
+ spec.add_dependency 'concurrent-ruby', '~> 1.3'
21
21
 
22
+ spec.add_development_dependency 'base64'
22
23
  spec.add_development_dependency 'yard', '~> 0.9'
23
- spec.add_development_dependency 'rspec', '~> 3.5'
24
- spec.add_development_dependency 'webmock', '~> 2.1'
25
- spec.add_development_dependency 'sinatra', '~> 2.1'
26
- spec.add_development_dependency 'webrick', '~> 1.7'
27
- spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
24
+ spec.add_development_dependency 'rspec', '~> 3.13'
25
+ spec.add_development_dependency 'webmock', '~> 3.0'
26
+ spec.add_development_dependency 'sinatra', '~> 3.2'
27
+ spec.add_development_dependency 'webrick', '~> 1.8'
28
+ spec.add_development_dependency 'rake', '~> 13.0'
28
29
  # spec.metadata['yard.run'] = 'yri' # compiles yard doc on install
29
30
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlinepayments-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.0
4
+ version: 7.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Worldline Direct support team
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-03-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: httpclient
@@ -16,28 +15,42 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '2.8'
18
+ version: '2.9'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '2.8'
25
+ version: '2.9'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: concurrent-ruby
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '1.0'
32
+ version: '1.3'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '1.0'
39
+ version: '1.3'
40
+ - !ruby/object:Gem::Dependency
41
+ name: base64
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
41
54
  - !ruby/object:Gem::Dependency
42
55
  name: yard
43
56
  requirement: !ruby/object:Gem::Requirement
@@ -58,76 +71,70 @@ dependencies:
58
71
  requirements:
59
72
  - - "~>"
60
73
  - !ruby/object:Gem::Version
61
- version: '3.5'
74
+ version: '3.13'
62
75
  type: :development
63
76
  prerelease: false
64
77
  version_requirements: !ruby/object:Gem::Requirement
65
78
  requirements:
66
79
  - - "~>"
67
80
  - !ruby/object:Gem::Version
68
- version: '3.5'
81
+ version: '3.13'
69
82
  - !ruby/object:Gem::Dependency
70
83
  name: webmock
71
84
  requirement: !ruby/object:Gem::Requirement
72
85
  requirements:
73
86
  - - "~>"
74
87
  - !ruby/object:Gem::Version
75
- version: '2.1'
88
+ version: '3.0'
76
89
  type: :development
77
90
  prerelease: false
78
91
  version_requirements: !ruby/object:Gem::Requirement
79
92
  requirements:
80
93
  - - "~>"
81
94
  - !ruby/object:Gem::Version
82
- version: '2.1'
95
+ version: '3.0'
83
96
  - !ruby/object:Gem::Dependency
84
97
  name: sinatra
85
98
  requirement: !ruby/object:Gem::Requirement
86
99
  requirements:
87
100
  - - "~>"
88
101
  - !ruby/object:Gem::Version
89
- version: '2.1'
102
+ version: '3.2'
90
103
  type: :development
91
104
  prerelease: false
92
105
  version_requirements: !ruby/object:Gem::Requirement
93
106
  requirements:
94
107
  - - "~>"
95
108
  - !ruby/object:Gem::Version
96
- version: '2.1'
109
+ version: '3.2'
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: webrick
99
112
  requirement: !ruby/object:Gem::Requirement
100
113
  requirements:
101
114
  - - "~>"
102
115
  - !ruby/object:Gem::Version
103
- version: '1.7'
116
+ version: '1.8'
104
117
  type: :development
105
118
  prerelease: false
106
119
  version_requirements: !ruby/object:Gem::Requirement
107
120
  requirements:
108
121
  - - "~>"
109
122
  - !ruby/object:Gem::Version
110
- version: '1.7'
123
+ version: '1.8'
111
124
  - !ruby/object:Gem::Dependency
112
125
  name: rake
113
126
  requirement: !ruby/object:Gem::Requirement
114
127
  requirements:
115
128
  - - "~>"
116
129
  - !ruby/object:Gem::Version
117
- version: '12.3'
118
- - - ">="
119
- - !ruby/object:Gem::Version
120
- version: 12.3.3
130
+ version: '13.0'
121
131
  type: :development
122
132
  prerelease: false
123
133
  version_requirements: !ruby/object:Gem::Requirement
124
134
  requirements:
125
135
  - - "~>"
126
136
  - !ruby/object:Gem::Version
127
- version: '12.3'
128
- - - ">="
129
- - !ruby/object:Gem::Version
130
- version: 12.3.3
137
+ version: '13.0'
131
138
  description: SDK to communicate with the Online Payments platform using the Online
132
139
  Payments Server API
133
140
  email:
@@ -460,6 +467,7 @@ files:
460
467
  - lib/onlinepayments/sdk/domain/session_request.rb
461
468
  - lib/onlinepayments/sdk/domain/session_response.rb
462
469
  - lib/onlinepayments/sdk/domain/shipping.rb
470
+ - lib/onlinepayments/sdk/domain/shipping_detail.rb
463
471
  - lib/onlinepayments/sdk/domain/shipping_method.rb
464
472
  - lib/onlinepayments/sdk/domain/shopping_cart.rb
465
473
  - lib/onlinepayments/sdk/domain/shopping_cart_extension.rb
@@ -589,7 +597,6 @@ homepage: https://github.com/wl-online-payments-direct/sdk-ruby
589
597
  licenses:
590
598
  - MIT
591
599
  metadata: {}
592
- post_install_message:
593
600
  rdoc_options: []
594
601
  require_paths:
595
602
  - lib
@@ -604,8 +611,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
604
611
  - !ruby/object:Gem::Version
605
612
  version: '0'
606
613
  requirements: []
607
- rubygems_version: 3.1.6
608
- signing_key:
614
+ rubygems_version: 3.6.9
609
615
  specification_version: 4
610
616
  summary: SDK to communicate with the Online Payments platform using the Online Payments
611
617
  Server API