onlinepayments-sdk-ruby 3.5.0 → 4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 716c246b8a4ea8548e73e8c941989b813714367a15f37a7cc954ceb679a31107
4
- data.tar.gz: 716b84eae40a2ea26fc05d1fcd7a54f9bbd1415302db69b585945aaa145d7aa1
3
+ metadata.gz: aeae0acbfbfe02eabef921f93372fbba522b86ab76dfabe60df03cfa359aa9ba
4
+ data.tar.gz: ffe6775e0f8f4f4bcc3bba1cb1c1f2407a018143ed720be2f3b83428928fb4e5
5
5
  SHA512:
6
- metadata.gz: 5c81e3b4bfd2b9d76eb2c18da50c11f477f4ef3abf59ed264cf40f70bdb98976df541f2423db924ac70a436ec0899781ab90aeb7b0de0d1d91efc9ac161910e8
7
- data.tar.gz: 1b292d156441c3a7b86dcb6706397d5ef19a50059615a46f071bfa5a0401340c079c7a9f079403bc69303a45fd731be52ba1e5ce5e69d7d46d778149aaefc248
6
+ metadata.gz: 898d7376aacab53cb9135ecb3f60ccd7d0f5b0b7426a1de7f94068d1e83f33c5064428a02e5255bbb07393236d276fe6e8746150e99e45102ab0231d725440f3
7
+ data.tar.gz: 1571e4b02ff1b038545475b72cd3ed512f4b9bed67cb888b2025be278ef2ca9ac87ef498f07eddb0d9f15ede3fef4786d82688b66e1a85507d50f2df7646178f
@@ -0,0 +1,34 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/amount_of_money'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
11
+ # @attr [true/false] is_final
12
+ class CancelPaymentRequest < OnlinePayments::SDK::DataObject
13
+ attr_accessor :amount_of_money
14
+ attr_accessor :is_final
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['amountOfMoney'] = @amount_of_money.to_h if @amount_of_money
20
+ hash['isFinal'] = @is_final unless @is_final.nil?
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ if hash.key? 'amountOfMoney'
27
+ raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
28
+ @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
29
+ end
30
+ @is_final = hash['isFinal'] if hash.key? 'isFinal'
31
+ end
32
+ end
33
+ end
34
+ end
@@ -5,7 +5,6 @@ require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/card'
6
6
  require 'onlinepayments/sdk/domain/card_recurrence_details'
7
7
  require 'onlinepayments/sdk/domain/payment_product130_specific_input'
8
- require 'onlinepayments/sdk/domain/payment_product3012_specific_input'
9
8
  require 'onlinepayments/sdk/domain/three_d_secure'
10
9
 
11
10
  module OnlinePayments::SDK
@@ -16,10 +15,10 @@ module OnlinePayments::SDK
16
15
  # @attr [String] initial_scheme_transaction_id
17
16
  # @attr [true/false] is_recurring
18
17
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
19
- # @attr [OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput] payment_product3012_specific_input
20
18
  # @attr [Integer] payment_product_id
21
19
  # @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
22
20
  # @attr [String] return_url
21
+ # @attr [String] scheme_reference_data
23
22
  # @attr [true/false] skip_authentication
24
23
  # @attr [OnlinePayments::SDK::Domain::ThreeDSecure] three_d_secure
25
24
  # @attr [String] token
@@ -33,10 +32,10 @@ module OnlinePayments::SDK
33
32
  attr_accessor :initial_scheme_transaction_id
34
33
  attr_accessor :is_recurring
35
34
  attr_accessor :payment_product130_specific_input
36
- attr_accessor :payment_product3012_specific_input
37
35
  attr_accessor :payment_product_id
38
36
  attr_accessor :recurring
39
37
  attr_accessor :return_url
38
+ attr_accessor :scheme_reference_data
40
39
  attr_accessor :skip_authentication
41
40
  attr_accessor :three_d_secure
42
41
  attr_accessor :token
@@ -53,10 +52,10 @@ module OnlinePayments::SDK
53
52
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
54
53
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
55
54
  hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
56
- hash['paymentProduct3012SpecificInput'] = @payment_product3012_specific_input.to_h if @payment_product3012_specific_input
57
55
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
58
56
  hash['recurring'] = @recurring.to_h if @recurring
59
57
  hash['returnUrl'] = @return_url unless @return_url.nil?
58
+ hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
60
59
  hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
61
60
  hash['threeDSecure'] = @three_d_secure.to_h if @three_d_secure
62
61
  hash['token'] = @token unless @token.nil?
@@ -80,16 +79,13 @@ module OnlinePayments::SDK
80
79
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
81
80
  @payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
82
81
  end
83
- if hash.key? 'paymentProduct3012SpecificInput'
84
- raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3012SpecificInput']] unless hash['paymentProduct3012SpecificInput'].is_a? Hash
85
- @payment_product3012_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput.new_from_hash(hash['paymentProduct3012SpecificInput'])
86
- end
87
82
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
88
83
  if hash.key? 'recurring'
89
84
  raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash
90
85
  @recurring = OnlinePayments::SDK::Domain::CardRecurrenceDetails.new_from_hash(hash['recurring'])
91
86
  end
92
87
  @return_url = hash['returnUrl'] if hash.key? 'returnUrl'
88
+ @scheme_reference_data = hash['schemeReferenceData'] if hash.key? 'schemeReferenceData'
93
89
  @skip_authentication = hash['skipAuthentication'] if hash.key? 'skipAuthentication'
94
90
  if hash.key? 'threeDSecure'
95
91
  raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
@@ -4,7 +4,6 @@
4
4
  require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/card_recurrence_details'
6
6
  require 'onlinepayments/sdk/domain/payment_product130_specific_input'
7
- require 'onlinepayments/sdk/domain/payment_product3012_specific_input'
8
7
  require 'onlinepayments/sdk/domain/payment_product5100_specific_input'
9
8
  require 'onlinepayments/sdk/domain/three_d_secure_base'
10
9
 
@@ -14,7 +13,6 @@ module OnlinePayments::SDK
14
13
  # @attr [String] authorization_mode
15
14
  # @attr [String] initial_scheme_transaction_id
16
15
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
17
- # @attr [OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput] payment_product3012_specific_input
18
16
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput] payment_product5100_specific_input
19
17
  # @attr [Integer] payment_product_id
20
18
  # @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
@@ -28,7 +26,6 @@ module OnlinePayments::SDK
28
26
  attr_accessor :authorization_mode
29
27
  attr_accessor :initial_scheme_transaction_id
30
28
  attr_accessor :payment_product130_specific_input
31
- attr_accessor :payment_product3012_specific_input
32
29
  attr_accessor :payment_product5100_specific_input
33
30
  attr_accessor :payment_product_id
34
31
  attr_accessor :recurring
@@ -45,7 +42,6 @@ module OnlinePayments::SDK
45
42
  hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
46
43
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
47
44
  hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
48
- hash['paymentProduct3012SpecificInput'] = @payment_product3012_specific_input.to_h if @payment_product3012_specific_input
49
45
  hash['paymentProduct5100SpecificInput'] = @payment_product5100_specific_input.to_h if @payment_product5100_specific_input
50
46
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
51
47
  hash['recurring'] = @recurring.to_h if @recurring
@@ -66,10 +62,6 @@ module OnlinePayments::SDK
66
62
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
67
63
  @payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
68
64
  end
69
- if hash.key? 'paymentProduct3012SpecificInput'
70
- raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3012SpecificInput']] unless hash['paymentProduct3012SpecificInput'].is_a? Hash
71
- @payment_product3012_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput.new_from_hash(hash['paymentProduct3012SpecificInput'])
72
- end
73
65
  if hash.key? 'paymentProduct5100SpecificInput'
74
66
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5100SpecificInput']] unless hash['paymentProduct5100SpecificInput'].is_a? Hash
75
67
  @payment_product5100_specific_input = OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput.new_from_hash(hash['paymentProduct5100SpecificInput'])
@@ -18,6 +18,7 @@ module OnlinePayments::SDK
18
18
  # @attr [String] initial_scheme_transaction_id
19
19
  # @attr [String] payment_option
20
20
  # @attr [Integer] payment_product_id
21
+ # @attr [String] scheme_reference_data
21
22
  # @attr [OnlinePayments::SDK::Domain::ThreeDSecureResults] three_d_secure_results
22
23
  # @attr [String] token
23
24
  class CardPaymentMethodSpecificOutput < OnlinePayments::SDK::DataObject
@@ -29,6 +30,7 @@ module OnlinePayments::SDK
29
30
  attr_accessor :initial_scheme_transaction_id
30
31
  attr_accessor :payment_option
31
32
  attr_accessor :payment_product_id
33
+ attr_accessor :scheme_reference_data
32
34
  attr_accessor :three_d_secure_results
33
35
  attr_accessor :token
34
36
 
@@ -43,6 +45,7 @@ module OnlinePayments::SDK
43
45
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
44
46
  hash['paymentOption'] = @payment_option unless @payment_option.nil?
45
47
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
48
+ hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
46
49
  hash['threeDSecureResults'] = @three_d_secure_results.to_h if @three_d_secure_results
47
50
  hash['token'] = @token unless @token.nil?
48
51
  hash
@@ -67,6 +70,7 @@ module OnlinePayments::SDK
67
70
  @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
68
71
  @payment_option = hash['paymentOption'] if hash.key? 'paymentOption'
69
72
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
73
+ @scheme_reference_data = hash['schemeReferenceData'] if hash.key? 'schemeReferenceData'
70
74
  if hash.key? 'threeDSecureResults'
71
75
  raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecureResults']] unless hash['threeDSecureResults'].is_a? Hash
72
76
  @three_d_secure_results = OnlinePayments::SDK::Domain::ThreeDSecureResults.new_from_hash(hash['threeDSecureResults'])
@@ -8,15 +8,18 @@ module OnlinePayments::SDK
8
8
 
9
9
  # @attr [String] black_list_data
10
10
  # @attr [String] customer_ip_address
11
+ # @attr [Array<String>] product_categories
11
12
  class FraudFields < OnlinePayments::SDK::DataObject
12
13
  attr_accessor :black_list_data
13
14
  attr_accessor :customer_ip_address
15
+ attr_accessor :product_categories
14
16
 
15
17
  # @return (Hash)
16
18
  def to_h
17
19
  hash = super
18
20
  hash['blackListData'] = @black_list_data unless @black_list_data.nil?
19
21
  hash['customerIpAddress'] = @customer_ip_address unless @customer_ip_address.nil?
22
+ hash['productCategories'] = @product_categories unless @product_categories.nil?
20
23
  hash
21
24
  end
22
25
 
@@ -24,6 +27,13 @@ module OnlinePayments::SDK
24
27
  super
25
28
  @black_list_data = hash['blackListData'] if hash.key? 'blackListData'
26
29
  @customer_ip_address = hash['customerIpAddress'] if hash.key? 'customerIpAddress'
30
+ if hash.key? 'productCategories'
31
+ raise TypeError, "value '%s' is not an Array" % [hash['productCategories']] unless hash['productCategories'].is_a? Array
32
+ @product_categories = []
33
+ hash['productCategories'].each do |e|
34
+ @product_categories << e
35
+ end
36
+ end
27
37
  end
28
38
  end
29
39
  end
@@ -0,0 +1,26 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] html_content
10
+ class GetPrivacyPolicyResponse < OnlinePayments::SDK::DataObject
11
+ attr_accessor :html_content
12
+
13
+ # @return (Hash)
14
+ def to_h
15
+ hash = super
16
+ hash['htmlContent'] = @html_content unless @html_content.nil?
17
+ hash
18
+ end
19
+
20
+ def from_hash(hash)
21
+ super
22
+ @html_content = hash['htmlContent'] if hash.key? 'htmlContent'
23
+ end
24
+ end
25
+ end
26
+ end
@@ -3,6 +3,7 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/address_personal'
6
+ require 'onlinepayments/sdk/domain/shipping_method'
6
7
 
7
8
  module OnlinePayments::SDK
8
9
  module Domain
@@ -12,6 +13,7 @@ module OnlinePayments::SDK
12
13
  # @attr [String] email_address
13
14
  # @attr [String] first_usage_date
14
15
  # @attr [true/false] is_first_usage
16
+ # @attr [OnlinePayments::SDK::Domain::ShippingMethod] method
15
17
  # @attr [Long] shipping_cost
16
18
  # @attr [Long] shipping_cost_tax
17
19
  # @attr [String] type
@@ -21,6 +23,7 @@ module OnlinePayments::SDK
21
23
  attr_accessor :email_address
22
24
  attr_accessor :first_usage_date
23
25
  attr_accessor :is_first_usage
26
+ attr_accessor :method
24
27
  attr_accessor :shipping_cost
25
28
  attr_accessor :shipping_cost_tax
26
29
  attr_accessor :type
@@ -33,6 +36,7 @@ module OnlinePayments::SDK
33
36
  hash['emailAddress'] = @email_address unless @email_address.nil?
34
37
  hash['firstUsageDate'] = @first_usage_date unless @first_usage_date.nil?
35
38
  hash['isFirstUsage'] = @is_first_usage unless @is_first_usage.nil?
39
+ hash['method'] = @method.to_h if @method
36
40
  hash['shippingCost'] = @shipping_cost unless @shipping_cost.nil?
37
41
  hash['shippingCostTax'] = @shipping_cost_tax unless @shipping_cost_tax.nil?
38
42
  hash['type'] = @type unless @type.nil?
@@ -49,6 +53,10 @@ module OnlinePayments::SDK
49
53
  @email_address = hash['emailAddress'] if hash.key? 'emailAddress'
50
54
  @first_usage_date = hash['firstUsageDate'] if hash.key? 'firstUsageDate'
51
55
  @is_first_usage = hash['isFirstUsage'] if hash.key? 'isFirstUsage'
56
+ if hash.key? 'method'
57
+ raise TypeError, "value '%s' is not a Hash" % [hash['method']] unless hash['method'].is_a? Hash
58
+ @method = OnlinePayments::SDK::Domain::ShippingMethod.new_from_hash(hash['method'])
59
+ end
52
60
  @shipping_cost = hash['shippingCost'] if hash.key? 'shippingCost'
53
61
  @shipping_cost_tax = hash['shippingCostTax'] if hash.key? 'shippingCostTax'
54
62
  @type = hash['type'] if hash.key? 'type'
@@ -0,0 +1,38 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] details
10
+ # @attr [String] name
11
+ # @attr [Integer] speed
12
+ # @attr [String] type
13
+ class ShippingMethod < OnlinePayments::SDK::DataObject
14
+ attr_accessor :details
15
+ attr_accessor :name
16
+ attr_accessor :speed
17
+ attr_accessor :type
18
+
19
+ # @return (Hash)
20
+ def to_h
21
+ hash = super
22
+ hash['details'] = @details unless @details.nil?
23
+ hash['name'] = @name unless @name.nil?
24
+ hash['speed'] = @speed unless @speed.nil?
25
+ hash['type'] = @type unless @type.nil?
26
+ hash
27
+ end
28
+
29
+ def from_hash(hash)
30
+ super
31
+ @details = hash['details'] if hash.key? 'details'
32
+ @name = hash['name'] if hash.key? 'name'
33
+ @speed = hash['speed'] if hash.key? 'speed'
34
+ @type = hash['type'] if hash.key? 'type'
35
+ end
36
+ end
37
+ end
38
+ end
@@ -13,6 +13,7 @@ module OnlinePayments::SDK
13
13
  # @attr [String] challenge_indicator
14
14
  # @attr [String] ds_transaction_id
15
15
  # @attr [String] eci
16
+ # @attr [String] exemption_engine_flow
16
17
  # @attr [String] flow
17
18
  # @attr [String] liability
18
19
  # @attr [String] scheme_eci
@@ -26,6 +27,7 @@ module OnlinePayments::SDK
26
27
  attr_accessor :challenge_indicator
27
28
  attr_accessor :ds_transaction_id
28
29
  attr_accessor :eci
30
+ attr_accessor :exemption_engine_flow
29
31
  attr_accessor :flow
30
32
  attr_accessor :liability
31
33
  attr_accessor :scheme_eci
@@ -42,6 +44,7 @@ module OnlinePayments::SDK
42
44
  hash['challengeIndicator'] = @challenge_indicator unless @challenge_indicator.nil?
43
45
  hash['dsTransactionId'] = @ds_transaction_id unless @ds_transaction_id.nil?
44
46
  hash['eci'] = @eci unless @eci.nil?
47
+ hash['exemptionEngineFlow'] = @exemption_engine_flow unless @exemption_engine_flow.nil?
45
48
  hash['flow'] = @flow unless @flow.nil?
46
49
  hash['liability'] = @liability unless @liability.nil?
47
50
  hash['schemeEci'] = @scheme_eci unless @scheme_eci.nil?
@@ -59,6 +62,7 @@ module OnlinePayments::SDK
59
62
  @challenge_indicator = hash['challengeIndicator'] if hash.key? 'challengeIndicator'
60
63
  @ds_transaction_id = hash['dsTransactionId'] if hash.key? 'dsTransactionId'
61
64
  @eci = hash['eci'] if hash.key? 'eci'
65
+ @exemption_engine_flow = hash['exemptionEngineFlow'] if hash.key? 'exemptionEngineFlow'
62
66
  @flow = hash['flow'] if hash.key? 'flow'
63
67
  @liability = hash['liability'] if hash.key? 'liability'
64
68
  @scheme_eci = hash['schemeEci'] if hash.key? 'schemeEci'
@@ -3,6 +3,7 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/api_resource'
5
5
  require 'onlinepayments/sdk/response_exception'
6
+ require 'onlinepayments/sdk/domain/cancel_payment_request'
6
7
  require 'onlinepayments/sdk/domain/cancel_payment_response'
7
8
  require 'onlinepayments/sdk/domain/capture_payment_request'
8
9
  require 'onlinepayments/sdk/domain/capture_response'
@@ -128,6 +129,7 @@ module OnlinePayments::SDK
128
129
 
129
130
  # Resource /v2/!{merchantId}/payments/!{paymentId}/cancel
130
131
  # @param payment_id [String]
132
+ # @param body [OnlinePayments::SDK::Domain::CancelPaymentRequest]
131
133
  # @param context [OnlinePayments::SDK::CallContext]
132
134
  # @return [OnlinePayments::SDK::Domain::CancelPaymentResponse]
133
135
  # @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
@@ -139,7 +141,7 @@ module OnlinePayments::SDK
139
141
  # the payment platform was unable to process a message from a downstream partner/acquirer,
140
142
  # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
141
143
  # @raise [OnlinePayments::SDK::ApiException]if the payment platform returned any other error
142
- def cancel_payment(payment_id, context = nil)
144
+ def cancel_payment(payment_id, body = nil, context = nil)
143
145
  path_context = {
144
146
  'paymentId'.freeze => payment_id,
145
147
  }
@@ -148,7 +150,7 @@ module OnlinePayments::SDK
148
150
  uri,
149
151
  client_headers,
150
152
  nil,
151
- nil,
153
+ body,
152
154
  OnlinePayments::SDK::Domain::CancelPaymentResponse,
153
155
  context
154
156
  )
@@ -0,0 +1,30 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/param_request'
5
+ require 'onlinepayments/sdk/request_param'
6
+
7
+ module OnlinePayments::SDK
8
+ module Merchant
9
+ module Services
10
+
11
+ # Query parameters for 'Get Privacy Policy'.
12
+ # @attr [String] locale
13
+ # @attr [Integer] payment_product_id
14
+ class GetPrivacyPolicyParams < OnlinePayments::SDK::ParamRequest
15
+
16
+ attr_accessor :locale
17
+
18
+ attr_accessor :payment_product_id
19
+
20
+ # @return [Array<OnlinePayments::SDK::RequestParam>] representing the attributes of this class
21
+ def to_request_parameters
22
+ result = []
23
+ result << RequestParam.new('locale', @locale) unless @locale.nil?
24
+ result << RequestParam.new('paymentProductId', @payment_product_id.to_s) unless @payment_product_id.nil?
25
+ result
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -6,7 +6,9 @@ require 'onlinepayments/sdk/response_exception'
6
6
  require 'onlinepayments/sdk/domain/error_response'
7
7
  require 'onlinepayments/sdk/domain/get_iin_details_request'
8
8
  require 'onlinepayments/sdk/domain/get_iin_details_response'
9
+ require 'onlinepayments/sdk/domain/get_privacy_policy_response'
9
10
  require 'onlinepayments/sdk/domain/test_connection'
11
+ require 'onlinepayments/sdk/merchant/services/get_privacy_policy_params'
10
12
 
11
13
  module OnlinePayments::SDK
12
14
  module Merchant
@@ -21,6 +23,34 @@ module OnlinePayments::SDK
21
23
  super(parent, path_context)
22
24
  end
23
25
 
26
+ # Resource /v2/!{merchantId}/services/privacypolicy
27
+ # @param query [OnlinePayments::SDK::Merchant::Services::GetPrivacyPolicyParams]
28
+ # @param context [OnlinePayments::SDK::CallContext]
29
+ # @return [OnlinePayments::SDK::Domain::GetPrivacyPolicyResponse]
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::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
33
+ # @raise [OnlinePayments::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
34
+ # or there was a conflict (HTTP status code 404, 409 or 410)
35
+ # @raise [OnlinePayments::SDK::PaymentPlatformException] if something went wrong at the payment platform,
36
+ # the payment platform was unable to process a message from a downstream partner/acquirer,
37
+ # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
38
+ # @raise [OnlinePayments::SDK::ApiException]if the payment platform returned any other error
39
+ def get_privacy_policy(query, context = nil)
40
+ uri = instantiate_uri('/v2/{merchantId}/services/privacypolicy')
41
+ @communicator.get(
42
+ uri,
43
+ client_headers,
44
+ query,
45
+ OnlinePayments::SDK::Domain::GetPrivacyPolicyResponse,
46
+ context
47
+ )
48
+ rescue ResponseException => e
49
+ error_type = OnlinePayments::SDK::Domain::ErrorResponse
50
+ error_object = @communicator.marshaller.unmarshal(e.body, error_type)
51
+ raise create_exception(e.status_code, e.body, error_object, context)
52
+ end
53
+
24
54
  # Resource /v2/!{merchantId}/services/testconnection
25
55
  # @param context [OnlinePayments::SDK::CallContext]
26
56
  # @return [OnlinePayments::SDK::Domain::TestConnection]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'onlinepayments-sdk-ruby'
3
- spec.version = '3.5.0'
3
+ spec.version = '4.1.0'
4
4
  spec.authors = ['Worldline Direct support team']
5
5
  spec.email = ['82139942+worldline-direct-support-team@users.noreply.github.com']
6
6
  spec.summary = %q{SDK to communicate with the Online Payments platform using the Online Payments Server API}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlinepayments-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Worldline Direct support team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-07 00:00:00.000000000 Z
11
+ date: 2022-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -161,6 +161,7 @@ files:
161
161
  - lib/onlinepayments/sdk/domain/api_error.rb
162
162
  - lib/onlinepayments/sdk/domain/bank_account_iban.rb
163
163
  - lib/onlinepayments/sdk/domain/browser_data.rb
164
+ - lib/onlinepayments/sdk/domain/cancel_payment_request.rb
164
165
  - lib/onlinepayments/sdk/domain/cancel_payment_response.rb
165
166
  - lib/onlinepayments/sdk/domain/capture.rb
166
167
  - lib/onlinepayments/sdk/domain/capture_output.rb
@@ -221,6 +222,7 @@ files:
221
222
  - lib/onlinepayments/sdk/domain/get_mandate_response.rb
222
223
  - lib/onlinepayments/sdk/domain/get_payment_product_groups_response.rb
223
224
  - lib/onlinepayments/sdk/domain/get_payment_products_response.rb
225
+ - lib/onlinepayments/sdk/domain/get_privacy_policy_response.rb
224
226
  - lib/onlinepayments/sdk/domain/gift_card_purchase.rb
225
227
  - lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb
226
228
  - lib/onlinepayments/sdk/domain/hosted_checkout_specific_output.rb
@@ -260,7 +262,6 @@ files:
260
262
  - lib/onlinepayments/sdk/domain/payment_product.rb
261
263
  - lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb
262
264
  - lib/onlinepayments/sdk/domain/payment_product130_specific_three_d_secure.rb
263
- - lib/onlinepayments/sdk/domain/payment_product3012_specific_input.rb
264
265
  - lib/onlinepayments/sdk/domain/payment_product302_specific_data.rb
265
266
  - lib/onlinepayments/sdk/domain/payment_product320_specific_data.rb
266
267
  - lib/onlinepayments/sdk/domain/payment_product5100_specific_input.rb
@@ -322,6 +323,7 @@ files:
322
323
  - lib/onlinepayments/sdk/domain/session_request.rb
323
324
  - lib/onlinepayments/sdk/domain/session_response.rb
324
325
  - lib/onlinepayments/sdk/domain/shipping.rb
326
+ - lib/onlinepayments/sdk/domain/shipping_method.rb
325
327
  - lib/onlinepayments/sdk/domain/shopping_cart.rb
326
328
  - lib/onlinepayments/sdk/domain/shopping_cart_extension.rb
327
329
  - lib/onlinepayments/sdk/domain/test_connection.rb
@@ -365,6 +367,7 @@ files:
365
367
  - lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb
366
368
  - lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb
367
369
  - lib/onlinepayments/sdk/merchant/products/products_client.rb
370
+ - lib/onlinepayments/sdk/merchant/services/get_privacy_policy_params.rb
368
371
  - lib/onlinepayments/sdk/merchant/services/services_client.rb
369
372
  - lib/onlinepayments/sdk/merchant/sessions/sessions_client.rb
370
373
  - lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb
@@ -1,30 +0,0 @@
1
- #
2
- # This class was auto-generated.
3
- #
4
- require 'onlinepayments/sdk/data_object'
5
-
6
- module OnlinePayments::SDK
7
- module Domain
8
-
9
- # @attr [true/false] force_authentication
10
- # @attr [true/false] is_wip_transaction
11
- class PaymentProduct3012SpecificInput < OnlinePayments::SDK::DataObject
12
- attr_accessor :force_authentication
13
- attr_accessor :is_wip_transaction
14
-
15
- # @return (Hash)
16
- def to_h
17
- hash = super
18
- hash['forceAuthentication'] = @force_authentication unless @force_authentication.nil?
19
- hash['isWipTransaction'] = @is_wip_transaction unless @is_wip_transaction.nil?
20
- hash
21
- end
22
-
23
- def from_hash(hash)
24
- super
25
- @force_authentication = hash['forceAuthentication'] if hash.key? 'forceAuthentication'
26
- @is_wip_transaction = hash['isWipTransaction'] if hash.key? 'isWipTransaction'
27
- end
28
- end
29
- end
30
- end