onlinepayments-sdk-ruby 6.3.1 → 7.0.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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/onlinepayments/sdk/authentication/v1hmac_authenticator.rb +2 -1
  4. data/lib/onlinepayments/sdk/client.rb +1 -1
  5. data/lib/onlinepayments/sdk/communication/metadata_provider.rb +1 -1
  6. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +9 -0
  7. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +9 -0
  8. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb +7 -0
  9. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +16 -0
  10. data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +7 -0
  11. data/lib/onlinepayments/sdk/domain/create_payment_request.rb +7 -0
  12. data/lib/onlinepayments/sdk/domain/created_token_response.rb +9 -0
  13. data/lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb +3 -3
  14. data/lib/onlinepayments/sdk/domain/{credit_card_validation_rules_hosted_tokenization.rb → credit_card_validation_rules.rb} +1 -1
  15. data/lib/onlinepayments/sdk/domain/crm_token.rb +37 -0
  16. data/lib/onlinepayments/sdk/domain/g_pay_three_d_secure.rb +7 -0
  17. data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +16 -0
  18. data/lib/onlinepayments/sdk/domain/market_place.rb +37 -0
  19. data/lib/onlinepayments/sdk/domain/network_token_essentials.rb +65 -0
  20. data/lib/onlinepayments/sdk/domain/network_token_linked.rb +44 -0
  21. data/lib/onlinepayments/sdk/domain/omnichannel_payout_specific_input.rb +7 -0
  22. data/lib/onlinepayments/sdk/domain/omnichannel_subsequent_specific_input.rb +30 -0
  23. data/lib/onlinepayments/sdk/domain/payment_link_response.rb +7 -0
  24. data/lib/onlinepayments/sdk/domain/payment_product350.rb +37 -0
  25. data/lib/onlinepayments/sdk/domain/payment_product5001.rb +1 -0
  26. data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +15 -0
  27. data/lib/onlinepayments/sdk/domain/payment_response.rb +9 -0
  28. data/lib/onlinepayments/sdk/domain/pending_authentication.rb +30 -0
  29. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +18 -0
  30. data/lib/onlinepayments/sdk/domain/redirect_payment_product11_specific_input.rb +32 -0
  31. data/lib/onlinepayments/sdk/domain/redirect_payment_product3307_specific_input.rb +13 -0
  32. data/lib/onlinepayments/sdk/domain/redirect_payment_product5300_specific_input.rb +7 -0
  33. data/lib/onlinepayments/sdk/domain/redirect_payment_product5412_specific_input.rb +7 -0
  34. data/lib/onlinepayments/sdk/domain/refund_redirect_payment_method_specific_input.rb +32 -0
  35. data/lib/onlinepayments/sdk/domain/refund_redirect_payment_product900_specific_input.rb +30 -0
  36. data/lib/onlinepayments/sdk/domain/refund_request.rb +9 -0
  37. data/lib/onlinepayments/sdk/domain/session_details.rb +37 -0
  38. data/lib/onlinepayments/sdk/domain/show_form_data.rb +18 -0
  39. data/lib/onlinepayments/sdk/domain/split_payment_product_filter.rb +34 -0
  40. data/lib/onlinepayments/sdk/domain/split_payment_product_filters_hosted_checkout.rb +40 -0
  41. data/lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb +9 -0
  42. data/lib/onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input.rb +0 -7
  43. data/lib/onlinepayments/sdk/domain/subsequent_payment_request.rb +9 -0
  44. data/lib/onlinepayments/sdk/domain/token_response.rb +18 -0
  45. data/lib/onlinepayments/sdk/merchant/merchant_client.rb +2 -2
  46. data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +0 -29
  47. data/lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb +19 -19
  48. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +6 -6
  49. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +6 -6
  50. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb +4 -4
  51. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb +6 -6
  52. data/lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb +6 -6
  53. data/lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb +2 -2
  54. data/lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb +24 -24
  55. data/onlinepayments-sdk-ruby.gemspec +1 -1
  56. metadata +17 -4
  57. data/lib/onlinepayments/sdk/merchant/paymentlinks/get_payment_links_in_bulk_params.rb +0 -28
@@ -3,34 +3,44 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/data_object'
5
5
  require 'onlinepayments/sdk/domain/payment_product3012'
6
+ require 'onlinepayments/sdk/domain/payment_product350'
6
7
  require 'onlinepayments/sdk/domain/payment_product5001'
7
8
  require 'onlinepayments/sdk/domain/payment_product5404'
8
9
  require 'onlinepayments/sdk/domain/payment_product5407'
10
+ require 'onlinepayments/sdk/domain/pending_authentication'
9
11
 
10
12
  module OnlinePayments
11
13
  module SDK
12
14
  module Domain
13
15
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct3012] payment_product3012
16
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct350] payment_product350
14
17
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct5001] payment_product5001
15
18
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct5404] payment_product5404
16
19
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct5407] payment_product5407
20
+ # @attr [OnlinePayments::SDK::Domain::PendingAuthentication] pending_authentication
17
21
  class ShowFormData < OnlinePayments::SDK::Domain::DataObject
18
22
 
19
23
  attr_accessor :payment_product3012
20
24
 
25
+ attr_accessor :payment_product350
26
+
21
27
  attr_accessor :payment_product5001
22
28
 
23
29
  attr_accessor :payment_product5404
24
30
 
25
31
  attr_accessor :payment_product5407
26
32
 
33
+ attr_accessor :pending_authentication
34
+
27
35
  # @return (Hash)
28
36
  def to_h
29
37
  hash = super
30
38
  hash['paymentProduct3012'] = @payment_product3012.to_h unless @payment_product3012.nil?
39
+ hash['paymentProduct350'] = @payment_product350.to_h unless @payment_product350.nil?
31
40
  hash['paymentProduct5001'] = @payment_product5001.to_h unless @payment_product5001.nil?
32
41
  hash['paymentProduct5404'] = @payment_product5404.to_h unless @payment_product5404.nil?
33
42
  hash['paymentProduct5407'] = @payment_product5407.to_h unless @payment_product5407.nil?
43
+ hash['pendingAuthentication'] = @pending_authentication.to_h unless @pending_authentication.nil?
34
44
  hash
35
45
  end
36
46
 
@@ -40,6 +50,10 @@ module OnlinePayments
40
50
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3012']] unless hash['paymentProduct3012'].is_a? Hash
41
51
  @payment_product3012 = OnlinePayments::SDK::Domain::PaymentProduct3012.new_from_hash(hash['paymentProduct3012'])
42
52
  end
53
+ if hash.has_key? 'paymentProduct350'
54
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct350']] unless hash['paymentProduct350'].is_a? Hash
55
+ @payment_product350 = OnlinePayments::SDK::Domain::PaymentProduct350.new_from_hash(hash['paymentProduct350'])
56
+ end
43
57
  if hash.has_key? 'paymentProduct5001'
44
58
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5001']] unless hash['paymentProduct5001'].is_a? Hash
45
59
  @payment_product5001 = OnlinePayments::SDK::Domain::PaymentProduct5001.new_from_hash(hash['paymentProduct5001'])
@@ -52,6 +66,10 @@ module OnlinePayments
52
66
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5407']] unless hash['paymentProduct5407'].is_a? Hash
53
67
  @payment_product5407 = OnlinePayments::SDK::Domain::PaymentProduct5407.new_from_hash(hash['paymentProduct5407'])
54
68
  end
69
+ if hash.has_key? 'pendingAuthentication'
70
+ raise TypeError, "value '%s' is not a Hash" % [hash['pendingAuthentication']] unless hash['pendingAuthentication'].is_a? Hash
71
+ @pending_authentication = OnlinePayments::SDK::Domain::PendingAuthentication.new_from_hash(hash['pendingAuthentication'])
72
+ end
55
73
  end
56
74
  end
57
75
  end
@@ -0,0 +1,34 @@
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>] products
10
+ class SplitPaymentProductFilter < OnlinePayments::SDK::Domain::DataObject
11
+
12
+ attr_accessor :products
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['products'] = @products unless @products.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.has_key? 'products'
24
+ raise TypeError, "value '%s' is not an Array" % [hash['products']] unless hash['products'].is_a? Array
25
+ @products = []
26
+ hash['products'].each do |e|
27
+ @products << e
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,40 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/split_payment_product_filter'
6
+
7
+ module OnlinePayments
8
+ module SDK
9
+ module Domain
10
+ # @attr [OnlinePayments::SDK::Domain::SplitPaymentProductFilter] exclude
11
+ # @attr [OnlinePayments::SDK::Domain::SplitPaymentProductFilter] restrict_to
12
+ class SplitPaymentProductFiltersHostedCheckout < OnlinePayments::SDK::Domain::DataObject
13
+
14
+ attr_accessor :exclude
15
+
16
+ attr_accessor :restrict_to
17
+
18
+ # @return (Hash)
19
+ def to_h
20
+ hash = super
21
+ hash['exclude'] = @exclude.to_h unless @exclude.nil?
22
+ hash['restrictTo'] = @restrict_to.to_h unless @restrict_to.nil?
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ if hash.has_key? 'exclude'
29
+ raise TypeError, "value '%s' is not a Hash" % [hash['exclude']] unless hash['exclude'].is_a? Hash
30
+ @exclude = OnlinePayments::SDK::Domain::SplitPaymentProductFilter.new_from_hash(hash['exclude'])
31
+ end
32
+ if hash.has_key? 'restrictTo'
33
+ raise TypeError, "value '%s' is not a Hash" % [hash['restrictTo']] unless hash['restrictTo'].is_a? Hash
34
+ @restrict_to = OnlinePayments::SDK::Domain::SplitPaymentProductFilter.new_from_hash(hash['restrictTo'])
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -2,11 +2,13 @@
2
2
  # This file was automatically generated.
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/market_place'
5
6
 
6
7
  module OnlinePayments
7
8
  module SDK
8
9
  module Domain
9
10
  # @attr [String] authorization_mode
11
+ # @attr [OnlinePayments::SDK::Domain::MarketPlace] market_place
10
12
  # @attr [Integer] payment_number
11
13
  # @attr [String] scheme_reference_data
12
14
  # @attr [String] subsequent_type
@@ -16,6 +18,8 @@ module OnlinePayments
16
18
 
17
19
  attr_accessor :authorization_mode
18
20
 
21
+ attr_accessor :market_place
22
+
19
23
  attr_accessor :payment_number
20
24
 
21
25
  # @deprecated Deprecated
@@ -32,6 +36,7 @@ module OnlinePayments
32
36
  def to_h
33
37
  hash = super
34
38
  hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
39
+ hash['marketPlace'] = @market_place.to_h unless @market_place.nil?
35
40
  hash['paymentNumber'] = @payment_number unless @payment_number.nil?
36
41
  hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
37
42
  hash['subsequentType'] = @subsequent_type unless @subsequent_type.nil?
@@ -45,6 +50,10 @@ module OnlinePayments
45
50
  if hash.has_key? 'authorizationMode'
46
51
  @authorization_mode = hash['authorizationMode']
47
52
  end
53
+ if hash.has_key? 'marketPlace'
54
+ raise TypeError, "value '%s' is not a Hash" % [hash['marketPlace']] unless hash['marketPlace'].is_a? Hash
55
+ @market_place = OnlinePayments::SDK::Domain::MarketPlace.new_from_hash(hash['marketPlace'])
56
+ end
48
57
  if hash.has_key? 'paymentNumber'
49
58
  @payment_number = hash['paymentNumber']
50
59
  end
@@ -6,27 +6,20 @@ require 'onlinepayments/sdk/domain/data_object'
6
6
  module OnlinePayments
7
7
  module SDK
8
8
  module Domain
9
- # @attr [String] authorization_mode
10
9
  # @attr [String] subsequent_type
11
10
  class SubsequentPaymentProduct5001SpecificInput < OnlinePayments::SDK::Domain::DataObject
12
11
 
13
- attr_accessor :authorization_mode
14
-
15
12
  attr_accessor :subsequent_type
16
13
 
17
14
  # @return (Hash)
18
15
  def to_h
19
16
  hash = super
20
- hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
21
17
  hash['subsequentType'] = @subsequent_type unless @subsequent_type.nil?
22
18
  hash
23
19
  end
24
20
 
25
21
  def from_hash(hash)
26
22
  super
27
- if hash.has_key? 'authorizationMode'
28
- @authorization_mode = hash['authorizationMode']
29
- end
30
23
  if hash.has_key? 'subsequentType'
31
24
  @subsequent_type = hash['subsequentType']
32
25
  end
@@ -2,6 +2,7 @@
2
2
  # This file was automatically generated.
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/omnichannel_subsequent_specific_input'
5
6
  require 'onlinepayments/sdk/domain/order'
6
7
  require 'onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input'
7
8
  require 'onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input'
@@ -9,11 +10,14 @@ require 'onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input
9
10
  module OnlinePayments
10
11
  module SDK
11
12
  module Domain
13
+ # @attr [OnlinePayments::SDK::Domain::OmnichannelSubsequentSpecificInput] omnichannel_subsequent_specific_input
12
14
  # @attr [OnlinePayments::SDK::Domain::Order] order
13
15
  # @attr [OnlinePayments::SDK::Domain::SubsequentPaymentProduct5001SpecificInput] subsequent_payment_product5001_specific_input
14
16
  # @attr [OnlinePayments::SDK::Domain::SubsequentCardPaymentMethodSpecificInput] subsequentcard_payment_method_specific_input
15
17
  class SubsequentPaymentRequest < OnlinePayments::SDK::Domain::DataObject
16
18
 
19
+ attr_accessor :omnichannel_subsequent_specific_input
20
+
17
21
  attr_accessor :order
18
22
 
19
23
  attr_accessor :subsequent_payment_product5001_specific_input
@@ -23,6 +27,7 @@ module OnlinePayments
23
27
  # @return (Hash)
24
28
  def to_h
25
29
  hash = super
30
+ hash['omnichannelSubsequentSpecificInput'] = @omnichannel_subsequent_specific_input.to_h unless @omnichannel_subsequent_specific_input.nil?
26
31
  hash['order'] = @order.to_h unless @order.nil?
27
32
  hash['subsequentPaymentProduct5001SpecificInput'] = @subsequent_payment_product5001_specific_input.to_h unless @subsequent_payment_product5001_specific_input.nil?
28
33
  hash['subsequentcardPaymentMethodSpecificInput'] = @subsequentcard_payment_method_specific_input.to_h unless @subsequentcard_payment_method_specific_input.nil?
@@ -31,6 +36,10 @@ module OnlinePayments
31
36
 
32
37
  def from_hash(hash)
33
38
  super
39
+ if hash.has_key? 'omnichannelSubsequentSpecificInput'
40
+ raise TypeError, "value '%s' is not a Hash" % [hash['omnichannelSubsequentSpecificInput']] unless hash['omnichannelSubsequentSpecificInput'].is_a? Hash
41
+ @omnichannel_subsequent_specific_input = OnlinePayments::SDK::Domain::OmnichannelSubsequentSpecificInput.new_from_hash(hash['omnichannelSubsequentSpecificInput'])
42
+ end
34
43
  if hash.has_key? 'order'
35
44
  raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash
36
45
  @order = OnlinePayments::SDK::Domain::Order.new_from_hash(hash['order'])
@@ -1,8 +1,10 @@
1
1
  #
2
2
  # This file was automatically generated.
3
3
  #
4
+ require 'onlinepayments/sdk/domain/crm_token'
4
5
  require 'onlinepayments/sdk/domain/data_object'
5
6
  require 'onlinepayments/sdk/domain/external_token_linked'
7
+ require 'onlinepayments/sdk/domain/network_token_linked'
6
8
  require 'onlinepayments/sdk/domain/token_card'
7
9
  require 'onlinepayments/sdk/domain/token_e_wallet'
8
10
 
@@ -10,15 +12,19 @@ module OnlinePayments
10
12
  module SDK
11
13
  module Domain
12
14
  # @attr [OnlinePayments::SDK::Domain::TokenCard] card
15
+ # @attr [OnlinePayments::SDK::Domain::CrmToken] crm_token
13
16
  # @attr [OnlinePayments::SDK::Domain::TokenEWallet] e_wallet
14
17
  # @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
15
18
  # @attr [String] id
16
19
  # @attr [true/false] is_temporary
20
+ # @attr [OnlinePayments::SDK::Domain::NetworkTokenLinked] network_token_linked
17
21
  # @attr [Integer] payment_product_id
18
22
  class TokenResponse < OnlinePayments::SDK::Domain::DataObject
19
23
 
20
24
  attr_accessor :card
21
25
 
26
+ attr_accessor :crm_token
27
+
22
28
  attr_accessor :e_wallet
23
29
 
24
30
  attr_accessor :external_token_linked
@@ -27,16 +33,20 @@ module OnlinePayments
27
33
 
28
34
  attr_accessor :is_temporary
29
35
 
36
+ attr_accessor :network_token_linked
37
+
30
38
  attr_accessor :payment_product_id
31
39
 
32
40
  # @return (Hash)
33
41
  def to_h
34
42
  hash = super
35
43
  hash['card'] = @card.to_h unless @card.nil?
44
+ hash['crmToken'] = @crm_token.to_h unless @crm_token.nil?
36
45
  hash['eWallet'] = @e_wallet.to_h unless @e_wallet.nil?
37
46
  hash['externalTokenLinked'] = @external_token_linked.to_h unless @external_token_linked.nil?
38
47
  hash['id'] = @id unless @id.nil?
39
48
  hash['isTemporary'] = @is_temporary unless @is_temporary.nil?
49
+ hash['networkTokenLinked'] = @network_token_linked.to_h unless @network_token_linked.nil?
40
50
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
41
51
  hash
42
52
  end
@@ -47,6 +57,10 @@ module OnlinePayments
47
57
  raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
48
58
  @card = OnlinePayments::SDK::Domain::TokenCard.new_from_hash(hash['card'])
49
59
  end
60
+ if hash.has_key? 'crmToken'
61
+ raise TypeError, "value '%s' is not a Hash" % [hash['crmToken']] unless hash['crmToken'].is_a? Hash
62
+ @crm_token = OnlinePayments::SDK::Domain::CrmToken.new_from_hash(hash['crmToken'])
63
+ end
50
64
  if hash.has_key? 'eWallet'
51
65
  raise TypeError, "value '%s' is not a Hash" % [hash['eWallet']] unless hash['eWallet'].is_a? Hash
52
66
  @e_wallet = OnlinePayments::SDK::Domain::TokenEWallet.new_from_hash(hash['eWallet'])
@@ -61,6 +75,10 @@ module OnlinePayments
61
75
  if hash.has_key? 'isTemporary'
62
76
  @is_temporary = hash['isTemporary']
63
77
  end
78
+ if hash.has_key? 'networkTokenLinked'
79
+ raise TypeError, "value '%s' is not a Hash" % [hash['networkTokenLinked']] unless hash['networkTokenLinked'].is_a? Hash
80
+ @network_token_linked = OnlinePayments::SDK::Domain::NetworkTokenLinked.new_from_hash(hash['networkTokenLinked'])
81
+ end
64
82
  if hash.has_key? 'paymentProductId'
65
83
  @payment_product_id = hash['paymentProductId']
66
84
  end
@@ -116,14 +116,14 @@ module OnlinePayments
116
116
  OnlinePayments::SDK::Merchant::Sessions::SessionsClient.new(self, nil)
117
117
  end
118
118
 
119
- # Resource /v2/{merchantId}/tokens/{tokenId}
119
+ # Resource /v2/{merchantId}/tokens
120
120
  #
121
121
  # @return [OnlinePayments::SDK::Merchant::Tokens::TokensClient]
122
122
  def tokens
123
123
  OnlinePayments::SDK::Merchant::Tokens::TokensClient.new(self, nil)
124
124
  end
125
125
 
126
- # Resource /v2/{merchantId}/payouts/{payoutId}
126
+ # Resource /v2/{merchantId}/payouts
127
127
  #
128
128
  # @return [OnlinePayments::SDK::Merchant::Payouts::PayoutsClient]
129
129
  def payouts
@@ -6,7 +6,6 @@ require 'onlinepayments/sdk/exception_factory'
6
6
  require 'onlinepayments/sdk/communication/response_exception'
7
7
  require 'onlinepayments/sdk/domain/error_response'
8
8
  require 'onlinepayments/sdk/domain/payment_link_response'
9
- require 'onlinepayments/sdk/domain/payment_links_response'
10
9
 
11
10
  module OnlinePayments
12
11
  module SDK
@@ -21,34 +20,6 @@ module OnlinePayments
21
20
  super(parent: parent, path_context: path_context)
22
21
  end
23
22
 
24
- # Resource /v2/!{merchantId}/paymentlinks - Get payment links
25
- #
26
- # @param query [OnlinePayments::SDK::Merchant::PaymentLinks::GetPaymentLinksInBulkParams]
27
- # @param context [OnlinePayments::SDK::CallContext, nil]
28
- # @return [OnlinePayments::SDK::Domain::PaymentLinksResponse]
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 get_payment_links_in_bulk(query, context = nil)
39
- uri = instantiate_uri('/v2/{merchantId}/paymentlinks', nil)
40
- @communicator.get(
41
- uri,
42
- client_headers,
43
- query,
44
- OnlinePayments::SDK::Domain::PaymentLinksResponse,
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
-
52
23
  # Resource /v2/!{merchantId}/paymentlinks - Create payment link
53
24
  #
54
25
  # @param body [OnlinePayments::SDK::Domain::CreatePaymentLinkRequest]
@@ -21,11 +21,12 @@ module OnlinePayments
21
21
  super(parent: parent, path_context: path_context)
22
22
  end
23
23
 
24
- # Resource /v2/!{merchantId}/payouts/!{payoutId} - Get payout
24
+ # Resource /v2/!{merchantId}/payouts - Create payout
25
25
  #
26
- # @param payout_id [String]
27
- # @param context [OnlinePayments::SDK::CallContext, nil]
26
+ # @param body [OnlinePayments::SDK::Domain::CreatePayoutRequest]
27
+ # @param context [OnlinePayments::SDK::CallContext, nil]
28
28
  # @return [OnlinePayments::SDK::Domain::PayoutResponse]
29
+ # @raise [OnlinePayments::SDK::DeclinedPayoutException] if the payment platform declined / rejected the payout. The payout result will be available from the exception.
29
30
  # @raise [OnlinePayments::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
30
31
  # @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
31
32
  # @raise [OnlinePayments::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
@@ -35,29 +36,26 @@ module OnlinePayments
35
36
  # the payment platform was unable to process a message from a downstream partner/acquirer,
36
37
  # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
37
38
  # @raise [OnlinePayments::SDK::ApiException] if the payment platform returned any other error
38
- def get_payout(payout_id, context = nil)
39
- path_context = {
40
- 'payoutId'.freeze => payout_id,
41
- }
42
- uri = instantiate_uri('/v2/{merchantId}/payouts/{payoutId}', path_context)
43
- @communicator.get(
39
+ def create_payout(body, context = nil)
40
+ uri = instantiate_uri('/v2/{merchantId}/payouts', nil)
41
+ @communicator.post(
44
42
  uri,
45
43
  client_headers,
46
44
  nil,
45
+ body,
47
46
  OnlinePayments::SDK::Domain::PayoutResponse,
48
47
  context)
49
48
  rescue OnlinePayments::SDK::Communication::ResponseException => e
50
- error_type = OnlinePayments::SDK::Domain::ErrorResponse
49
+ error_type = OnlinePayments::SDK::Domain::PayoutErrorResponse
51
50
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
52
51
  raise OnlinePayments::SDK.create_exception(e.status_code, e.body, error_object, context)
53
52
  end
54
53
 
55
- # Resource /v2/!{merchantId}/payouts - Create payout
54
+ # Resource /v2/!{merchantId}/payouts/!{payoutId} - Get payout
56
55
  #
57
- # @param body [OnlinePayments::SDK::Domain::CreatePayoutRequest]
58
- # @param context [OnlinePayments::SDK::CallContext, nil]
56
+ # @param payout_id [String]
57
+ # @param context [OnlinePayments::SDK::CallContext, nil]
59
58
  # @return [OnlinePayments::SDK::Domain::PayoutResponse]
60
- # @raise [OnlinePayments::SDK::DeclinedPayoutException] if the payment platform declined / rejected the payout. The payout result will be available from the exception.
61
59
  # @raise [OnlinePayments::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
62
60
  # @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
63
61
  # @raise [OnlinePayments::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
@@ -67,17 +65,19 @@ module OnlinePayments
67
65
  # the payment platform was unable to process a message from a downstream partner/acquirer,
68
66
  # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
69
67
  # @raise [OnlinePayments::SDK::ApiException] if the payment platform returned any other error
70
- def create_payout(body, context = nil)
71
- uri = instantiate_uri('/v2/{merchantId}/payouts', nil)
72
- @communicator.post(
68
+ def get_payout(payout_id, context = nil)
69
+ path_context = {
70
+ 'payoutId'.freeze => payout_id,
71
+ }
72
+ uri = instantiate_uri('/v2/{merchantId}/payouts/{payoutId}', path_context)
73
+ @communicator.get(
73
74
  uri,
74
75
  client_headers,
75
76
  nil,
76
- body,
77
77
  OnlinePayments::SDK::Domain::PayoutResponse,
78
78
  context)
79
79
  rescue OnlinePayments::SDK::Communication::ResponseException => e
80
- error_type = OnlinePayments::SDK::Domain::PayoutErrorResponse
80
+ error_type = OnlinePayments::SDK::Domain::ErrorResponse
81
81
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
82
82
  raise OnlinePayments::SDK.create_exception(e.status_code, e.body, error_object, context)
83
83
  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 << 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?
47
+ result << OnlinePayments::SDK::Communication::RequestParam.new('countryCode', @country_code) unless @country_code.nil?
48
+ result << OnlinePayments::SDK::Communication::RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
49
+ result << OnlinePayments::SDK::Communication::RequestParam.new('locale', @locale) unless @locale.nil?
50
+ result << OnlinePayments::SDK::Communication::RequestParam.new('amount', @amount.to_s) unless @amount.nil?
51
+ result << OnlinePayments::SDK::Communication::RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
52
52
  unless @hide.nil?
53
- @hide.each {|e| result << RequestParam.new('hide', e)}
53
+ @hide.each {|e| result << OnlinePayments::SDK::Communication::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 << 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?
47
+ result << OnlinePayments::SDK::Communication::RequestParam.new('countryCode', @country_code) unless @country_code.nil?
48
+ result << OnlinePayments::SDK::Communication::RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
49
+ result << OnlinePayments::SDK::Communication::RequestParam.new('locale', @locale) unless @locale.nil?
50
+ result << OnlinePayments::SDK::Communication::RequestParam.new('amount', @amount.to_s) unless @amount.nil?
51
+ result << OnlinePayments::SDK::Communication::RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
52
52
  unless @hide.nil?
53
- @hide.each {|e| result << RequestParam.new('hide', e)}
53
+ @hide.each {|e| result << OnlinePayments::SDK::Communication::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 << 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?
30
+ result << OnlinePayments::SDK::Communication::RequestParam.new('countryCode', @country_code) unless @country_code.nil?
31
+ result << OnlinePayments::SDK::Communication::RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
32
+ result << OnlinePayments::SDK::Communication::RequestParam.new('amount', @amount.to_s) unless @amount.nil?
33
+ result << OnlinePayments::SDK::Communication::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 << 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?
46
+ result << OnlinePayments::SDK::Communication::RequestParam.new('countryCode', @country_code) unless @country_code.nil?
47
+ result << OnlinePayments::SDK::Communication::RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
48
+ result << OnlinePayments::SDK::Communication::RequestParam.new('locale', @locale) unless @locale.nil?
49
+ result << OnlinePayments::SDK::Communication::RequestParam.new('amount', @amount.to_s) unless @amount.nil?
50
+ result << OnlinePayments::SDK::Communication::RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
51
51
  unless @hide.nil?
52
- @hide.each {|e| result << RequestParam.new('hide', e)}
52
+ @hide.each {|e| result << OnlinePayments::SDK::Communication::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 << 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?
46
+ result << OnlinePayments::SDK::Communication::RequestParam.new('countryCode', @country_code) unless @country_code.nil?
47
+ result << OnlinePayments::SDK::Communication::RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
48
+ result << OnlinePayments::SDK::Communication::RequestParam.new('locale', @locale) unless @locale.nil?
49
+ result << OnlinePayments::SDK::Communication::RequestParam.new('amount', @amount.to_s) unless @amount.nil?
50
+ result << OnlinePayments::SDK::Communication::RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
51
51
  unless @hide.nil?
52
- @hide.each {|e| result << RequestParam.new('hide', e)}
52
+ @hide.each {|e| result << OnlinePayments::SDK::Communication::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 << RequestParam.new('countryCode', @country_code) unless @country_code.nil?
25
- result << RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
24
+ result << OnlinePayments::SDK::Communication::RequestParam.new('countryCode', @country_code) unless @country_code.nil?
25
+ result << OnlinePayments::SDK::Communication::RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
26
26
  result
27
27
  end
28
28
  end