onlinepayments-sdk-ruby 7.2.2 → 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/create_hosted_fields_session_response.rb +11 -0
- data/lib/onlinepayments/sdk/domain/line_item_detail.rb +14 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +36 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product3103_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product3112_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product3116_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product5601_specific_input.rb +30 -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 +7 -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'])
|
|
@@ -7,11 +7,14 @@ require 'onlinepayments/sdk/domain/session_data'
|
|
|
7
7
|
module OnlinePayments
|
|
8
8
|
module SDK
|
|
9
9
|
module Domain
|
|
10
|
+
# @attr [Array<String>] invalid_tokens
|
|
10
11
|
# @attr [String] sdk_sri
|
|
11
12
|
# @attr [String] sdk_url
|
|
12
13
|
# @attr [OnlinePayments::SDK::Domain::SessionData] session_data
|
|
13
14
|
class CreateHostedFieldsSessionResponse < OnlinePayments::SDK::Domain::DataObject
|
|
14
15
|
|
|
16
|
+
attr_accessor :invalid_tokens
|
|
17
|
+
|
|
15
18
|
attr_accessor :sdk_sri
|
|
16
19
|
|
|
17
20
|
attr_accessor :sdk_url
|
|
@@ -21,6 +24,7 @@ module OnlinePayments
|
|
|
21
24
|
# @return (Hash)
|
|
22
25
|
def to_h
|
|
23
26
|
hash = super
|
|
27
|
+
hash['invalidTokens'] = @invalid_tokens unless @invalid_tokens.nil?
|
|
24
28
|
hash['sdkSri'] = @sdk_sri unless @sdk_sri.nil?
|
|
25
29
|
hash['sdkUrl'] = @sdk_url unless @sdk_url.nil?
|
|
26
30
|
hash['sessionData'] = @session_data.to_h unless @session_data.nil?
|
|
@@ -29,6 +33,13 @@ module OnlinePayments
|
|
|
29
33
|
|
|
30
34
|
def from_hash(hash)
|
|
31
35
|
super
|
|
36
|
+
if hash.has_key? 'invalidTokens'
|
|
37
|
+
raise TypeError, "value '%s' is not an Array" % [hash['invalidTokens']] unless hash['invalidTokens'].is_a? Array
|
|
38
|
+
@invalid_tokens = []
|
|
39
|
+
hash['invalidTokens'].each do |e|
|
|
40
|
+
@invalid_tokens << e
|
|
41
|
+
end
|
|
42
|
+
end
|
|
32
43
|
if hash.has_key? 'sdkSri'
|
|
33
44
|
@sdk_sri = hash['sdkSri']
|
|
34
45
|
end
|
|
@@ -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
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
#
|
|
4
4
|
require 'onlinepayments/sdk/domain/data_object'
|
|
5
5
|
require 'onlinepayments/sdk/domain/redirect_payment_product11_specific_input'
|
|
6
|
+
require 'onlinepayments/sdk/domain/redirect_payment_product3103_specific_input'
|
|
7
|
+
require 'onlinepayments/sdk/domain/redirect_payment_product3112_specific_input'
|
|
8
|
+
require 'onlinepayments/sdk/domain/redirect_payment_product3116_specific_input'
|
|
6
9
|
require 'onlinepayments/sdk/domain/redirect_payment_product3203_specific_input'
|
|
7
10
|
require 'onlinepayments/sdk/domain/redirect_payment_product3204_specific_input'
|
|
8
11
|
require 'onlinepayments/sdk/domain/redirect_payment_product3302_specific_input'
|
|
@@ -16,6 +19,7 @@ require 'onlinepayments/sdk/domain/redirect_payment_product5406_specific_input'
|
|
|
16
19
|
require 'onlinepayments/sdk/domain/redirect_payment_product5408_specific_input'
|
|
17
20
|
require 'onlinepayments/sdk/domain/redirect_payment_product5410_specific_input'
|
|
18
21
|
require 'onlinepayments/sdk/domain/redirect_payment_product5412_specific_input'
|
|
22
|
+
require 'onlinepayments/sdk/domain/redirect_payment_product5601_specific_input'
|
|
19
23
|
require 'onlinepayments/sdk/domain/redirect_payment_product809_specific_input'
|
|
20
24
|
require 'onlinepayments/sdk/domain/redirect_payment_product840_specific_input'
|
|
21
25
|
require 'onlinepayments/sdk/domain/redirection_data'
|
|
@@ -25,6 +29,9 @@ module OnlinePayments
|
|
|
25
29
|
module Domain
|
|
26
30
|
# @attr [String] payment_option
|
|
27
31
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct11SpecificInput] payment_product11_specific_input
|
|
32
|
+
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3103SpecificInput] payment_product3103_specific_input
|
|
33
|
+
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3112SpecificInput] payment_product3112_specific_input
|
|
34
|
+
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3116SpecificInput] payment_product3116_specific_input
|
|
28
35
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3203SpecificInput] payment_product3203_specific_input
|
|
29
36
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3204SpecificInput] payment_product3204_specific_input
|
|
30
37
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3302SpecificInput] payment_product3302_specific_input
|
|
@@ -38,6 +45,7 @@ module OnlinePayments
|
|
|
38
45
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct5408SpecificInput] payment_product5408_specific_input
|
|
39
46
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct5410SpecificInput] payment_product5410_specific_input
|
|
40
47
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct5412SpecificInput] payment_product5412_specific_input
|
|
48
|
+
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct5601SpecificInput] payment_product5601_specific_input
|
|
41
49
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct809SpecificInput] payment_product809_specific_input
|
|
42
50
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct840SpecificInput] payment_product840_specific_input
|
|
43
51
|
# @attr [Integer] payment_product_id
|
|
@@ -51,6 +59,12 @@ module OnlinePayments
|
|
|
51
59
|
|
|
52
60
|
attr_accessor :payment_product11_specific_input
|
|
53
61
|
|
|
62
|
+
attr_accessor :payment_product3103_specific_input
|
|
63
|
+
|
|
64
|
+
attr_accessor :payment_product3112_specific_input
|
|
65
|
+
|
|
66
|
+
attr_accessor :payment_product3116_specific_input
|
|
67
|
+
|
|
54
68
|
attr_accessor :payment_product3203_specific_input
|
|
55
69
|
|
|
56
70
|
attr_accessor :payment_product3204_specific_input
|
|
@@ -77,6 +91,8 @@ module OnlinePayments
|
|
|
77
91
|
|
|
78
92
|
attr_accessor :payment_product5412_specific_input
|
|
79
93
|
|
|
94
|
+
attr_accessor :payment_product5601_specific_input
|
|
95
|
+
|
|
80
96
|
attr_accessor :payment_product809_specific_input
|
|
81
97
|
|
|
82
98
|
attr_accessor :payment_product840_specific_input
|
|
@@ -96,6 +112,9 @@ module OnlinePayments
|
|
|
96
112
|
hash = super
|
|
97
113
|
hash['paymentOption'] = @payment_option unless @payment_option.nil?
|
|
98
114
|
hash['paymentProduct11SpecificInput'] = @payment_product11_specific_input.to_h unless @payment_product11_specific_input.nil?
|
|
115
|
+
hash['paymentProduct3103SpecificInput'] = @payment_product3103_specific_input.to_h unless @payment_product3103_specific_input.nil?
|
|
116
|
+
hash['paymentProduct3112SpecificInput'] = @payment_product3112_specific_input.to_h unless @payment_product3112_specific_input.nil?
|
|
117
|
+
hash['paymentProduct3116SpecificInput'] = @payment_product3116_specific_input.to_h unless @payment_product3116_specific_input.nil?
|
|
99
118
|
hash['paymentProduct3203SpecificInput'] = @payment_product3203_specific_input.to_h unless @payment_product3203_specific_input.nil?
|
|
100
119
|
hash['paymentProduct3204SpecificInput'] = @payment_product3204_specific_input.to_h unless @payment_product3204_specific_input.nil?
|
|
101
120
|
hash['paymentProduct3302SpecificInput'] = @payment_product3302_specific_input.to_h unless @payment_product3302_specific_input.nil?
|
|
@@ -109,6 +128,7 @@ module OnlinePayments
|
|
|
109
128
|
hash['paymentProduct5408SpecificInput'] = @payment_product5408_specific_input.to_h unless @payment_product5408_specific_input.nil?
|
|
110
129
|
hash['paymentProduct5410SpecificInput'] = @payment_product5410_specific_input.to_h unless @payment_product5410_specific_input.nil?
|
|
111
130
|
hash['paymentProduct5412SpecificInput'] = @payment_product5412_specific_input.to_h unless @payment_product5412_specific_input.nil?
|
|
131
|
+
hash['paymentProduct5601SpecificInput'] = @payment_product5601_specific_input.to_h unless @payment_product5601_specific_input.nil?
|
|
112
132
|
hash['paymentProduct809SpecificInput'] = @payment_product809_specific_input.to_h unless @payment_product809_specific_input.nil?
|
|
113
133
|
hash['paymentProduct840SpecificInput'] = @payment_product840_specific_input.to_h unless @payment_product840_specific_input.nil?
|
|
114
134
|
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
|
@@ -128,6 +148,18 @@ module OnlinePayments
|
|
|
128
148
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct11SpecificInput']] unless hash['paymentProduct11SpecificInput'].is_a? Hash
|
|
129
149
|
@payment_product11_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct11SpecificInput.new_from_hash(hash['paymentProduct11SpecificInput'])
|
|
130
150
|
end
|
|
151
|
+
if hash.has_key? 'paymentProduct3103SpecificInput'
|
|
152
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3103SpecificInput']] unless hash['paymentProduct3103SpecificInput'].is_a? Hash
|
|
153
|
+
@payment_product3103_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct3103SpecificInput.new_from_hash(hash['paymentProduct3103SpecificInput'])
|
|
154
|
+
end
|
|
155
|
+
if hash.has_key? 'paymentProduct3112SpecificInput'
|
|
156
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3112SpecificInput']] unless hash['paymentProduct3112SpecificInput'].is_a? Hash
|
|
157
|
+
@payment_product3112_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct3112SpecificInput.new_from_hash(hash['paymentProduct3112SpecificInput'])
|
|
158
|
+
end
|
|
159
|
+
if hash.has_key? 'paymentProduct3116SpecificInput'
|
|
160
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3116SpecificInput']] unless hash['paymentProduct3116SpecificInput'].is_a? Hash
|
|
161
|
+
@payment_product3116_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct3116SpecificInput.new_from_hash(hash['paymentProduct3116SpecificInput'])
|
|
162
|
+
end
|
|
131
163
|
if hash.has_key? 'paymentProduct3203SpecificInput'
|
|
132
164
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3203SpecificInput']] unless hash['paymentProduct3203SpecificInput'].is_a? Hash
|
|
133
165
|
@payment_product3203_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct3203SpecificInput.new_from_hash(hash['paymentProduct3203SpecificInput'])
|
|
@@ -180,6 +212,10 @@ module OnlinePayments
|
|
|
180
212
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5412SpecificInput']] unless hash['paymentProduct5412SpecificInput'].is_a? Hash
|
|
181
213
|
@payment_product5412_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct5412SpecificInput.new_from_hash(hash['paymentProduct5412SpecificInput'])
|
|
182
214
|
end
|
|
215
|
+
if hash.has_key? 'paymentProduct5601SpecificInput'
|
|
216
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5601SpecificInput']] unless hash['paymentProduct5601SpecificInput'].is_a? Hash
|
|
217
|
+
@payment_product5601_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct5601SpecificInput.new_from_hash(hash['paymentProduct5601SpecificInput'])
|
|
218
|
+
end
|
|
183
219
|
if hash.has_key? 'paymentProduct809SpecificInput'
|
|
184
220
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct809SpecificInput']] unless hash['paymentProduct809SpecificInput'].is_a? Hash
|
|
185
221
|
@payment_product809_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct809SpecificInput.new_from_hash(hash['paymentProduct809SpecificInput'])
|
|
@@ -0,0 +1,30 @@
|
|
|
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 [true/false] complete_remaining_payment_amount
|
|
10
|
+
class RedirectPaymentProduct3103SpecificInput < OnlinePayments::SDK::Domain::DataObject
|
|
11
|
+
|
|
12
|
+
attr_accessor :complete_remaining_payment_amount
|
|
13
|
+
|
|
14
|
+
# @return (Hash)
|
|
15
|
+
def to_h
|
|
16
|
+
hash = super
|
|
17
|
+
hash['completeRemainingPaymentAmount'] = @complete_remaining_payment_amount unless @complete_remaining_payment_amount.nil?
|
|
18
|
+
hash
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def from_hash(hash)
|
|
22
|
+
super
|
|
23
|
+
if hash.has_key? 'completeRemainingPaymentAmount'
|
|
24
|
+
@complete_remaining_payment_amount = hash['completeRemainingPaymentAmount']
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
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 [true/false] complete_remaining_payment_amount
|
|
10
|
+
class RedirectPaymentProduct3112SpecificInput < OnlinePayments::SDK::Domain::DataObject
|
|
11
|
+
|
|
12
|
+
attr_accessor :complete_remaining_payment_amount
|
|
13
|
+
|
|
14
|
+
# @return (Hash)
|
|
15
|
+
def to_h
|
|
16
|
+
hash = super
|
|
17
|
+
hash['completeRemainingPaymentAmount'] = @complete_remaining_payment_amount unless @complete_remaining_payment_amount.nil?
|
|
18
|
+
hash
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def from_hash(hash)
|
|
22
|
+
super
|
|
23
|
+
if hash.has_key? 'completeRemainingPaymentAmount'
|
|
24
|
+
@complete_remaining_payment_amount = hash['completeRemainingPaymentAmount']
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
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 [true/false] complete_remaining_payment_amount
|
|
10
|
+
class RedirectPaymentProduct3116SpecificInput < OnlinePayments::SDK::Domain::DataObject
|
|
11
|
+
|
|
12
|
+
attr_accessor :complete_remaining_payment_amount
|
|
13
|
+
|
|
14
|
+
# @return (Hash)
|
|
15
|
+
def to_h
|
|
16
|
+
hash = super
|
|
17
|
+
hash['completeRemainingPaymentAmount'] = @complete_remaining_payment_amount unless @complete_remaining_payment_amount.nil?
|
|
18
|
+
hash
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def from_hash(hash)
|
|
22
|
+
super
|
|
23
|
+
if hash.has_key? 'completeRemainingPaymentAmount'
|
|
24
|
+
@complete_remaining_payment_amount = hash['completeRemainingPaymentAmount']
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
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 [true/false] complete_remaining_payment_amount
|
|
10
|
+
class RedirectPaymentProduct5601SpecificInput < OnlinePayments::SDK::Domain::DataObject
|
|
11
|
+
|
|
12
|
+
attr_accessor :complete_remaining_payment_amount
|
|
13
|
+
|
|
14
|
+
# @return (Hash)
|
|
15
|
+
def to_h
|
|
16
|
+
hash = super
|
|
17
|
+
hash['completeRemainingPaymentAmount'] = @complete_remaining_payment_amount unless @complete_remaining_payment_amount.nil?
|
|
18
|
+
hash
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def from_hash(hash)
|
|
22
|
+
super
|
|
23
|
+
if hash.has_key? 'completeRemainingPaymentAmount'
|
|
24
|
+
@complete_remaining_payment_amount = hash['completeRemainingPaymentAmount']
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
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
|
|
@@ -413,6 +413,9 @@ files:
|
|
|
413
413
|
- lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb
|
|
414
414
|
- lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb
|
|
415
415
|
- lib/onlinepayments/sdk/domain/redirect_payment_product11_specific_input.rb
|
|
416
|
+
- lib/onlinepayments/sdk/domain/redirect_payment_product3103_specific_input.rb
|
|
417
|
+
- lib/onlinepayments/sdk/domain/redirect_payment_product3112_specific_input.rb
|
|
418
|
+
- lib/onlinepayments/sdk/domain/redirect_payment_product3116_specific_input.rb
|
|
416
419
|
- lib/onlinepayments/sdk/domain/redirect_payment_product3203_specific_input.rb
|
|
417
420
|
- lib/onlinepayments/sdk/domain/redirect_payment_product3204_specific_input.rb
|
|
418
421
|
- lib/onlinepayments/sdk/domain/redirect_payment_product3302_specific_input.rb
|
|
@@ -426,6 +429,7 @@ files:
|
|
|
426
429
|
- lib/onlinepayments/sdk/domain/redirect_payment_product5408_specific_input.rb
|
|
427
430
|
- lib/onlinepayments/sdk/domain/redirect_payment_product5410_specific_input.rb
|
|
428
431
|
- lib/onlinepayments/sdk/domain/redirect_payment_product5412_specific_input.rb
|
|
432
|
+
- lib/onlinepayments/sdk/domain/redirect_payment_product5601_specific_input.rb
|
|
429
433
|
- lib/onlinepayments/sdk/domain/redirect_payment_product809_specific_input.rb
|
|
430
434
|
- lib/onlinepayments/sdk/domain/redirect_payment_product840_specific_input.rb
|
|
431
435
|
- lib/onlinepayments/sdk/domain/redirection_data.rb
|
|
@@ -456,6 +460,7 @@ files:
|
|
|
456
460
|
- lib/onlinepayments/sdk/domain/session_request.rb
|
|
457
461
|
- lib/onlinepayments/sdk/domain/session_response.rb
|
|
458
462
|
- lib/onlinepayments/sdk/domain/shipping.rb
|
|
463
|
+
- lib/onlinepayments/sdk/domain/shipping_detail.rb
|
|
459
464
|
- lib/onlinepayments/sdk/domain/shipping_method.rb
|
|
460
465
|
- lib/onlinepayments/sdk/domain/shopping_cart.rb
|
|
461
466
|
- lib/onlinepayments/sdk/domain/shopping_cart_extension.rb
|