onlinepayments-sdk-ruby 7.0.0 → 7.1.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/client.rb +1 -1
- data/lib/onlinepayments/sdk/communication/metadata_provider.rb +1 -1
- data/lib/onlinepayments/sdk/domain/cancel_payment_request.rb +12 -0
- data/lib/onlinepayments/sdk/domain/capture_payment_request.rb +12 -0
- data/lib/onlinepayments/sdk/domain/card_data_without_cvv.rb +44 -0
- data/lib/onlinepayments/sdk/domain/create_certificate_response.rb +37 -0
- data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb +30 -0
- data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb +46 -0
- data/lib/onlinepayments/sdk/domain/create_payment_request.rb +9 -0
- data/lib/onlinepayments/sdk/domain/credit_card_validation_rules_hosted_tokenization.rb +37 -0
- data/lib/onlinepayments/sdk/domain/csr_request.rb +30 -0
- data/lib/onlinepayments/sdk/domain/detokenization_response.rb +35 -0
- data/lib/onlinepayments/sdk/domain/detokenized_token_response.rb +72 -0
- data/lib/onlinepayments/sdk/domain/import_cof_series_request.rb +60 -0
- data/lib/onlinepayments/sdk/domain/import_cof_series_response.rb +30 -0
- data/lib/onlinepayments/sdk/domain/line_item_detail.rb +37 -0
- data/lib/onlinepayments/sdk/domain/omnichannel_payment_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/payment_output.rb +9 -0
- data/lib/onlinepayments/sdk/domain/payment_product840.rb +30 -0
- data/lib/onlinepayments/sdk/domain/refund_request.rb +12 -0
- data/lib/onlinepayments/sdk/domain/session_data.rb +62 -0
- data/lib/onlinepayments/sdk/domain/shopping_cart_output.rb +35 -0
- data/lib/onlinepayments/sdk/domain/show_form_data.rb +9 -0
- data/lib/onlinepayments/sdk/merchant/cofseries/cof_series_client.rb +55 -0
- data/lib/onlinepayments/sdk/merchant/cofseries.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/hostedfields/hosted_fields_client.rb +55 -0
- data/lib/onlinepayments/sdk/merchant/hostedfields.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/merchant_client.rb +24 -0
- data/lib/onlinepayments/sdk/merchant/paymentlinks/get_payment_links_in_bulk_params.rb +28 -0
- data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +6 -6
- data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +6 -6
- data/lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb +4 -4
- data/lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb +6 -6
- data/lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb +6 -6
- data/lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb +2 -2
- data/lib/onlinepayments/sdk/merchant/tokenization/get_card_data_by_payments_params.rb +40 -0
- data/lib/onlinepayments/sdk/merchant/tokenization/get_card_data_by_tokens_params.rb +40 -0
- data/lib/onlinepayments/sdk/merchant/tokenization/tokenization_client.rb +112 -0
- data/lib/onlinepayments/sdk/merchant/tokenization.rb +4 -0
- data/onlinepayments-sdk-ruby.gemspec +1 -1
- metadata +26 -2
|
@@ -10,6 +10,7 @@ require 'onlinepayments/sdk/domain/mobile_payment_method_specific_output'
|
|
|
10
10
|
require 'onlinepayments/sdk/domain/payment_references'
|
|
11
11
|
require 'onlinepayments/sdk/domain/redirect_payment_method_specific_output'
|
|
12
12
|
require 'onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_output'
|
|
13
|
+
require 'onlinepayments/sdk/domain/shopping_cart_output'
|
|
13
14
|
require 'onlinepayments/sdk/domain/surcharge_specific_output'
|
|
14
15
|
|
|
15
16
|
module OnlinePayments
|
|
@@ -27,6 +28,7 @@ module OnlinePayments
|
|
|
27
28
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificOutput] redirect_payment_method_specific_output
|
|
28
29
|
# @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
|
|
29
30
|
# @attr [OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificOutput] sepa_direct_debit_payment_method_specific_output
|
|
31
|
+
# @attr [OnlinePayments::SDK::Domain::ShoppingCartOutput] shopping_cart_output
|
|
30
32
|
# @attr [OnlinePayments::SDK::Domain::SurchargeSpecificOutput] surcharge_specific_output
|
|
31
33
|
class PaymentOutput < OnlinePayments::SDK::Domain::DataObject
|
|
32
34
|
|
|
@@ -55,6 +57,8 @@ module OnlinePayments
|
|
|
55
57
|
|
|
56
58
|
attr_accessor :sepa_direct_debit_payment_method_specific_output
|
|
57
59
|
|
|
60
|
+
attr_accessor :shopping_cart_output
|
|
61
|
+
|
|
58
62
|
attr_accessor :surcharge_specific_output
|
|
59
63
|
|
|
60
64
|
# @return (Hash)
|
|
@@ -72,6 +76,7 @@ module OnlinePayments
|
|
|
72
76
|
hash['redirectPaymentMethodSpecificOutput'] = @redirect_payment_method_specific_output.to_h unless @redirect_payment_method_specific_output.nil?
|
|
73
77
|
hash['references'] = @references.to_h unless @references.nil?
|
|
74
78
|
hash['sepaDirectDebitPaymentMethodSpecificOutput'] = @sepa_direct_debit_payment_method_specific_output.to_h unless @sepa_direct_debit_payment_method_specific_output.nil?
|
|
79
|
+
hash['shoppingCartOutput'] = @shopping_cart_output.to_h unless @shopping_cart_output.nil?
|
|
75
80
|
hash['surchargeSpecificOutput'] = @surcharge_specific_output.to_h unless @surcharge_specific_output.nil?
|
|
76
81
|
hash
|
|
77
82
|
end
|
|
@@ -123,6 +128,10 @@ module OnlinePayments
|
|
|
123
128
|
raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebitPaymentMethodSpecificOutput']] unless hash['sepaDirectDebitPaymentMethodSpecificOutput'].is_a? Hash
|
|
124
129
|
@sepa_direct_debit_payment_method_specific_output = OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificOutput.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificOutput'])
|
|
125
130
|
end
|
|
131
|
+
if hash.has_key? 'shoppingCartOutput'
|
|
132
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['shoppingCartOutput']] unless hash['shoppingCartOutput'].is_a? Hash
|
|
133
|
+
@shopping_cart_output = OnlinePayments::SDK::Domain::ShoppingCartOutput.new_from_hash(hash['shoppingCartOutput'])
|
|
134
|
+
end
|
|
126
135
|
if hash.has_key? 'surchargeSpecificOutput'
|
|
127
136
|
raise TypeError, "value '%s' is not a Hash" % [hash['surchargeSpecificOutput']] unless hash['surchargeSpecificOutput'].is_a? Hash
|
|
128
137
|
@surcharge_specific_output = OnlinePayments::SDK::Domain::SurchargeSpecificOutput.new_from_hash(hash['surchargeSpecificOutput'])
|
|
@@ -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 [String] order_id
|
|
10
|
+
class PaymentProduct840 < OnlinePayments::SDK::Domain::DataObject
|
|
11
|
+
|
|
12
|
+
attr_accessor :order_id
|
|
13
|
+
|
|
14
|
+
# @return (Hash)
|
|
15
|
+
def to_h
|
|
16
|
+
hash = super
|
|
17
|
+
hash['orderId'] = @order_id unless @order_id.nil?
|
|
18
|
+
hash
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def from_hash(hash)
|
|
22
|
+
super
|
|
23
|
+
if hash.has_key? 'orderId'
|
|
24
|
+
@order_id = hash['orderId']
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
require 'onlinepayments/sdk/domain/amount_of_money'
|
|
5
5
|
require 'onlinepayments/sdk/domain/data_object'
|
|
6
|
+
require 'onlinepayments/sdk/domain/line_item_detail'
|
|
6
7
|
require 'onlinepayments/sdk/domain/omnichannel_refund_specific_input'
|
|
7
8
|
require 'onlinepayments/sdk/domain/operation_payment_references'
|
|
8
9
|
require 'onlinepayments/sdk/domain/payment_references'
|
|
@@ -13,6 +14,7 @@ module OnlinePayments
|
|
|
13
14
|
module Domain
|
|
14
15
|
# @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
|
|
15
16
|
# @attr [String] capture_id
|
|
17
|
+
# @attr [Array<OnlinePayments::SDK::Domain::LineItemDetail>] line_item_details
|
|
16
18
|
# @attr [OnlinePayments::SDK::Domain::OmnichannelRefundSpecificInput] omnichannel_refund_specific_input
|
|
17
19
|
# @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences] operation_references
|
|
18
20
|
# @attr [String] reason
|
|
@@ -24,6 +26,8 @@ module OnlinePayments
|
|
|
24
26
|
|
|
25
27
|
attr_accessor :capture_id
|
|
26
28
|
|
|
29
|
+
attr_accessor :line_item_details
|
|
30
|
+
|
|
27
31
|
attr_accessor :omnichannel_refund_specific_input
|
|
28
32
|
|
|
29
33
|
attr_accessor :operation_references
|
|
@@ -39,6 +43,7 @@ module OnlinePayments
|
|
|
39
43
|
hash = super
|
|
40
44
|
hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
|
|
41
45
|
hash['captureId'] = @capture_id unless @capture_id.nil?
|
|
46
|
+
hash['lineItemDetails'] = @line_item_details.collect{|val| val.to_h} unless @line_item_details.nil?
|
|
42
47
|
hash['omnichannelRefundSpecificInput'] = @omnichannel_refund_specific_input.to_h unless @omnichannel_refund_specific_input.nil?
|
|
43
48
|
hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
|
|
44
49
|
hash['reason'] = @reason unless @reason.nil?
|
|
@@ -56,6 +61,13 @@ module OnlinePayments
|
|
|
56
61
|
if hash.has_key? 'captureId'
|
|
57
62
|
@capture_id = hash['captureId']
|
|
58
63
|
end
|
|
64
|
+
if hash.has_key? 'lineItemDetails'
|
|
65
|
+
raise TypeError, "value '%s' is not an Array" % [hash['lineItemDetails']] unless hash['lineItemDetails'].is_a? Array
|
|
66
|
+
@line_item_details = []
|
|
67
|
+
hash['lineItemDetails'].each do |e|
|
|
68
|
+
@line_item_details << OnlinePayments::SDK::Domain::LineItemDetail.new_from_hash(e)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
59
71
|
if hash.has_key? 'omnichannelRefundSpecificInput'
|
|
60
72
|
raise TypeError, "value '%s' is not a Hash" % [hash['omnichannelRefundSpecificInput']] unless hash['omnichannelRefundSpecificInput'].is_a? Hash
|
|
61
73
|
@omnichannel_refund_specific_input = OnlinePayments::SDK::Domain::OmnichannelRefundSpecificInput.new_from_hash(hash['omnichannelRefundSpecificInput'])
|
|
@@ -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] hosted_fields_session_id
|
|
10
|
+
# @attr [String] locale
|
|
11
|
+
# @attr [String] platform_url
|
|
12
|
+
# @attr [String] session_token
|
|
13
|
+
# @attr [Array<String>] tokens
|
|
14
|
+
class SessionData < OnlinePayments::SDK::Domain::DataObject
|
|
15
|
+
|
|
16
|
+
attr_accessor :hosted_fields_session_id
|
|
17
|
+
|
|
18
|
+
attr_accessor :locale
|
|
19
|
+
|
|
20
|
+
attr_accessor :platform_url
|
|
21
|
+
|
|
22
|
+
attr_accessor :session_token
|
|
23
|
+
|
|
24
|
+
attr_accessor :tokens
|
|
25
|
+
|
|
26
|
+
# @return (Hash)
|
|
27
|
+
def to_h
|
|
28
|
+
hash = super
|
|
29
|
+
hash['hostedFieldsSessionId'] = @hosted_fields_session_id unless @hosted_fields_session_id.nil?
|
|
30
|
+
hash['locale'] = @locale unless @locale.nil?
|
|
31
|
+
hash['platformUrl'] = @platform_url unless @platform_url.nil?
|
|
32
|
+
hash['sessionToken'] = @session_token unless @session_token.nil?
|
|
33
|
+
hash['tokens'] = @tokens unless @tokens.nil?
|
|
34
|
+
hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def from_hash(hash)
|
|
38
|
+
super
|
|
39
|
+
if hash.has_key? 'hostedFieldsSessionId'
|
|
40
|
+
@hosted_fields_session_id = hash['hostedFieldsSessionId']
|
|
41
|
+
end
|
|
42
|
+
if hash.has_key? 'locale'
|
|
43
|
+
@locale = hash['locale']
|
|
44
|
+
end
|
|
45
|
+
if hash.has_key? 'platformUrl'
|
|
46
|
+
@platform_url = hash['platformUrl']
|
|
47
|
+
end
|
|
48
|
+
if hash.has_key? 'sessionToken'
|
|
49
|
+
@session_token = hash['sessionToken']
|
|
50
|
+
end
|
|
51
|
+
if hash.has_key? 'tokens'
|
|
52
|
+
raise TypeError, "value '%s' is not an Array" % [hash['tokens']] unless hash['tokens'].is_a? Array
|
|
53
|
+
@tokens = []
|
|
54
|
+
hash['tokens'].each do |e|
|
|
55
|
+
@tokens << e
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/domain/data_object'
|
|
5
|
+
require 'onlinepayments/sdk/domain/line_item_detail'
|
|
6
|
+
|
|
7
|
+
module OnlinePayments
|
|
8
|
+
module SDK
|
|
9
|
+
module Domain
|
|
10
|
+
# @attr [Array<OnlinePayments::SDK::Domain::LineItemDetail>] line_item_details
|
|
11
|
+
class ShoppingCartOutput < OnlinePayments::SDK::Domain::DataObject
|
|
12
|
+
|
|
13
|
+
attr_accessor :line_item_details
|
|
14
|
+
|
|
15
|
+
# @return (Hash)
|
|
16
|
+
def to_h
|
|
17
|
+
hash = super
|
|
18
|
+
hash['lineItemDetails'] = @line_item_details.collect{|val| val.to_h} unless @line_item_details.nil?
|
|
19
|
+
hash
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def from_hash(hash)
|
|
23
|
+
super
|
|
24
|
+
if hash.has_key? 'lineItemDetails'
|
|
25
|
+
raise TypeError, "value '%s' is not an Array" % [hash['lineItemDetails']] unless hash['lineItemDetails'].is_a? Array
|
|
26
|
+
@line_item_details = []
|
|
27
|
+
hash['lineItemDetails'].each do |e|
|
|
28
|
+
@line_item_details << OnlinePayments::SDK::Domain::LineItemDetail.new_from_hash(e)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -7,6 +7,7 @@ require 'onlinepayments/sdk/domain/payment_product350'
|
|
|
7
7
|
require 'onlinepayments/sdk/domain/payment_product5001'
|
|
8
8
|
require 'onlinepayments/sdk/domain/payment_product5404'
|
|
9
9
|
require 'onlinepayments/sdk/domain/payment_product5407'
|
|
10
|
+
require 'onlinepayments/sdk/domain/payment_product840'
|
|
10
11
|
require 'onlinepayments/sdk/domain/pending_authentication'
|
|
11
12
|
|
|
12
13
|
module OnlinePayments
|
|
@@ -17,6 +18,7 @@ module OnlinePayments
|
|
|
17
18
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct5001] payment_product5001
|
|
18
19
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct5404] payment_product5404
|
|
19
20
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct5407] payment_product5407
|
|
21
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct840] payment_product840
|
|
20
22
|
# @attr [OnlinePayments::SDK::Domain::PendingAuthentication] pending_authentication
|
|
21
23
|
class ShowFormData < OnlinePayments::SDK::Domain::DataObject
|
|
22
24
|
|
|
@@ -30,6 +32,8 @@ module OnlinePayments
|
|
|
30
32
|
|
|
31
33
|
attr_accessor :payment_product5407
|
|
32
34
|
|
|
35
|
+
attr_accessor :payment_product840
|
|
36
|
+
|
|
33
37
|
attr_accessor :pending_authentication
|
|
34
38
|
|
|
35
39
|
# @return (Hash)
|
|
@@ -40,6 +44,7 @@ module OnlinePayments
|
|
|
40
44
|
hash['paymentProduct5001'] = @payment_product5001.to_h unless @payment_product5001.nil?
|
|
41
45
|
hash['paymentProduct5404'] = @payment_product5404.to_h unless @payment_product5404.nil?
|
|
42
46
|
hash['paymentProduct5407'] = @payment_product5407.to_h unless @payment_product5407.nil?
|
|
47
|
+
hash['paymentProduct840'] = @payment_product840.to_h unless @payment_product840.nil?
|
|
43
48
|
hash['pendingAuthentication'] = @pending_authentication.to_h unless @pending_authentication.nil?
|
|
44
49
|
hash
|
|
45
50
|
end
|
|
@@ -66,6 +71,10 @@ module OnlinePayments
|
|
|
66
71
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5407']] unless hash['paymentProduct5407'].is_a? Hash
|
|
67
72
|
@payment_product5407 = OnlinePayments::SDK::Domain::PaymentProduct5407.new_from_hash(hash['paymentProduct5407'])
|
|
68
73
|
end
|
|
74
|
+
if hash.has_key? 'paymentProduct840'
|
|
75
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct840']] unless hash['paymentProduct840'].is_a? Hash
|
|
76
|
+
@payment_product840 = OnlinePayments::SDK::Domain::PaymentProduct840.new_from_hash(hash['paymentProduct840'])
|
|
77
|
+
end
|
|
69
78
|
if hash.has_key? 'pendingAuthentication'
|
|
70
79
|
raise TypeError, "value '%s' is not a Hash" % [hash['pendingAuthentication']] unless hash['pendingAuthentication'].is_a? Hash
|
|
71
80
|
@pending_authentication = OnlinePayments::SDK::Domain::PendingAuthentication.new_from_hash(hash['pendingAuthentication'])
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/api_resource'
|
|
5
|
+
require 'onlinepayments/sdk/exception_factory'
|
|
6
|
+
require 'onlinepayments/sdk/communication/response_exception'
|
|
7
|
+
require 'onlinepayments/sdk/domain/error_response'
|
|
8
|
+
require 'onlinepayments/sdk/domain/import_cof_series_response'
|
|
9
|
+
|
|
10
|
+
module OnlinePayments
|
|
11
|
+
module SDK
|
|
12
|
+
module Merchant
|
|
13
|
+
module CofSeries
|
|
14
|
+
# CofSeries client. Thread-safe.
|
|
15
|
+
class CofSeriesClient < OnlinePayments::SDK::ApiResource
|
|
16
|
+
|
|
17
|
+
# @param parent [OnlinePayments::SDK::ApiResource]
|
|
18
|
+
# @param path_context [Hash, nil]
|
|
19
|
+
def initialize(parent, path_context)
|
|
20
|
+
super(parent: parent, path_context: path_context)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Resource /v2/!{merchantId}/tokens/importCofSeries - Imports the COF Series token.
|
|
24
|
+
#
|
|
25
|
+
# @param body [OnlinePayments::SDK::Domain::ImportCofSeriesRequest]
|
|
26
|
+
# @param context [OnlinePayments::SDK::CallContext, nil]
|
|
27
|
+
# @return [OnlinePayments::SDK::Domain::ImportCofSeriesResponse]
|
|
28
|
+
# @raise [OnlinePayments::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
29
|
+
# @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
30
|
+
# @raise [OnlinePayments::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
31
|
+
# @raise [OnlinePayments::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
32
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
33
|
+
# @raise [OnlinePayments::SDK::PlatformException] if something went wrong at the payment platform,
|
|
34
|
+
# the payment platform was unable to process a message from a downstream partner/acquirer,
|
|
35
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
36
|
+
# @raise [OnlinePayments::SDK::ApiException] if the payment platform returned any other error
|
|
37
|
+
def import_cof_series(body, context = nil)
|
|
38
|
+
uri = instantiate_uri('/v2/{merchantId}/tokens/importCofSeries', nil)
|
|
39
|
+
@communicator.post(
|
|
40
|
+
uri,
|
|
41
|
+
client_headers,
|
|
42
|
+
nil,
|
|
43
|
+
body,
|
|
44
|
+
OnlinePayments::SDK::Domain::ImportCofSeriesResponse,
|
|
45
|
+
context)
|
|
46
|
+
rescue OnlinePayments::SDK::Communication::ResponseException => e
|
|
47
|
+
error_type = OnlinePayments::SDK::Domain::ErrorResponse
|
|
48
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
49
|
+
raise OnlinePayments::SDK.create_exception(e.status_code, e.body, error_object, context)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/api_resource'
|
|
5
|
+
require 'onlinepayments/sdk/exception_factory'
|
|
6
|
+
require 'onlinepayments/sdk/communication/response_exception'
|
|
7
|
+
require 'onlinepayments/sdk/domain/create_hosted_fields_session_response'
|
|
8
|
+
require 'onlinepayments/sdk/domain/error_response'
|
|
9
|
+
|
|
10
|
+
module OnlinePayments
|
|
11
|
+
module SDK
|
|
12
|
+
module Merchant
|
|
13
|
+
module HostedFields
|
|
14
|
+
# HostedFields client. Thread-safe.
|
|
15
|
+
class HostedFieldsClient < OnlinePayments::SDK::ApiResource
|
|
16
|
+
|
|
17
|
+
# @param parent [OnlinePayments::SDK::ApiResource]
|
|
18
|
+
# @param path_context [Hash, nil]
|
|
19
|
+
def initialize(parent, path_context)
|
|
20
|
+
super(parent: parent, path_context: path_context)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Resource /v2/!{merchantId}/hostedfields/sessions - Create hosted fields session
|
|
24
|
+
#
|
|
25
|
+
# @param body [OnlinePayments::SDK::Domain::CreateHostedFieldsSessionRequest]
|
|
26
|
+
# @param context [OnlinePayments::SDK::CallContext, nil]
|
|
27
|
+
# @return [OnlinePayments::SDK::Domain::CreateHostedFieldsSessionResponse]
|
|
28
|
+
# @raise [OnlinePayments::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
29
|
+
# @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
30
|
+
# @raise [OnlinePayments::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
31
|
+
# @raise [OnlinePayments::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
32
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
33
|
+
# @raise [OnlinePayments::SDK::PlatformException] if something went wrong at the payment platform,
|
|
34
|
+
# the payment platform was unable to process a message from a downstream partner/acquirer,
|
|
35
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
36
|
+
# @raise [OnlinePayments::SDK::ApiException] if the payment platform returned any other error
|
|
37
|
+
def create_hosted_fields_session(body, context = nil)
|
|
38
|
+
uri = instantiate_uri('/v2/{merchantId}/hostedfields/sessions', nil)
|
|
39
|
+
@communicator.post(
|
|
40
|
+
uri,
|
|
41
|
+
client_headers,
|
|
42
|
+
nil,
|
|
43
|
+
body,
|
|
44
|
+
OnlinePayments::SDK::Domain::CreateHostedFieldsSessionResponse,
|
|
45
|
+
context)
|
|
46
|
+
rescue OnlinePayments::SDK::Communication::ResponseException => e
|
|
47
|
+
error_type = OnlinePayments::SDK::Domain::ErrorResponse
|
|
48
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
49
|
+
raise OnlinePayments::SDK.create_exception(e.status_code, e.body, error_object, context)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
#
|
|
4
4
|
require 'onlinepayments/sdk/api_resource'
|
|
5
5
|
require 'onlinepayments/sdk/merchant/captures/captures_client'
|
|
6
|
+
require 'onlinepayments/sdk/merchant/cofseries/cof_series_client'
|
|
6
7
|
require 'onlinepayments/sdk/merchant/complete/complete_client'
|
|
7
8
|
require 'onlinepayments/sdk/merchant/hostedcheckout/hosted_checkout_client'
|
|
9
|
+
require 'onlinepayments/sdk/merchant/hostedfields/hosted_fields_client'
|
|
8
10
|
require 'onlinepayments/sdk/merchant/hostedtokenization/hosted_tokenization_client'
|
|
9
11
|
require 'onlinepayments/sdk/merchant/mandates/mandates_client'
|
|
10
12
|
require 'onlinepayments/sdk/merchant/paymentlinks/payment_links_client'
|
|
@@ -17,6 +19,7 @@ require 'onlinepayments/sdk/merchant/refunds/refunds_client'
|
|
|
17
19
|
require 'onlinepayments/sdk/merchant/services/services_client'
|
|
18
20
|
require 'onlinepayments/sdk/merchant/sessions/sessions_client'
|
|
19
21
|
require 'onlinepayments/sdk/merchant/subsequent/subsequent_client'
|
|
22
|
+
require 'onlinepayments/sdk/merchant/tokenization/tokenization_client'
|
|
20
23
|
require 'onlinepayments/sdk/merchant/tokens/tokens_client'
|
|
21
24
|
require 'onlinepayments/sdk/merchant/webhooks/webhooks_client'
|
|
22
25
|
|
|
@@ -46,6 +49,13 @@ module OnlinePayments
|
|
|
46
49
|
OnlinePayments::SDK::Merchant::HostedTokenization::HostedTokenizationClient.new(self, nil)
|
|
47
50
|
end
|
|
48
51
|
|
|
52
|
+
# Resource /v2/{merchantId}/hostedfields/sessions
|
|
53
|
+
#
|
|
54
|
+
# @return [OnlinePayments::SDK::Merchant::HostedFields::HostedFieldsClient]
|
|
55
|
+
def hosted_fields
|
|
56
|
+
OnlinePayments::SDK::Merchant::HostedFields::HostedFieldsClient.new(self, nil)
|
|
57
|
+
end
|
|
58
|
+
|
|
49
59
|
# Resource /v2/{merchantId}/payments
|
|
50
60
|
#
|
|
51
61
|
# @return [OnlinePayments::SDK::Merchant::Payments::PaymentsClient]
|
|
@@ -123,6 +133,20 @@ module OnlinePayments
|
|
|
123
133
|
OnlinePayments::SDK::Merchant::Tokens::TokensClient.new(self, nil)
|
|
124
134
|
end
|
|
125
135
|
|
|
136
|
+
# Resource /v2/{merchantId}/tokens/importCofSeries
|
|
137
|
+
#
|
|
138
|
+
# @return [OnlinePayments::SDK::Merchant::CofSeries::CofSeriesClient]
|
|
139
|
+
def cof_series
|
|
140
|
+
OnlinePayments::SDK::Merchant::CofSeries::CofSeriesClient.new(self, nil)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Resource /v2/{merchantId}/detokenize/csr
|
|
144
|
+
#
|
|
145
|
+
# @return [OnlinePayments::SDK::Merchant::Tokenization::TokenizationClient]
|
|
146
|
+
def tokenization
|
|
147
|
+
OnlinePayments::SDK::Merchant::Tokenization::TokenizationClient.new(self, nil)
|
|
148
|
+
end
|
|
149
|
+
|
|
126
150
|
# Resource /v2/{merchantId}/payouts
|
|
127
151
|
#
|
|
128
152
|
# @return [OnlinePayments::SDK::Merchant::Payouts::PayoutsClient]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/communication/param_request'
|
|
5
|
+
require 'onlinepayments/sdk/communication/request_param'
|
|
6
|
+
|
|
7
|
+
module OnlinePayments
|
|
8
|
+
module SDK
|
|
9
|
+
module Merchant
|
|
10
|
+
module PaymentLinks
|
|
11
|
+
# Query parameters for Get payment links (/v2/{merchantId}/paymentlinks)
|
|
12
|
+
#
|
|
13
|
+
# @attr [String] operation_group_reference
|
|
14
|
+
class GetPaymentLinksInBulkParams < OnlinePayments::SDK::Communication::ParamRequest
|
|
15
|
+
|
|
16
|
+
attr_accessor :operation_group_reference
|
|
17
|
+
|
|
18
|
+
# @return [Array<OnlinePayments::SDK::Communication::RequestParam>] representing the attributes of this class
|
|
19
|
+
def to_request_parameters
|
|
20
|
+
result = []
|
|
21
|
+
result << RequestParam.new('operationGroupReference', @operation_group_reference) unless @operation_group_reference.nil?
|
|
22
|
+
result
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -44,13 +44,13 @@ module OnlinePayments
|
|
|
44
44
|
# @return [Array<OnlinePayments::SDK::Communication::RequestParam>] representing the attributes of this class
|
|
45
45
|
def to_request_parameters
|
|
46
46
|
result = []
|
|
47
|
-
result <<
|
|
48
|
-
result <<
|
|
49
|
-
result <<
|
|
50
|
-
result <<
|
|
51
|
-
result <<
|
|
47
|
+
result << RequestParam.new('countryCode', @country_code) unless @country_code.nil?
|
|
48
|
+
result << RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
|
|
49
|
+
result << RequestParam.new('locale', @locale) unless @locale.nil?
|
|
50
|
+
result << RequestParam.new('amount', @amount.to_s) unless @amount.nil?
|
|
51
|
+
result << RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
|
|
52
52
|
unless @hide.nil?
|
|
53
|
-
@hide.each {|e| result <<
|
|
53
|
+
@hide.each {|e| result << RequestParam.new('hide', e)}
|
|
54
54
|
end
|
|
55
55
|
result
|
|
56
56
|
end
|
|
@@ -44,13 +44,13 @@ module OnlinePayments
|
|
|
44
44
|
# @return [Array<OnlinePayments::SDK::Communication::RequestParam>] representing the attributes of this class
|
|
45
45
|
def to_request_parameters
|
|
46
46
|
result = []
|
|
47
|
-
result <<
|
|
48
|
-
result <<
|
|
49
|
-
result <<
|
|
50
|
-
result <<
|
|
51
|
-
result <<
|
|
47
|
+
result << RequestParam.new('countryCode', @country_code) unless @country_code.nil?
|
|
48
|
+
result << RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
|
|
49
|
+
result << RequestParam.new('locale', @locale) unless @locale.nil?
|
|
50
|
+
result << RequestParam.new('amount', @amount.to_s) unless @amount.nil?
|
|
51
|
+
result << RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
|
|
52
52
|
unless @hide.nil?
|
|
53
|
-
@hide.each {|e| result <<
|
|
53
|
+
@hide.each {|e| result << RequestParam.new('hide', e)}
|
|
54
54
|
end
|
|
55
55
|
result
|
|
56
56
|
end
|
|
@@ -27,10 +27,10 @@ module OnlinePayments
|
|
|
27
27
|
# @return [Array<OnlinePayments::SDK::Communication::RequestParam>] representing the attributes of this class
|
|
28
28
|
def to_request_parameters
|
|
29
29
|
result = []
|
|
30
|
-
result <<
|
|
31
|
-
result <<
|
|
32
|
-
result <<
|
|
33
|
-
result <<
|
|
30
|
+
result << RequestParam.new('countryCode', @country_code) unless @country_code.nil?
|
|
31
|
+
result << RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
|
|
32
|
+
result << RequestParam.new('amount', @amount.to_s) unless @amount.nil?
|
|
33
|
+
result << RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
|
|
34
34
|
result
|
|
35
35
|
end
|
|
36
36
|
end
|
|
@@ -43,13 +43,13 @@ module OnlinePayments
|
|
|
43
43
|
# @return [Array<OnlinePayments::SDK::Communication::RequestParam>] representing the attributes of this class
|
|
44
44
|
def to_request_parameters
|
|
45
45
|
result = []
|
|
46
|
-
result <<
|
|
47
|
-
result <<
|
|
48
|
-
result <<
|
|
49
|
-
result <<
|
|
50
|
-
result <<
|
|
46
|
+
result << RequestParam.new('countryCode', @country_code) unless @country_code.nil?
|
|
47
|
+
result << RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
|
|
48
|
+
result << RequestParam.new('locale', @locale) unless @locale.nil?
|
|
49
|
+
result << RequestParam.new('amount', @amount.to_s) unless @amount.nil?
|
|
50
|
+
result << RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
|
|
51
51
|
unless @hide.nil?
|
|
52
|
-
@hide.each {|e| result <<
|
|
52
|
+
@hide.each {|e| result << RequestParam.new('hide', e)}
|
|
53
53
|
end
|
|
54
54
|
result
|
|
55
55
|
end
|
|
@@ -43,13 +43,13 @@ module OnlinePayments
|
|
|
43
43
|
# @return [Array<OnlinePayments::SDK::Communication::RequestParam>] representing the attributes of this class
|
|
44
44
|
def to_request_parameters
|
|
45
45
|
result = []
|
|
46
|
-
result <<
|
|
47
|
-
result <<
|
|
48
|
-
result <<
|
|
49
|
-
result <<
|
|
50
|
-
result <<
|
|
46
|
+
result << RequestParam.new('countryCode', @country_code) unless @country_code.nil?
|
|
47
|
+
result << RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
|
|
48
|
+
result << RequestParam.new('locale', @locale) unless @locale.nil?
|
|
49
|
+
result << RequestParam.new('amount', @amount.to_s) unless @amount.nil?
|
|
50
|
+
result << RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
|
|
51
51
|
unless @hide.nil?
|
|
52
|
-
@hide.each {|e| result <<
|
|
52
|
+
@hide.each {|e| result << RequestParam.new('hide', e)}
|
|
53
53
|
end
|
|
54
54
|
result
|
|
55
55
|
end
|
|
@@ -21,8 +21,8 @@ module OnlinePayments
|
|
|
21
21
|
# @return [Array<OnlinePayments::SDK::Communication::RequestParam>] representing the attributes of this class
|
|
22
22
|
def to_request_parameters
|
|
23
23
|
result = []
|
|
24
|
-
result <<
|
|
25
|
-
result <<
|
|
24
|
+
result << RequestParam.new('countryCode', @country_code) unless @country_code.nil?
|
|
25
|
+
result << RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
|
|
26
26
|
result
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/communication/param_request'
|
|
5
|
+
require 'onlinepayments/sdk/communication/request_param'
|
|
6
|
+
|
|
7
|
+
module OnlinePayments
|
|
8
|
+
module SDK
|
|
9
|
+
module Merchant
|
|
10
|
+
module Tokenization
|
|
11
|
+
# Query parameters for Get sensitive card details by card payment identifiers (/v2/{merchantId}/detokenize/payments)
|
|
12
|
+
#
|
|
13
|
+
# @attr [Array<String>] payments
|
|
14
|
+
class GetCardDataByPaymentsParams < OnlinePayments::SDK::Communication::ParamRequest
|
|
15
|
+
|
|
16
|
+
attr_accessor :payments
|
|
17
|
+
|
|
18
|
+
# Adds the parameter _value_ to the _payments_ Array
|
|
19
|
+
#
|
|
20
|
+
# @param value [String]
|
|
21
|
+
def add_payments(value)
|
|
22
|
+
unless @payments
|
|
23
|
+
@payments = []
|
|
24
|
+
end
|
|
25
|
+
@payments << value
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# @return [Array<OnlinePayments::SDK::Communication::RequestParam>] representing the attributes of this class
|
|
29
|
+
def to_request_parameters
|
|
30
|
+
result = []
|
|
31
|
+
unless @payments.nil?
|
|
32
|
+
@payments.each {|e| result << RequestParam.new('payments', e)}
|
|
33
|
+
end
|
|
34
|
+
result
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|