onlinepayments-sdk-ruby 10.1.0 → 10.2.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/capture_output.rb +28 -0
- data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb +15 -0
- data/lib/onlinepayments/sdk/domain/get_payment_links_by_merchant_group_request.rb +68 -0
- data/lib/onlinepayments/sdk/domain/import_cof_series_request.rb +15 -0
- data/lib/onlinepayments/sdk/domain/operation_output.rb +15 -0
- data/lib/onlinepayments/sdk/domain/pagination.rb +49 -0
- data/lib/onlinepayments/sdk/domain/payment_link_overview_entry.rb +157 -0
- data/lib/onlinepayments/sdk/domain/payment_link_overview_filtering.rb +57 -0
- data/lib/onlinepayments/sdk/domain/payment_link_overview_response.rb +69 -0
- data/lib/onlinepayments/sdk/domain/payment_link_overview_sorting.rb +49 -0
- data/lib/onlinepayments/sdk/domain/payment_output.rb +13 -0
- data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_fields.rb +57 -0
- data/lib/onlinepayments/sdk/domain/payout_output.rb +13 -0
- data/lib/onlinepayments/sdk/domain/refund_card_method_specific_output.rb +43 -0
- data/lib/onlinepayments/sdk/domain/refund_output.rb +28 -0
- data/lib/onlinepayments/sdk/domain/share_payment_link_request.rb +62 -0
- data/lib/onlinepayments/sdk/merchant/merchant_client.rb +7 -7
- data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +70 -0
- data/onlinepayments-sdk-ruby.gemspec +1 -1
- metadata +9 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b5e7468f37c75acaea143efb11af05d2483bfb3517b6bd33e9a3cc870047a45
|
|
4
|
+
data.tar.gz: e4605895a9f9b57aeee93eda073fdd841b2cd859d06f32a7c6607655ad119307
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9acc1d023f3baf455496bc2c95453e201e32015f54413cbd6c023f6c89b3c9bcbca85012668c27a4428b3db8cd3cded1f48e60f45fbe5f3090f7cf0f1294864f
|
|
7
|
+
data.tar.gz: 56d5e7435b59afe55d9121489dce850b1c7b2589e22fee4442752e8becb546c8f57e69bf73bca2ce83cb55824856cbeda290bb67b98837f5a18cc47a977ccb14
|
|
@@ -13,7 +13,7 @@ module OnlinePayments
|
|
|
13
13
|
class MetadataProvider
|
|
14
14
|
private
|
|
15
15
|
|
|
16
|
-
SDK_VERSION = '10.
|
|
16
|
+
SDK_VERSION = '10.2.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
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#
|
|
2
2
|
# This file was automatically generated.
|
|
3
3
|
#
|
|
4
|
+
require 'date'
|
|
5
|
+
|
|
4
6
|
require 'onlinepayments/sdk/domain/amount_of_money'
|
|
5
7
|
require 'onlinepayments/sdk/domain/card_payment_method_specific_output'
|
|
6
8
|
require 'onlinepayments/sdk/domain/data_object'
|
|
@@ -21,11 +23,13 @@ module OnlinePayments
|
|
|
21
23
|
# @attr [String, nil] merchant_parameters
|
|
22
24
|
# @attr [OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificOutput, nil] mobile_payment_method_specific_output
|
|
23
25
|
# @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences, nil] operation_references
|
|
26
|
+
# @attr [DateTime, nil] payment_creation_date
|
|
24
27
|
# @attr [String, nil] payment_method
|
|
25
28
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificOutput, nil] redirect_payment_method_specific_output
|
|
26
29
|
# @attr [OnlinePayments::SDK::Domain::PaymentReferences, nil] references
|
|
27
30
|
# @attr [OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificOutput, nil] sepa_direct_debit_payment_method_specific_output
|
|
28
31
|
# @attr [OnlinePayments::SDK::Domain::SurchargeSpecificOutput, nil] surcharge_specific_output
|
|
32
|
+
# @attr [DateTime, nil] transaction_date
|
|
29
33
|
class CaptureOutput < OnlinePayments::SDK::Domain::DataObject
|
|
30
34
|
|
|
31
35
|
attr_accessor :acquired_amount
|
|
@@ -43,6 +47,8 @@ module OnlinePayments
|
|
|
43
47
|
|
|
44
48
|
attr_accessor :operation_references
|
|
45
49
|
|
|
50
|
+
attr_accessor :payment_creation_date
|
|
51
|
+
|
|
46
52
|
attr_accessor :payment_method
|
|
47
53
|
|
|
48
54
|
attr_accessor :redirect_payment_method_specific_output
|
|
@@ -53,6 +59,8 @@ module OnlinePayments
|
|
|
53
59
|
|
|
54
60
|
attr_accessor :surcharge_specific_output
|
|
55
61
|
|
|
62
|
+
attr_accessor :transaction_date
|
|
63
|
+
|
|
56
64
|
# Sets the property and returns this same instance.
|
|
57
65
|
def with_acquired_amount(value)
|
|
58
66
|
@acquired_amount = value
|
|
@@ -95,6 +103,12 @@ module OnlinePayments
|
|
|
95
103
|
self
|
|
96
104
|
end
|
|
97
105
|
|
|
106
|
+
# Sets the property and returns this same instance.
|
|
107
|
+
def with_payment_creation_date(value)
|
|
108
|
+
@payment_creation_date = value
|
|
109
|
+
self
|
|
110
|
+
end
|
|
111
|
+
|
|
98
112
|
# Sets the property and returns this same instance.
|
|
99
113
|
def with_payment_method(value)
|
|
100
114
|
@payment_method = value
|
|
@@ -125,6 +139,12 @@ module OnlinePayments
|
|
|
125
139
|
self
|
|
126
140
|
end
|
|
127
141
|
|
|
142
|
+
# Sets the property and returns this same instance.
|
|
143
|
+
def with_transaction_date(value)
|
|
144
|
+
@transaction_date = value
|
|
145
|
+
self
|
|
146
|
+
end
|
|
147
|
+
|
|
128
148
|
# @return (Hash)
|
|
129
149
|
def to_h
|
|
130
150
|
hash = super
|
|
@@ -135,11 +155,13 @@ module OnlinePayments
|
|
|
135
155
|
hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
|
|
136
156
|
hash['mobilePaymentMethodSpecificOutput'] = @mobile_payment_method_specific_output.to_h unless @mobile_payment_method_specific_output.nil?
|
|
137
157
|
hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
|
|
158
|
+
hash['paymentCreationDate'] = @payment_creation_date.iso8601(3) unless @payment_creation_date.nil?
|
|
138
159
|
hash['paymentMethod'] = @payment_method unless @payment_method.nil?
|
|
139
160
|
hash['redirectPaymentMethodSpecificOutput'] = @redirect_payment_method_specific_output.to_h unless @redirect_payment_method_specific_output.nil?
|
|
140
161
|
hash['references'] = @references.to_h unless @references.nil?
|
|
141
162
|
hash['sepaDirectDebitPaymentMethodSpecificOutput'] = @sepa_direct_debit_payment_method_specific_output.to_h unless @sepa_direct_debit_payment_method_specific_output.nil?
|
|
142
163
|
hash['surchargeSpecificOutput'] = @surcharge_specific_output.to_h unless @surcharge_specific_output.nil?
|
|
164
|
+
hash['transactionDate'] = @transaction_date.iso8601(3) unless @transaction_date.nil?
|
|
143
165
|
hash
|
|
144
166
|
end
|
|
145
167
|
|
|
@@ -171,6 +193,9 @@ module OnlinePayments
|
|
|
171
193
|
raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
|
|
172
194
|
@operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
|
|
173
195
|
end
|
|
196
|
+
if hash.has_key? 'paymentCreationDate'
|
|
197
|
+
@payment_creation_date = DateTime.parse(hash['paymentCreationDate'])
|
|
198
|
+
end
|
|
174
199
|
if hash.has_key? 'paymentMethod'
|
|
175
200
|
@payment_method = hash['paymentMethod']
|
|
176
201
|
end
|
|
@@ -190,6 +215,9 @@ module OnlinePayments
|
|
|
190
215
|
raise TypeError, "value '%s' is not a Hash" % [hash['surchargeSpecificOutput']] unless hash['surchargeSpecificOutput'].is_a? Hash
|
|
191
216
|
@surcharge_specific_output = OnlinePayments::SDK::Domain::SurchargeSpecificOutput.new_from_hash(hash['surchargeSpecificOutput'])
|
|
192
217
|
end
|
|
218
|
+
if hash.has_key? 'transactionDate'
|
|
219
|
+
@transaction_date = DateTime.parse(hash['transactionDate'])
|
|
220
|
+
end
|
|
193
221
|
end
|
|
194
222
|
end
|
|
195
223
|
end
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
# This file was automatically generated.
|
|
3
3
|
#
|
|
4
4
|
require 'onlinepayments/sdk/domain/data_object'
|
|
5
|
+
require 'onlinepayments/sdk/domain/payment_product_filters_hosted_fields'
|
|
5
6
|
|
|
6
7
|
module OnlinePayments
|
|
7
8
|
module SDK
|
|
8
9
|
module Domain
|
|
9
10
|
# @attr [String, nil] locale
|
|
10
11
|
# @attr [String, nil] origin
|
|
12
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProductFiltersHostedFields, nil] payment_product_filters
|
|
11
13
|
# @attr [Array<String>, nil] tokens
|
|
12
14
|
class CreateHostedFieldsSessionRequest < OnlinePayments::SDK::Domain::DataObject
|
|
13
15
|
|
|
@@ -15,6 +17,8 @@ module OnlinePayments
|
|
|
15
17
|
|
|
16
18
|
attr_accessor :origin
|
|
17
19
|
|
|
20
|
+
attr_accessor :payment_product_filters
|
|
21
|
+
|
|
18
22
|
attr_accessor :tokens
|
|
19
23
|
|
|
20
24
|
# Sets the property and returns this same instance.
|
|
@@ -29,6 +33,12 @@ module OnlinePayments
|
|
|
29
33
|
self
|
|
30
34
|
end
|
|
31
35
|
|
|
36
|
+
# Sets the property and returns this same instance.
|
|
37
|
+
def with_payment_product_filters(value)
|
|
38
|
+
@payment_product_filters = value
|
|
39
|
+
self
|
|
40
|
+
end
|
|
41
|
+
|
|
32
42
|
# Sets the property and returns this same instance.
|
|
33
43
|
def with_tokens(value)
|
|
34
44
|
@tokens = value
|
|
@@ -40,6 +50,7 @@ module OnlinePayments
|
|
|
40
50
|
hash = super
|
|
41
51
|
hash['locale'] = @locale unless @locale.nil?
|
|
42
52
|
hash['origin'] = @origin unless @origin.nil?
|
|
53
|
+
hash['paymentProductFilters'] = @payment_product_filters.to_h unless @payment_product_filters.nil?
|
|
43
54
|
hash['tokens'] = @tokens unless @tokens.nil?
|
|
44
55
|
hash
|
|
45
56
|
end
|
|
@@ -52,6 +63,10 @@ module OnlinePayments
|
|
|
52
63
|
if hash.has_key? 'origin'
|
|
53
64
|
@origin = hash['origin']
|
|
54
65
|
end
|
|
66
|
+
if hash.has_key? 'paymentProductFilters'
|
|
67
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductFilters']] unless hash['paymentProductFilters'].is_a? Hash
|
|
68
|
+
@payment_product_filters = OnlinePayments::SDK::Domain::PaymentProductFiltersHostedFields.new_from_hash(hash['paymentProductFilters'])
|
|
69
|
+
end
|
|
55
70
|
if hash.has_key? 'tokens'
|
|
56
71
|
raise TypeError, "value '%s' is not an Array" % [hash['tokens']] unless hash['tokens'].is_a? Array
|
|
57
72
|
@tokens = []
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/domain/data_object'
|
|
5
|
+
require 'onlinepayments/sdk/domain/pagination'
|
|
6
|
+
require 'onlinepayments/sdk/domain/payment_link_overview_filtering'
|
|
7
|
+
require 'onlinepayments/sdk/domain/payment_link_overview_sorting'
|
|
8
|
+
|
|
9
|
+
module OnlinePayments
|
|
10
|
+
module SDK
|
|
11
|
+
module Domain
|
|
12
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentLinkOverviewFiltering, nil] filtering
|
|
13
|
+
# @attr [OnlinePayments::SDK::Domain::Pagination, nil] pagination
|
|
14
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentLinkOverviewSorting, nil] sorting
|
|
15
|
+
class GetPaymentLinksByMerchantGroupRequest < OnlinePayments::SDK::Domain::DataObject
|
|
16
|
+
|
|
17
|
+
attr_accessor :filtering
|
|
18
|
+
|
|
19
|
+
attr_accessor :pagination
|
|
20
|
+
|
|
21
|
+
attr_accessor :sorting
|
|
22
|
+
|
|
23
|
+
# Sets the property and returns this same instance.
|
|
24
|
+
def with_filtering(value)
|
|
25
|
+
@filtering = value
|
|
26
|
+
self
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Sets the property and returns this same instance.
|
|
30
|
+
def with_pagination(value)
|
|
31
|
+
@pagination = value
|
|
32
|
+
self
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Sets the property and returns this same instance.
|
|
36
|
+
def with_sorting(value)
|
|
37
|
+
@sorting = value
|
|
38
|
+
self
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# @return (Hash)
|
|
42
|
+
def to_h
|
|
43
|
+
hash = super
|
|
44
|
+
hash['filtering'] = @filtering.to_h unless @filtering.nil?
|
|
45
|
+
hash['pagination'] = @pagination.to_h unless @pagination.nil?
|
|
46
|
+
hash['sorting'] = @sorting.to_h unless @sorting.nil?
|
|
47
|
+
hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def from_hash(hash)
|
|
51
|
+
super
|
|
52
|
+
if hash.has_key? 'filtering'
|
|
53
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['filtering']] unless hash['filtering'].is_a? Hash
|
|
54
|
+
@filtering = OnlinePayments::SDK::Domain::PaymentLinkOverviewFiltering.new_from_hash(hash['filtering'])
|
|
55
|
+
end
|
|
56
|
+
if hash.has_key? 'pagination'
|
|
57
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['pagination']] unless hash['pagination'].is_a? Hash
|
|
58
|
+
@pagination = OnlinePayments::SDK::Domain::Pagination.new_from_hash(hash['pagination'])
|
|
59
|
+
end
|
|
60
|
+
if hash.has_key? 'sorting'
|
|
61
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['sorting']] unless hash['sorting'].is_a? Hash
|
|
62
|
+
@sorting = OnlinePayments::SDK::Domain::PaymentLinkOverviewSorting.new_from_hash(hash['sorting'])
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
#
|
|
4
4
|
require 'onlinepayments/sdk/domain/card_data_without_cvv'
|
|
5
5
|
require 'onlinepayments/sdk/domain/data_object'
|
|
6
|
+
require 'onlinepayments/sdk/domain/network_token_data'
|
|
6
7
|
|
|
7
8
|
module OnlinePayments
|
|
8
9
|
module SDK
|
|
9
10
|
module Domain
|
|
10
11
|
# @attr [OnlinePayments::SDK::Domain::CardDataWithoutCvv, nil] card
|
|
11
12
|
# @attr [String, nil] currency_code
|
|
13
|
+
# @attr [OnlinePayments::SDK::Domain::NetworkTokenData, nil] network_token_data
|
|
12
14
|
# @attr [Integer, nil] payment_product_id
|
|
13
15
|
# @attr [String, nil] scheme_reference_data
|
|
14
16
|
# @attr [String, nil] token_id
|
|
@@ -19,6 +21,8 @@ module OnlinePayments
|
|
|
19
21
|
|
|
20
22
|
attr_accessor :currency_code
|
|
21
23
|
|
|
24
|
+
attr_accessor :network_token_data
|
|
25
|
+
|
|
22
26
|
attr_accessor :payment_product_id
|
|
23
27
|
|
|
24
28
|
attr_accessor :scheme_reference_data
|
|
@@ -39,6 +43,12 @@ module OnlinePayments
|
|
|
39
43
|
self
|
|
40
44
|
end
|
|
41
45
|
|
|
46
|
+
# Sets the property and returns this same instance.
|
|
47
|
+
def with_network_token_data(value)
|
|
48
|
+
@network_token_data = value
|
|
49
|
+
self
|
|
50
|
+
end
|
|
51
|
+
|
|
42
52
|
# Sets the property and returns this same instance.
|
|
43
53
|
def with_payment_product_id(value)
|
|
44
54
|
@payment_product_id = value
|
|
@@ -68,6 +78,7 @@ module OnlinePayments
|
|
|
68
78
|
hash = super
|
|
69
79
|
hash['card'] = @card.to_h unless @card.nil?
|
|
70
80
|
hash['currencyCode'] = @currency_code unless @currency_code.nil?
|
|
81
|
+
hash['networkTokenData'] = @network_token_data.to_h unless @network_token_data.nil?
|
|
71
82
|
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
|
72
83
|
hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
|
|
73
84
|
hash['tokenId'] = @token_id unless @token_id.nil?
|
|
@@ -84,6 +95,10 @@ module OnlinePayments
|
|
|
84
95
|
if hash.has_key? 'currencyCode'
|
|
85
96
|
@currency_code = hash['currencyCode']
|
|
86
97
|
end
|
|
98
|
+
if hash.has_key? 'networkTokenData'
|
|
99
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['networkTokenData']] unless hash['networkTokenData'].is_a? Hash
|
|
100
|
+
@network_token_data = OnlinePayments::SDK::Domain::NetworkTokenData.new_from_hash(hash['networkTokenData'])
|
|
101
|
+
end
|
|
87
102
|
if hash.has_key? 'paymentProductId'
|
|
88
103
|
@payment_product_id = hash['paymentProductId']
|
|
89
104
|
end
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#
|
|
2
2
|
# This file was automatically generated.
|
|
3
3
|
#
|
|
4
|
+
require 'date'
|
|
5
|
+
|
|
4
6
|
require 'onlinepayments/sdk/domain/amount_of_money'
|
|
5
7
|
require 'onlinepayments/sdk/domain/data_object'
|
|
6
8
|
require 'onlinepayments/sdk/domain/operation_payment_references'
|
|
@@ -17,6 +19,7 @@ module OnlinePayments
|
|
|
17
19
|
# @attr [OnlinePayments::SDK::Domain::PaymentReferences, nil] references
|
|
18
20
|
# @attr [String, nil] status
|
|
19
21
|
# @attr [OnlinePayments::SDK::Domain::PaymentStatusOutput, nil] status_output
|
|
22
|
+
# @attr [DateTime, nil] transaction_date
|
|
20
23
|
class OperationOutput < OnlinePayments::SDK::Domain::DataObject
|
|
21
24
|
|
|
22
25
|
attr_accessor :amount_of_money
|
|
@@ -33,6 +36,8 @@ module OnlinePayments
|
|
|
33
36
|
|
|
34
37
|
attr_accessor :status_output
|
|
35
38
|
|
|
39
|
+
attr_accessor :transaction_date
|
|
40
|
+
|
|
36
41
|
# Sets the property and returns this same instance.
|
|
37
42
|
def with_amount_of_money(value)
|
|
38
43
|
@amount_of_money = value
|
|
@@ -75,6 +80,12 @@ module OnlinePayments
|
|
|
75
80
|
self
|
|
76
81
|
end
|
|
77
82
|
|
|
83
|
+
# Sets the property and returns this same instance.
|
|
84
|
+
def with_transaction_date(value)
|
|
85
|
+
@transaction_date = value
|
|
86
|
+
self
|
|
87
|
+
end
|
|
88
|
+
|
|
78
89
|
# @return (Hash)
|
|
79
90
|
def to_h
|
|
80
91
|
hash = super
|
|
@@ -85,6 +96,7 @@ module OnlinePayments
|
|
|
85
96
|
hash['references'] = @references.to_h unless @references.nil?
|
|
86
97
|
hash['status'] = @status unless @status.nil?
|
|
87
98
|
hash['statusOutput'] = @status_output.to_h unless @status_output.nil?
|
|
99
|
+
hash['transactionDate'] = @transaction_date.iso8601(3) unless @transaction_date.nil?
|
|
88
100
|
hash
|
|
89
101
|
end
|
|
90
102
|
|
|
@@ -115,6 +127,9 @@ module OnlinePayments
|
|
|
115
127
|
raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash
|
|
116
128
|
@status_output = OnlinePayments::SDK::Domain::PaymentStatusOutput.new_from_hash(hash['statusOutput'])
|
|
117
129
|
end
|
|
130
|
+
if hash.has_key? 'transactionDate'
|
|
131
|
+
@transaction_date = DateTime.parse(hash['transactionDate'])
|
|
132
|
+
end
|
|
118
133
|
end
|
|
119
134
|
end
|
|
120
135
|
end
|
|
@@ -0,0 +1,49 @@
|
|
|
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, nil] page
|
|
10
|
+
# @attr [Integer, nil] page_size
|
|
11
|
+
class Pagination < OnlinePayments::SDK::Domain::DataObject
|
|
12
|
+
|
|
13
|
+
attr_accessor :page
|
|
14
|
+
|
|
15
|
+
attr_accessor :page_size
|
|
16
|
+
|
|
17
|
+
# Sets the property and returns this same instance.
|
|
18
|
+
def with_page(value)
|
|
19
|
+
@page = value
|
|
20
|
+
self
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Sets the property and returns this same instance.
|
|
24
|
+
def with_page_size(value)
|
|
25
|
+
@page_size = value
|
|
26
|
+
self
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# @return (Hash)
|
|
30
|
+
def to_h
|
|
31
|
+
hash = super
|
|
32
|
+
hash['page'] = @page unless @page.nil?
|
|
33
|
+
hash['pageSize'] = @page_size unless @page_size.nil?
|
|
34
|
+
hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def from_hash(hash)
|
|
38
|
+
super
|
|
39
|
+
if hash.has_key? 'page'
|
|
40
|
+
@page = hash['page']
|
|
41
|
+
end
|
|
42
|
+
if hash.has_key? 'pageSize'
|
|
43
|
+
@page_size = hash['pageSize']
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'date'
|
|
5
|
+
|
|
6
|
+
require 'onlinepayments/sdk/domain/amount_of_money'
|
|
7
|
+
require 'onlinepayments/sdk/domain/data_object'
|
|
8
|
+
|
|
9
|
+
module OnlinePayments
|
|
10
|
+
module SDK
|
|
11
|
+
module Domain
|
|
12
|
+
# @attr [OnlinePayments::SDK::Domain::AmountOfMoney, nil] amount
|
|
13
|
+
# @attr [String, nil] created_by
|
|
14
|
+
# @attr [DateTime, nil] creation_date
|
|
15
|
+
# @attr [DateTime, nil] expiration_date
|
|
16
|
+
# @attr [true/false, nil] is_reusable_link
|
|
17
|
+
# @attr [String, nil] merchant_id
|
|
18
|
+
# @attr [String, nil] merchant_reference
|
|
19
|
+
# @attr [String, nil] payment_link_id
|
|
20
|
+
# @attr [String, nil] redirection_url
|
|
21
|
+
# @attr [String, nil] status
|
|
22
|
+
class PaymentLinkOverviewEntry < OnlinePayments::SDK::Domain::DataObject
|
|
23
|
+
|
|
24
|
+
attr_accessor :amount
|
|
25
|
+
|
|
26
|
+
attr_accessor :created_by
|
|
27
|
+
|
|
28
|
+
attr_accessor :creation_date
|
|
29
|
+
|
|
30
|
+
attr_accessor :expiration_date
|
|
31
|
+
|
|
32
|
+
attr_accessor :is_reusable_link
|
|
33
|
+
|
|
34
|
+
attr_accessor :merchant_id
|
|
35
|
+
|
|
36
|
+
attr_accessor :merchant_reference
|
|
37
|
+
|
|
38
|
+
attr_accessor :payment_link_id
|
|
39
|
+
|
|
40
|
+
attr_accessor :redirection_url
|
|
41
|
+
|
|
42
|
+
attr_accessor :status
|
|
43
|
+
|
|
44
|
+
# Sets the property and returns this same instance.
|
|
45
|
+
def with_amount(value)
|
|
46
|
+
@amount = value
|
|
47
|
+
self
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Sets the property and returns this same instance.
|
|
51
|
+
def with_created_by(value)
|
|
52
|
+
@created_by = value
|
|
53
|
+
self
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Sets the property and returns this same instance.
|
|
57
|
+
def with_creation_date(value)
|
|
58
|
+
@creation_date = value
|
|
59
|
+
self
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Sets the property and returns this same instance.
|
|
63
|
+
def with_expiration_date(value)
|
|
64
|
+
@expiration_date = value
|
|
65
|
+
self
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Sets the property and returns this same instance.
|
|
69
|
+
def with_is_reusable_link(value)
|
|
70
|
+
@is_reusable_link = value
|
|
71
|
+
self
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Sets the property and returns this same instance.
|
|
75
|
+
def with_merchant_id(value)
|
|
76
|
+
@merchant_id = value
|
|
77
|
+
self
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Sets the property and returns this same instance.
|
|
81
|
+
def with_merchant_reference(value)
|
|
82
|
+
@merchant_reference = value
|
|
83
|
+
self
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Sets the property and returns this same instance.
|
|
87
|
+
def with_payment_link_id(value)
|
|
88
|
+
@payment_link_id = value
|
|
89
|
+
self
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Sets the property and returns this same instance.
|
|
93
|
+
def with_redirection_url(value)
|
|
94
|
+
@redirection_url = value
|
|
95
|
+
self
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Sets the property and returns this same instance.
|
|
99
|
+
def with_status(value)
|
|
100
|
+
@status = value
|
|
101
|
+
self
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @return (Hash)
|
|
105
|
+
def to_h
|
|
106
|
+
hash = super
|
|
107
|
+
hash['amount'] = @amount.to_h unless @amount.nil?
|
|
108
|
+
hash['createdBy'] = @created_by unless @created_by.nil?
|
|
109
|
+
hash['creationDate'] = @creation_date.iso8601(3) unless @creation_date.nil?
|
|
110
|
+
hash['expirationDate'] = @expiration_date.iso8601(3) unless @expiration_date.nil?
|
|
111
|
+
hash['isReusableLink'] = @is_reusable_link unless @is_reusable_link.nil?
|
|
112
|
+
hash['merchantId'] = @merchant_id unless @merchant_id.nil?
|
|
113
|
+
hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
|
|
114
|
+
hash['paymentLinkId'] = @payment_link_id unless @payment_link_id.nil?
|
|
115
|
+
hash['redirectionUrl'] = @redirection_url unless @redirection_url.nil?
|
|
116
|
+
hash['status'] = @status unless @status.nil?
|
|
117
|
+
hash
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def from_hash(hash)
|
|
121
|
+
super
|
|
122
|
+
if hash.has_key? 'amount'
|
|
123
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['amount']] unless hash['amount'].is_a? Hash
|
|
124
|
+
@amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amount'])
|
|
125
|
+
end
|
|
126
|
+
if hash.has_key? 'createdBy'
|
|
127
|
+
@created_by = hash['createdBy']
|
|
128
|
+
end
|
|
129
|
+
if hash.has_key? 'creationDate'
|
|
130
|
+
@creation_date = DateTime.parse(hash['creationDate'])
|
|
131
|
+
end
|
|
132
|
+
if hash.has_key? 'expirationDate'
|
|
133
|
+
@expiration_date = DateTime.parse(hash['expirationDate'])
|
|
134
|
+
end
|
|
135
|
+
if hash.has_key? 'isReusableLink'
|
|
136
|
+
@is_reusable_link = hash['isReusableLink']
|
|
137
|
+
end
|
|
138
|
+
if hash.has_key? 'merchantId'
|
|
139
|
+
@merchant_id = hash['merchantId']
|
|
140
|
+
end
|
|
141
|
+
if hash.has_key? 'merchantReference'
|
|
142
|
+
@merchant_reference = hash['merchantReference']
|
|
143
|
+
end
|
|
144
|
+
if hash.has_key? 'paymentLinkId'
|
|
145
|
+
@payment_link_id = hash['paymentLinkId']
|
|
146
|
+
end
|
|
147
|
+
if hash.has_key? 'redirectionUrl'
|
|
148
|
+
@redirection_url = hash['redirectionUrl']
|
|
149
|
+
end
|
|
150
|
+
if hash.has_key? 'status'
|
|
151
|
+
@status = hash['status']
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
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 [Array<String>, nil] merchant_ids
|
|
10
|
+
# @attr [Array<String>, nil] status
|
|
11
|
+
class PaymentLinkOverviewFiltering < OnlinePayments::SDK::Domain::DataObject
|
|
12
|
+
|
|
13
|
+
attr_accessor :merchant_ids
|
|
14
|
+
|
|
15
|
+
attr_accessor :status
|
|
16
|
+
|
|
17
|
+
# Sets the property and returns this same instance.
|
|
18
|
+
def with_merchant_ids(value)
|
|
19
|
+
@merchant_ids = value
|
|
20
|
+
self
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Sets the property and returns this same instance.
|
|
24
|
+
def with_status(value)
|
|
25
|
+
@status = value
|
|
26
|
+
self
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# @return (Hash)
|
|
30
|
+
def to_h
|
|
31
|
+
hash = super
|
|
32
|
+
hash['merchantIds'] = @merchant_ids unless @merchant_ids.nil?
|
|
33
|
+
hash['status'] = @status unless @status.nil?
|
|
34
|
+
hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def from_hash(hash)
|
|
38
|
+
super
|
|
39
|
+
if hash.has_key? 'merchantIds'
|
|
40
|
+
raise TypeError, "value '%s' is not an Array" % [hash['merchantIds']] unless hash['merchantIds'].is_a? Array
|
|
41
|
+
@merchant_ids = []
|
|
42
|
+
hash['merchantIds'].each do |e|
|
|
43
|
+
@merchant_ids << e
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
if hash.has_key? 'status'
|
|
47
|
+
raise TypeError, "value '%s' is not an Array" % [hash['status']] unless hash['status'].is_a? Array
|
|
48
|
+
@status = []
|
|
49
|
+
hash['status'].each do |e|
|
|
50
|
+
@status << e
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/domain/data_object'
|
|
5
|
+
require 'onlinepayments/sdk/domain/pagination'
|
|
6
|
+
require 'onlinepayments/sdk/domain/payment_link_overview_entry'
|
|
7
|
+
|
|
8
|
+
module OnlinePayments
|
|
9
|
+
module SDK
|
|
10
|
+
module Domain
|
|
11
|
+
# @attr [OnlinePayments::SDK::Domain::Pagination, nil] pagination
|
|
12
|
+
# @attr [Array<OnlinePayments::SDK::Domain::PaymentLinkOverviewEntry>, nil] payment_link_overview_entries
|
|
13
|
+
# @attr [Integer, nil] total
|
|
14
|
+
class PaymentLinkOverviewResponse < OnlinePayments::SDK::Domain::DataObject
|
|
15
|
+
|
|
16
|
+
attr_accessor :pagination
|
|
17
|
+
|
|
18
|
+
attr_accessor :payment_link_overview_entries
|
|
19
|
+
|
|
20
|
+
attr_accessor :total
|
|
21
|
+
|
|
22
|
+
# Sets the property and returns this same instance.
|
|
23
|
+
def with_pagination(value)
|
|
24
|
+
@pagination = value
|
|
25
|
+
self
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Sets the property and returns this same instance.
|
|
29
|
+
def with_payment_link_overview_entries(value)
|
|
30
|
+
@payment_link_overview_entries = value
|
|
31
|
+
self
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Sets the property and returns this same instance.
|
|
35
|
+
def with_total(value)
|
|
36
|
+
@total = value
|
|
37
|
+
self
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# @return (Hash)
|
|
41
|
+
def to_h
|
|
42
|
+
hash = super
|
|
43
|
+
hash['pagination'] = @pagination.to_h unless @pagination.nil?
|
|
44
|
+
hash['paymentLinkOverviewEntries'] = @payment_link_overview_entries.collect{|val| val.to_h} unless @payment_link_overview_entries.nil?
|
|
45
|
+
hash['total'] = @total unless @total.nil?
|
|
46
|
+
hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def from_hash(hash)
|
|
50
|
+
super
|
|
51
|
+
if hash.has_key? 'pagination'
|
|
52
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['pagination']] unless hash['pagination'].is_a? Hash
|
|
53
|
+
@pagination = OnlinePayments::SDK::Domain::Pagination.new_from_hash(hash['pagination'])
|
|
54
|
+
end
|
|
55
|
+
if hash.has_key? 'paymentLinkOverviewEntries'
|
|
56
|
+
raise TypeError, "value '%s' is not an Array" % [hash['paymentLinkOverviewEntries']] unless hash['paymentLinkOverviewEntries'].is_a? Array
|
|
57
|
+
@payment_link_overview_entries = []
|
|
58
|
+
hash['paymentLinkOverviewEntries'].each do |e|
|
|
59
|
+
@payment_link_overview_entries << OnlinePayments::SDK::Domain::PaymentLinkOverviewEntry.new_from_hash(e)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
if hash.has_key? 'total'
|
|
63
|
+
@total = hash['total']
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
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 [String, nil] sort_direction
|
|
10
|
+
# @attr [String, nil] sort_property
|
|
11
|
+
class PaymentLinkOverviewSorting < OnlinePayments::SDK::Domain::DataObject
|
|
12
|
+
|
|
13
|
+
attr_accessor :sort_direction
|
|
14
|
+
|
|
15
|
+
attr_accessor :sort_property
|
|
16
|
+
|
|
17
|
+
# Sets the property and returns this same instance.
|
|
18
|
+
def with_sort_direction(value)
|
|
19
|
+
@sort_direction = value
|
|
20
|
+
self
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Sets the property and returns this same instance.
|
|
24
|
+
def with_sort_property(value)
|
|
25
|
+
@sort_property = value
|
|
26
|
+
self
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# @return (Hash)
|
|
30
|
+
def to_h
|
|
31
|
+
hash = super
|
|
32
|
+
hash['sortDirection'] = @sort_direction unless @sort_direction.nil?
|
|
33
|
+
hash['sortProperty'] = @sort_property unless @sort_property.nil?
|
|
34
|
+
hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def from_hash(hash)
|
|
38
|
+
super
|
|
39
|
+
if hash.has_key? 'sortDirection'
|
|
40
|
+
@sort_direction = hash['sortDirection']
|
|
41
|
+
end
|
|
42
|
+
if hash.has_key? 'sortProperty'
|
|
43
|
+
@sort_property = hash['sortProperty']
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -25,6 +25,7 @@ module OnlinePayments
|
|
|
25
25
|
# @attr [OnlinePayments::SDK::Domain::Discount, nil] discount
|
|
26
26
|
# @attr [String, nil] merchant_parameters
|
|
27
27
|
# @attr [OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificOutput, nil] mobile_payment_method_specific_output
|
|
28
|
+
# @attr [DateTime, nil] payment_creation_date
|
|
28
29
|
# @attr [String, nil] payment_method
|
|
29
30
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificOutput, nil] redirect_payment_method_specific_output
|
|
30
31
|
# @attr [OnlinePayments::SDK::Domain::PaymentReferences, nil] references
|
|
@@ -50,6 +51,8 @@ module OnlinePayments
|
|
|
50
51
|
|
|
51
52
|
attr_accessor :mobile_payment_method_specific_output
|
|
52
53
|
|
|
54
|
+
attr_accessor :payment_creation_date
|
|
55
|
+
|
|
53
56
|
attr_accessor :payment_method
|
|
54
57
|
|
|
55
58
|
attr_accessor :redirect_payment_method_specific_output
|
|
@@ -110,6 +113,12 @@ module OnlinePayments
|
|
|
110
113
|
self
|
|
111
114
|
end
|
|
112
115
|
|
|
116
|
+
# Sets the property and returns this same instance.
|
|
117
|
+
def with_payment_creation_date(value)
|
|
118
|
+
@payment_creation_date = value
|
|
119
|
+
self
|
|
120
|
+
end
|
|
121
|
+
|
|
113
122
|
# Sets the property and returns this same instance.
|
|
114
123
|
def with_payment_method(value)
|
|
115
124
|
@payment_method = value
|
|
@@ -157,6 +166,7 @@ module OnlinePayments
|
|
|
157
166
|
hash['discount'] = @discount.to_h unless @discount.nil?
|
|
158
167
|
hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
|
|
159
168
|
hash['mobilePaymentMethodSpecificOutput'] = @mobile_payment_method_specific_output.to_h unless @mobile_payment_method_specific_output.nil?
|
|
169
|
+
hash['paymentCreationDate'] = @payment_creation_date.iso8601(3) unless @payment_creation_date.nil?
|
|
160
170
|
hash['paymentMethod'] = @payment_method unless @payment_method.nil?
|
|
161
171
|
hash['redirectPaymentMethodSpecificOutput'] = @redirect_payment_method_specific_output.to_h unless @redirect_payment_method_specific_output.nil?
|
|
162
172
|
hash['references'] = @references.to_h unless @references.nil?
|
|
@@ -198,6 +208,9 @@ module OnlinePayments
|
|
|
198
208
|
raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificOutput']] unless hash['mobilePaymentMethodSpecificOutput'].is_a? Hash
|
|
199
209
|
@mobile_payment_method_specific_output = OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificOutput.new_from_hash(hash['mobilePaymentMethodSpecificOutput'])
|
|
200
210
|
end
|
|
211
|
+
if hash.has_key? 'paymentCreationDate'
|
|
212
|
+
@payment_creation_date = DateTime.parse(hash['paymentCreationDate'])
|
|
213
|
+
end
|
|
201
214
|
if hash.has_key? 'paymentMethod'
|
|
202
215
|
@payment_method = hash['paymentMethod']
|
|
203
216
|
end
|
|
@@ -0,0 +1,57 @@
|
|
|
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 [Array<Integer>, nil] exclude
|
|
10
|
+
# @attr [Array<Integer>, nil] restrict_to
|
|
11
|
+
class PaymentProductFiltersHostedFields < OnlinePayments::SDK::Domain::DataObject
|
|
12
|
+
|
|
13
|
+
attr_accessor :exclude
|
|
14
|
+
|
|
15
|
+
attr_accessor :restrict_to
|
|
16
|
+
|
|
17
|
+
# Sets the property and returns this same instance.
|
|
18
|
+
def with_exclude(value)
|
|
19
|
+
@exclude = value
|
|
20
|
+
self
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Sets the property and returns this same instance.
|
|
24
|
+
def with_restrict_to(value)
|
|
25
|
+
@restrict_to = value
|
|
26
|
+
self
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# @return (Hash)
|
|
30
|
+
def to_h
|
|
31
|
+
hash = super
|
|
32
|
+
hash['exclude'] = @exclude unless @exclude.nil?
|
|
33
|
+
hash['restrictTo'] = @restrict_to unless @restrict_to.nil?
|
|
34
|
+
hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def from_hash(hash)
|
|
38
|
+
super
|
|
39
|
+
if hash.has_key? 'exclude'
|
|
40
|
+
raise TypeError, "value '%s' is not an Array" % [hash['exclude']] unless hash['exclude'].is_a? Array
|
|
41
|
+
@exclude = []
|
|
42
|
+
hash['exclude'].each do |e|
|
|
43
|
+
@exclude << e
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
if hash.has_key? 'restrictTo'
|
|
47
|
+
raise TypeError, "value '%s' is not an Array" % [hash['restrictTo']] unless hash['restrictTo'].is_a? Array
|
|
48
|
+
@restrict_to = []
|
|
49
|
+
hash['restrictTo'].each do |e|
|
|
50
|
+
@restrict_to << e
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -12,6 +12,7 @@ module OnlinePayments
|
|
|
12
12
|
module SDK
|
|
13
13
|
module Domain
|
|
14
14
|
# @attr [OnlinePayments::SDK::Domain::AmountOfMoney, nil] amount_of_money
|
|
15
|
+
# @attr [DateTime, nil] payment_creation_date
|
|
15
16
|
# @attr [OnlinePayments::SDK::Domain::PayoutCardPaymentMethodSpecificOutput, nil] payout_card_payment_method_specific_output
|
|
16
17
|
# @attr [String, nil] payout_reason
|
|
17
18
|
# @attr [OnlinePayments::SDK::Domain::PaymentReferences, nil] references
|
|
@@ -20,6 +21,8 @@ module OnlinePayments
|
|
|
20
21
|
|
|
21
22
|
attr_accessor :amount_of_money
|
|
22
23
|
|
|
24
|
+
attr_accessor :payment_creation_date
|
|
25
|
+
|
|
23
26
|
attr_accessor :payout_card_payment_method_specific_output
|
|
24
27
|
|
|
25
28
|
attr_accessor :payout_reason
|
|
@@ -34,6 +37,12 @@ module OnlinePayments
|
|
|
34
37
|
self
|
|
35
38
|
end
|
|
36
39
|
|
|
40
|
+
# Sets the property and returns this same instance.
|
|
41
|
+
def with_payment_creation_date(value)
|
|
42
|
+
@payment_creation_date = value
|
|
43
|
+
self
|
|
44
|
+
end
|
|
45
|
+
|
|
37
46
|
# Sets the property and returns this same instance.
|
|
38
47
|
def with_payout_card_payment_method_specific_output(value)
|
|
39
48
|
@payout_card_payment_method_specific_output = value
|
|
@@ -62,6 +71,7 @@ module OnlinePayments
|
|
|
62
71
|
def to_h
|
|
63
72
|
hash = super
|
|
64
73
|
hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
|
|
74
|
+
hash['paymentCreationDate'] = @payment_creation_date.iso8601(3) unless @payment_creation_date.nil?
|
|
65
75
|
hash['payoutCardPaymentMethodSpecificOutput'] = @payout_card_payment_method_specific_output.to_h unless @payout_card_payment_method_specific_output.nil?
|
|
66
76
|
hash['payoutReason'] = @payout_reason unless @payout_reason.nil?
|
|
67
77
|
hash['references'] = @references.to_h unless @references.nil?
|
|
@@ -75,6 +85,9 @@ module OnlinePayments
|
|
|
75
85
|
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
|
|
76
86
|
@amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
|
|
77
87
|
end
|
|
88
|
+
if hash.has_key? 'paymentCreationDate'
|
|
89
|
+
@payment_creation_date = DateTime.parse(hash['paymentCreationDate'])
|
|
90
|
+
end
|
|
78
91
|
if hash.has_key? 'payoutCardPaymentMethodSpecificOutput'
|
|
79
92
|
raise TypeError, "value '%s' is not a Hash" % [hash['payoutCardPaymentMethodSpecificOutput']] unless hash['payoutCardPaymentMethodSpecificOutput'].is_a? Hash
|
|
80
93
|
@payout_card_payment_method_specific_output = OnlinePayments::SDK::Domain::PayoutCardPaymentMethodSpecificOutput.new_from_hash(hash['payoutCardPaymentMethodSpecificOutput'])
|
|
@@ -1,29 +1,58 @@
|
|
|
1
1
|
#
|
|
2
2
|
# This file was automatically generated.
|
|
3
3
|
#
|
|
4
|
+
require 'onlinepayments/sdk/domain/acceptance'
|
|
4
5
|
require 'onlinepayments/sdk/domain/currency_conversion'
|
|
5
6
|
require 'onlinepayments/sdk/domain/data_object'
|
|
7
|
+
require 'onlinepayments/sdk/domain/reattempt_instructions'
|
|
6
8
|
|
|
7
9
|
module OnlinePayments
|
|
8
10
|
module SDK
|
|
9
11
|
module Domain
|
|
12
|
+
# @attr [OnlinePayments::SDK::Domain::Acceptance, nil] acceptance
|
|
13
|
+
# @attr [String, nil] authorisation_code
|
|
10
14
|
# @attr [OnlinePayments::SDK::Domain::CurrencyConversion, nil] currency_conversion
|
|
15
|
+
# @attr [OnlinePayments::SDK::Domain::ReattemptInstructions, nil] reattempt_instructions
|
|
11
16
|
# @attr [Integer, nil] total_amount_paid
|
|
12
17
|
# @attr [Integer, nil] total_amount_refunded
|
|
13
18
|
class RefundCardMethodSpecificOutput < OnlinePayments::SDK::Domain::DataObject
|
|
14
19
|
|
|
20
|
+
attr_accessor :acceptance
|
|
21
|
+
|
|
22
|
+
attr_accessor :authorisation_code
|
|
23
|
+
|
|
15
24
|
attr_accessor :currency_conversion
|
|
16
25
|
|
|
26
|
+
attr_accessor :reattempt_instructions
|
|
27
|
+
|
|
17
28
|
attr_accessor :total_amount_paid
|
|
18
29
|
|
|
19
30
|
attr_accessor :total_amount_refunded
|
|
20
31
|
|
|
32
|
+
# Sets the property and returns this same instance.
|
|
33
|
+
def with_acceptance(value)
|
|
34
|
+
@acceptance = value
|
|
35
|
+
self
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Sets the property and returns this same instance.
|
|
39
|
+
def with_authorisation_code(value)
|
|
40
|
+
@authorisation_code = value
|
|
41
|
+
self
|
|
42
|
+
end
|
|
43
|
+
|
|
21
44
|
# Sets the property and returns this same instance.
|
|
22
45
|
def with_currency_conversion(value)
|
|
23
46
|
@currency_conversion = value
|
|
24
47
|
self
|
|
25
48
|
end
|
|
26
49
|
|
|
50
|
+
# Sets the property and returns this same instance.
|
|
51
|
+
def with_reattempt_instructions(value)
|
|
52
|
+
@reattempt_instructions = value
|
|
53
|
+
self
|
|
54
|
+
end
|
|
55
|
+
|
|
27
56
|
# Sets the property and returns this same instance.
|
|
28
57
|
def with_total_amount_paid(value)
|
|
29
58
|
@total_amount_paid = value
|
|
@@ -39,7 +68,10 @@ module OnlinePayments
|
|
|
39
68
|
# @return (Hash)
|
|
40
69
|
def to_h
|
|
41
70
|
hash = super
|
|
71
|
+
hash['acceptance'] = @acceptance.to_h unless @acceptance.nil?
|
|
72
|
+
hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
|
|
42
73
|
hash['currencyConversion'] = @currency_conversion.to_h unless @currency_conversion.nil?
|
|
74
|
+
hash['reattemptInstructions'] = @reattempt_instructions.to_h unless @reattempt_instructions.nil?
|
|
43
75
|
hash['totalAmountPaid'] = @total_amount_paid unless @total_amount_paid.nil?
|
|
44
76
|
hash['totalAmountRefunded'] = @total_amount_refunded unless @total_amount_refunded.nil?
|
|
45
77
|
hash
|
|
@@ -47,10 +79,21 @@ module OnlinePayments
|
|
|
47
79
|
|
|
48
80
|
def from_hash(hash)
|
|
49
81
|
super
|
|
82
|
+
if hash.has_key? 'acceptance'
|
|
83
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['acceptance']] unless hash['acceptance'].is_a? Hash
|
|
84
|
+
@acceptance = OnlinePayments::SDK::Domain::Acceptance.new_from_hash(hash['acceptance'])
|
|
85
|
+
end
|
|
86
|
+
if hash.has_key? 'authorisationCode'
|
|
87
|
+
@authorisation_code = hash['authorisationCode']
|
|
88
|
+
end
|
|
50
89
|
if hash.has_key? 'currencyConversion'
|
|
51
90
|
raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
|
|
52
91
|
@currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversion.new_from_hash(hash['currencyConversion'])
|
|
53
92
|
end
|
|
93
|
+
if hash.has_key? 'reattemptInstructions'
|
|
94
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['reattemptInstructions']] unless hash['reattemptInstructions'].is_a? Hash
|
|
95
|
+
@reattempt_instructions = OnlinePayments::SDK::Domain::ReattemptInstructions.new_from_hash(hash['reattemptInstructions'])
|
|
96
|
+
end
|
|
54
97
|
if hash.has_key? 'totalAmountPaid'
|
|
55
98
|
@total_amount_paid = hash['totalAmountPaid']
|
|
56
99
|
end
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#
|
|
2
2
|
# This file was automatically generated.
|
|
3
3
|
#
|
|
4
|
+
require 'date'
|
|
5
|
+
|
|
4
6
|
require 'onlinepayments/sdk/domain/amount_of_money'
|
|
5
7
|
require 'onlinepayments/sdk/domain/data_object'
|
|
6
8
|
require 'onlinepayments/sdk/domain/operation_payment_references'
|
|
@@ -20,9 +22,11 @@ module OnlinePayments
|
|
|
20
22
|
# @attr [String, nil] merchant_parameters
|
|
21
23
|
# @attr [OnlinePayments::SDK::Domain::RefundMobileMethodSpecificOutput, nil] mobile_refund_method_specific_output
|
|
22
24
|
# @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences, nil] operation_references
|
|
25
|
+
# @attr [DateTime, nil] payment_creation_date
|
|
23
26
|
# @attr [String, nil] payment_method
|
|
24
27
|
# @attr [OnlinePayments::SDK::Domain::RefundRedirectMethodSpecificOutput, nil] redirect_refund_method_specific_output
|
|
25
28
|
# @attr [OnlinePayments::SDK::Domain::PaymentReferences, nil] references
|
|
29
|
+
# @attr [DateTime, nil] transaction_date
|
|
26
30
|
class RefundOutput < OnlinePayments::SDK::Domain::DataObject
|
|
27
31
|
|
|
28
32
|
attr_accessor :amount_of_money
|
|
@@ -39,12 +43,16 @@ module OnlinePayments
|
|
|
39
43
|
|
|
40
44
|
attr_accessor :operation_references
|
|
41
45
|
|
|
46
|
+
attr_accessor :payment_creation_date
|
|
47
|
+
|
|
42
48
|
attr_accessor :payment_method
|
|
43
49
|
|
|
44
50
|
attr_accessor :redirect_refund_method_specific_output
|
|
45
51
|
|
|
46
52
|
attr_accessor :references
|
|
47
53
|
|
|
54
|
+
attr_accessor :transaction_date
|
|
55
|
+
|
|
48
56
|
# Sets the property and returns this same instance.
|
|
49
57
|
def with_amount_of_money(value)
|
|
50
58
|
@amount_of_money = value
|
|
@@ -87,6 +95,12 @@ module OnlinePayments
|
|
|
87
95
|
self
|
|
88
96
|
end
|
|
89
97
|
|
|
98
|
+
# Sets the property and returns this same instance.
|
|
99
|
+
def with_payment_creation_date(value)
|
|
100
|
+
@payment_creation_date = value
|
|
101
|
+
self
|
|
102
|
+
end
|
|
103
|
+
|
|
90
104
|
# Sets the property and returns this same instance.
|
|
91
105
|
def with_payment_method(value)
|
|
92
106
|
@payment_method = value
|
|
@@ -105,6 +119,12 @@ module OnlinePayments
|
|
|
105
119
|
self
|
|
106
120
|
end
|
|
107
121
|
|
|
122
|
+
# Sets the property and returns this same instance.
|
|
123
|
+
def with_transaction_date(value)
|
|
124
|
+
@transaction_date = value
|
|
125
|
+
self
|
|
126
|
+
end
|
|
127
|
+
|
|
108
128
|
# @return (Hash)
|
|
109
129
|
def to_h
|
|
110
130
|
hash = super
|
|
@@ -115,9 +135,11 @@ module OnlinePayments
|
|
|
115
135
|
hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
|
|
116
136
|
hash['mobileRefundMethodSpecificOutput'] = @mobile_refund_method_specific_output.to_h unless @mobile_refund_method_specific_output.nil?
|
|
117
137
|
hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
|
|
138
|
+
hash['paymentCreationDate'] = @payment_creation_date.iso8601(3) unless @payment_creation_date.nil?
|
|
118
139
|
hash['paymentMethod'] = @payment_method unless @payment_method.nil?
|
|
119
140
|
hash['redirectRefundMethodSpecificOutput'] = @redirect_refund_method_specific_output.to_h unless @redirect_refund_method_specific_output.nil?
|
|
120
141
|
hash['references'] = @references.to_h unless @references.nil?
|
|
142
|
+
hash['transactionDate'] = @transaction_date.iso8601(3) unless @transaction_date.nil?
|
|
121
143
|
hash
|
|
122
144
|
end
|
|
123
145
|
|
|
@@ -149,6 +171,9 @@ module OnlinePayments
|
|
|
149
171
|
raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
|
|
150
172
|
@operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
|
|
151
173
|
end
|
|
174
|
+
if hash.has_key? 'paymentCreationDate'
|
|
175
|
+
@payment_creation_date = DateTime.parse(hash['paymentCreationDate'])
|
|
176
|
+
end
|
|
152
177
|
if hash.has_key? 'paymentMethod'
|
|
153
178
|
@payment_method = hash['paymentMethod']
|
|
154
179
|
end
|
|
@@ -160,6 +185,9 @@ module OnlinePayments
|
|
|
160
185
|
raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
|
|
161
186
|
@references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
|
|
162
187
|
end
|
|
188
|
+
if hash.has_key? 'transactionDate'
|
|
189
|
+
@transaction_date = DateTime.parse(hash['transactionDate'])
|
|
190
|
+
end
|
|
163
191
|
end
|
|
164
192
|
end
|
|
165
193
|
end
|
|
@@ -0,0 +1,62 @@
|
|
|
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 [String, nil] channel
|
|
10
|
+
# @attr [String, nil] locale
|
|
11
|
+
# @attr [String, nil] recipient
|
|
12
|
+
class SharePaymentLinkRequest < OnlinePayments::SDK::Domain::DataObject
|
|
13
|
+
|
|
14
|
+
attr_accessor :channel
|
|
15
|
+
|
|
16
|
+
attr_accessor :locale
|
|
17
|
+
|
|
18
|
+
attr_accessor :recipient
|
|
19
|
+
|
|
20
|
+
# Sets the property and returns this same instance.
|
|
21
|
+
def with_channel(value)
|
|
22
|
+
@channel = value
|
|
23
|
+
self
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Sets the property and returns this same instance.
|
|
27
|
+
def with_locale(value)
|
|
28
|
+
@locale = value
|
|
29
|
+
self
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Sets the property and returns this same instance.
|
|
33
|
+
def with_recipient(value)
|
|
34
|
+
@recipient = value
|
|
35
|
+
self
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# @return (Hash)
|
|
39
|
+
def to_h
|
|
40
|
+
hash = super
|
|
41
|
+
hash['channel'] = @channel unless @channel.nil?
|
|
42
|
+
hash['locale'] = @locale unless @locale.nil?
|
|
43
|
+
hash['recipient'] = @recipient unless @recipient.nil?
|
|
44
|
+
hash
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def from_hash(hash)
|
|
48
|
+
super
|
|
49
|
+
if hash.has_key? 'channel'
|
|
50
|
+
@channel = hash['channel']
|
|
51
|
+
end
|
|
52
|
+
if hash.has_key? 'locale'
|
|
53
|
+
@locale = hash['locale']
|
|
54
|
+
end
|
|
55
|
+
if hash.has_key? 'recipient'
|
|
56
|
+
@recipient = hash['recipient']
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -65,6 +65,13 @@ module OnlinePayments
|
|
|
65
65
|
OnlinePayments::SDK::Merchant::Payments::PaymentsClient.new(self, nil)
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
# Resource /v2/{merchantId}/paymentlinks/{paymentLinkId}/share
|
|
69
|
+
#
|
|
70
|
+
# @return [OnlinePayments::SDK::Merchant::PaymentLinks::PaymentLinksClient]
|
|
71
|
+
def payment_links
|
|
72
|
+
OnlinePayments::SDK::Merchant::PaymentLinks::PaymentLinksClient.new(self, nil)
|
|
73
|
+
end
|
|
74
|
+
|
|
68
75
|
# Resource /v2/{merchantId}/payments/{paymentId}/captures
|
|
69
76
|
#
|
|
70
77
|
# @return [OnlinePayments::SDK::Merchant::Captures::CapturesClient]
|
|
@@ -177,13 +184,6 @@ module OnlinePayments
|
|
|
177
184
|
OnlinePayments::SDK::Merchant::PrivacyPolicy::PrivacyPolicyClient.new(self, nil)
|
|
178
185
|
end
|
|
179
186
|
|
|
180
|
-
# Resource /v2/{merchantId}/paymentlinks
|
|
181
|
-
#
|
|
182
|
-
# @return [OnlinePayments::SDK::Merchant::PaymentLinks::PaymentLinksClient]
|
|
183
|
-
def payment_links
|
|
184
|
-
OnlinePayments::SDK::Merchant::PaymentLinks::PaymentLinksClient.new(self, nil)
|
|
185
|
-
end
|
|
186
|
-
|
|
187
187
|
# Resource /v2/{merchantId}/merchant-batches
|
|
188
188
|
#
|
|
189
189
|
# @return [OnlinePayments::SDK::Merchant::MerchantBatch::MerchantBatchClient]
|
|
@@ -5,6 +5,7 @@ require 'onlinepayments/sdk/api_resource'
|
|
|
5
5
|
require 'onlinepayments/sdk/exception_factory'
|
|
6
6
|
require 'onlinepayments/sdk/communication/response_exception'
|
|
7
7
|
require 'onlinepayments/sdk/domain/error_response'
|
|
8
|
+
require 'onlinepayments/sdk/domain/payment_link_overview_response'
|
|
8
9
|
require 'onlinepayments/sdk/domain/payment_link_response'
|
|
9
10
|
|
|
10
11
|
module OnlinePayments
|
|
@@ -20,6 +21,40 @@ module OnlinePayments
|
|
|
20
21
|
super(parent: parent, path_context: path_context)
|
|
21
22
|
end
|
|
22
23
|
|
|
24
|
+
# Resource /v2/!{merchantId}/paymentlinks/!{paymentLinkId}/share - Share the specified payment link to a customer.
|
|
25
|
+
#
|
|
26
|
+
# @param payment_link_id [String]
|
|
27
|
+
# @param body [OnlinePayments::SDK::Domain::SharePaymentLinkRequest]
|
|
28
|
+
# @param context [OnlinePayments::SDK::CallContext, nil]
|
|
29
|
+
# @raise [OnlinePayments::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
30
|
+
# @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
31
|
+
# @raise [OnlinePayments::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
32
|
+
# @raise [OnlinePayments::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
33
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
34
|
+
# @raise [OnlinePayments::SDK::PlatformException] if something went wrong at the payment platform,
|
|
35
|
+
# the payment platform was unable to process a message from a downstream partner/acquirer,
|
|
36
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
37
|
+
# @raise [OnlinePayments::SDK::ApiException] if the payment platform returned any other error
|
|
38
|
+
def share(payment_link_id, body, context = nil)
|
|
39
|
+
path_context = {
|
|
40
|
+
'paymentLinkId'.freeze => payment_link_id,
|
|
41
|
+
}
|
|
42
|
+
uri = instantiate_uri('/v2/{merchantId}/paymentlinks/{paymentLinkId}/share', path_context)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@communicator.post(
|
|
46
|
+
uri,
|
|
47
|
+
client_headers,
|
|
48
|
+
nil,
|
|
49
|
+
body,
|
|
50
|
+
nil,
|
|
51
|
+
context)
|
|
52
|
+
rescue OnlinePayments::SDK::Communication::ResponseException => e
|
|
53
|
+
error_type = OnlinePayments::SDK::Domain::ErrorResponse
|
|
54
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
55
|
+
raise OnlinePayments::SDK.create_exception(e.status_code, e.body, error_object, context)
|
|
56
|
+
end
|
|
57
|
+
|
|
23
58
|
# Resource /v2/!{merchantId}/paymentlinks - Create payment link
|
|
24
59
|
#
|
|
25
60
|
# @param body [OnlinePayments::SDK::Domain::CreatePaymentLinkRequest]
|
|
@@ -51,6 +86,41 @@ module OnlinePayments
|
|
|
51
86
|
raise OnlinePayments::SDK.create_exception(e.status_code, e.body, error_object, context)
|
|
52
87
|
end
|
|
53
88
|
|
|
89
|
+
# Resource /v2/merchant-groups/!{merchantGroupId}/paymentlinks/search - Retrieve payment links for a merchant group
|
|
90
|
+
#
|
|
91
|
+
# @param merchant_group_id [String]
|
|
92
|
+
# @param body [OnlinePayments::SDK::Domain::GetPaymentLinksByMerchantGroupRequest]
|
|
93
|
+
# @param context [OnlinePayments::SDK::CallContext, nil]
|
|
94
|
+
# @return [OnlinePayments::SDK::Domain::PaymentLinkOverviewResponse]
|
|
95
|
+
# @raise [OnlinePayments::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
96
|
+
# @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
97
|
+
# @raise [OnlinePayments::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
98
|
+
# @raise [OnlinePayments::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
99
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
100
|
+
# @raise [OnlinePayments::SDK::PlatformException] if something went wrong at the payment platform,
|
|
101
|
+
# the payment platform was unable to process a message from a downstream partner/acquirer,
|
|
102
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
103
|
+
# @raise [OnlinePayments::SDK::ApiException] if the payment platform returned any other error
|
|
104
|
+
def get_payment_links_by_merchant_group_id(merchant_group_id, body, context = nil)
|
|
105
|
+
path_context = {
|
|
106
|
+
'merchantGroupId'.freeze => merchant_group_id,
|
|
107
|
+
}
|
|
108
|
+
uri = instantiate_uri('/v2/merchant-groups/{merchantGroupId}/paymentlinks/search', path_context)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@communicator.post(
|
|
112
|
+
uri,
|
|
113
|
+
client_headers,
|
|
114
|
+
nil,
|
|
115
|
+
body,
|
|
116
|
+
OnlinePayments::SDK::Domain::PaymentLinkOverviewResponse,
|
|
117
|
+
context)
|
|
118
|
+
rescue OnlinePayments::SDK::Communication::ResponseException => e
|
|
119
|
+
error_type = OnlinePayments::SDK::Domain::ErrorResponse
|
|
120
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
121
|
+
raise OnlinePayments::SDK.create_exception(e.status_code, e.body, error_object, context)
|
|
122
|
+
end
|
|
123
|
+
|
|
54
124
|
# Resource /v2/!{merchantId}/paymentlinks/!{paymentLinkId} - Get payment link by ID
|
|
55
125
|
#
|
|
56
126
|
# @param payment_link_id [String]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |spec|
|
|
2
2
|
spec.name = 'onlinepayments-sdk-ruby'
|
|
3
|
-
spec.version = '10.
|
|
3
|
+
spec.version = '10.2.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,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onlinepayments-sdk-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 10.
|
|
4
|
+
version: 10.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Worldline Direct support team
|
|
@@ -305,6 +305,7 @@ files:
|
|
|
305
305
|
- lib/onlinepayments/sdk/domain/get_iin_details_request.rb
|
|
306
306
|
- lib/onlinepayments/sdk/domain/get_iin_details_response.rb
|
|
307
307
|
- lib/onlinepayments/sdk/domain/get_mandate_response.rb
|
|
308
|
+
- lib/onlinepayments/sdk/domain/get_payment_links_by_merchant_group_request.rb
|
|
308
309
|
- lib/onlinepayments/sdk/domain/get_payment_product_groups_response.rb
|
|
309
310
|
- lib/onlinepayments/sdk/domain/get_payment_products_response.rb
|
|
310
311
|
- lib/onlinepayments/sdk/domain/get_privacy_policy_response.rb
|
|
@@ -361,6 +362,7 @@ files:
|
|
|
361
362
|
- lib/onlinepayments/sdk/domain/order_status_output.rb
|
|
362
363
|
- lib/onlinepayments/sdk/domain/order_type_information.rb
|
|
363
364
|
- lib/onlinepayments/sdk/domain/other_details.rb
|
|
365
|
+
- lib/onlinepayments/sdk/domain/pagination.rb
|
|
364
366
|
- lib/onlinepayments/sdk/domain/payment_account_on_file.rb
|
|
365
367
|
- lib/onlinepayments/sdk/domain/payment_context.rb
|
|
366
368
|
- lib/onlinepayments/sdk/domain/payment_creation_output.rb
|
|
@@ -369,6 +371,10 @@ files:
|
|
|
369
371
|
- lib/onlinepayments/sdk/domain/payment_link_event.rb
|
|
370
372
|
- lib/onlinepayments/sdk/domain/payment_link_order_input.rb
|
|
371
373
|
- lib/onlinepayments/sdk/domain/payment_link_order_output.rb
|
|
374
|
+
- lib/onlinepayments/sdk/domain/payment_link_overview_entry.rb
|
|
375
|
+
- lib/onlinepayments/sdk/domain/payment_link_overview_filtering.rb
|
|
376
|
+
- lib/onlinepayments/sdk/domain/payment_link_overview_response.rb
|
|
377
|
+
- lib/onlinepayments/sdk/domain/payment_link_overview_sorting.rb
|
|
372
378
|
- lib/onlinepayments/sdk/domain/payment_link_response.rb
|
|
373
379
|
- lib/onlinepayments/sdk/domain/payment_link_specific_input.rb
|
|
374
380
|
- lib/onlinepayments/sdk/domain/payment_links_response.rb
|
|
@@ -417,6 +423,7 @@ files:
|
|
|
417
423
|
- lib/onlinepayments/sdk/domain/payment_product_filter.rb
|
|
418
424
|
- lib/onlinepayments/sdk/domain/payment_product_filter_hosted_tokenization.rb
|
|
419
425
|
- lib/onlinepayments/sdk/domain/payment_product_filters_hosted_checkout.rb
|
|
426
|
+
- lib/onlinepayments/sdk/domain/payment_product_filters_hosted_fields.rb
|
|
420
427
|
- lib/onlinepayments/sdk/domain/payment_product_filters_hosted_tokenization.rb
|
|
421
428
|
- lib/onlinepayments/sdk/domain/payment_product_group.rb
|
|
422
429
|
- lib/onlinepayments/sdk/domain/payment_product_networks_response.rb
|
|
@@ -503,6 +510,7 @@ files:
|
|
|
503
510
|
- lib/onlinepayments/sdk/domain/session_details.rb
|
|
504
511
|
- lib/onlinepayments/sdk/domain/session_request.rb
|
|
505
512
|
- lib/onlinepayments/sdk/domain/session_response.rb
|
|
513
|
+
- lib/onlinepayments/sdk/domain/share_payment_link_request.rb
|
|
506
514
|
- lib/onlinepayments/sdk/domain/shipping.rb
|
|
507
515
|
- lib/onlinepayments/sdk/domain/shipping_detail.rb
|
|
508
516
|
- lib/onlinepayments/sdk/domain/shipping_method.rb
|