onlinepayments-sdk-ruby 7.3.0 → 7.4.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/lib/onlinepayments/sdk/communication/metadata_provider.rb +1 -1
- data/lib/onlinepayments/sdk/domain/cancel_payment_request.rb +9 -0
- data/lib/onlinepayments/sdk/domain/capture_payment_request.rb +9 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +9 -0
- data/lib/onlinepayments/sdk/domain/line_item_detail.rb +14 -0
- data/lib/onlinepayments/sdk/domain/refund_request.rb +7 -0
- data/lib/onlinepayments/sdk/domain/shipping_detail.rb +37 -0
- data/onlinepayments-sdk-ruby.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e90e097a2209e03eb110dee5fcf3a4d0e8a35ebdf6d62ff55f1e21184da490a0
|
|
4
|
+
data.tar.gz: 58874383b41e894a6c40ac7be9555a822f9a2c0a697288deee0447e334d65a0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73bb16d9c7bae92abb3f4b852fe64de34f6737cf512d99377f4f5cc69d07b86fc66048bf12a60c2c1a3740fb61080f56fa1e1bee37838b2a4b8933d99abd7786
|
|
7
|
+
data.tar.gz: f0ea73149ae5ddab4657907274f04e8f4e1dbafec8da8fd18567c4cefafc1339247df60643900852c45731b4eac0d3f2e1222209af95e67552a43d139150a9a8
|
|
@@ -13,7 +13,7 @@ module OnlinePayments
|
|
|
13
13
|
class MetadataProvider
|
|
14
14
|
private
|
|
15
15
|
|
|
16
|
-
SDK_VERSION = '7.
|
|
16
|
+
SDK_VERSION = '7.4.0'.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
|
+
spec.version = '7.4.0'
|
|
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}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onlinepayments-sdk-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.
|
|
4
|
+
version: 7.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Worldline Direct support team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httpclient
|
|
@@ -460,6 +460,7 @@ files:
|
|
|
460
460
|
- lib/onlinepayments/sdk/domain/session_request.rb
|
|
461
461
|
- lib/onlinepayments/sdk/domain/session_response.rb
|
|
462
462
|
- lib/onlinepayments/sdk/domain/shipping.rb
|
|
463
|
+
- lib/onlinepayments/sdk/domain/shipping_detail.rb
|
|
463
464
|
- lib/onlinepayments/sdk/domain/shipping_method.rb
|
|
464
465
|
- lib/onlinepayments/sdk/domain/shopping_cart.rb
|
|
465
466
|
- lib/onlinepayments/sdk/domain/shopping_cart_extension.rb
|