connect-sdk-ruby 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/connect-sdk-ruby.gemspec +1 -1
  3. data/examples/v1/merchant/captures/create_refund_capture_example.rb +3 -3
  4. data/examples/v1/merchant/payments/create_payment_example.rb +3 -3
  5. data/examples/v1/merchant/payments/refund_payment_example.rb +3 -3
  6. data/examples/v1/merchant/payouts/create_payout_example.rb +3 -3
  7. data/lib/worldline/connect/sdk/communication/metadata_provider.rb +1 -1
  8. data/lib/worldline/connect/sdk/v1/api_exception.rb +5 -7
  9. data/lib/worldline/connect/sdk/v1/authorization_exception.rb +3 -3
  10. data/lib/worldline/connect/sdk/v1/declined_payment_exception.rb +12 -23
  11. data/lib/worldline/connect/sdk/v1/declined_payout_exception.rb +13 -24
  12. data/lib/worldline/connect/sdk/v1/declined_refund_exception.rb +13 -24
  13. data/lib/worldline/connect/sdk/v1/declined_transaction_exception.rb +2 -2
  14. data/lib/worldline/connect/sdk/v1/domain/abstract_card_payment_method_specific_input.rb +0 -3
  15. data/lib/worldline/connect/sdk/v1/domain/abstract_sepa_direct_debit_payment_product771_specific_input.rb +0 -1
  16. data/lib/worldline/connect/sdk/v1/domain/additional_order_input.rb +0 -3
  17. data/lib/worldline/connect/sdk/v1/domain/airline_data.rb +0 -1
  18. data/lib/worldline/connect/sdk/v1/domain/airline_flight_leg.rb +0 -1
  19. data/lib/worldline/connect/sdk/v1/domain/bank_transfer_payout_method_specific_input.rb +0 -1
  20. data/lib/worldline/connect/sdk/v1/domain/card_payment_method_specific_input.rb +0 -2
  21. data/lib/worldline/connect/sdk/v1/domain/card_payment_method_specific_output.rb +7 -0
  22. data/lib/worldline/connect/sdk/v1/domain/cash_payment_method_specific_input.rb +0 -1
  23. data/lib/worldline/connect/sdk/v1/domain/cash_payment_product1503_specific_input.rb +0 -1
  24. data/lib/worldline/connect/sdk/v1/domain/create_payout_request.rb +0 -8
  25. data/lib/worldline/connect/sdk/v1/domain/created_payment_output.rb +0 -1
  26. data/lib/worldline/connect/sdk/v1/domain/customer.rb +0 -1
  27. data/lib/worldline/connect/sdk/v1/domain/customer_base.rb +0 -1
  28. data/lib/worldline/connect/sdk/v1/domain/customer_risk_assessment.rb +0 -1
  29. data/lib/worldline/connect/sdk/v1/domain/decrypted_payment_data.rb +0 -1
  30. data/lib/worldline/connect/sdk/v1/domain/device_render_options.rb +0 -1
  31. data/lib/worldline/connect/sdk/v1/domain/external_cardholder_authentication_data.rb +0 -1
  32. data/lib/worldline/connect/sdk/v1/domain/fraud_fields.rb +0 -12
  33. data/lib/worldline/connect/sdk/v1/domain/fraud_fields_shipping_details.rb +0 -3
  34. data/lib/worldline/connect/sdk/v1/domain/level3_summary_data.rb +0 -3
  35. data/lib/worldline/connect/sdk/v1/domain/line_item.rb +0 -1
  36. data/lib/worldline/connect/sdk/v1/domain/loan_recipient.rb +0 -5
  37. data/lib/worldline/connect/sdk/v1/domain/order.rb +0 -2
  38. data/lib/worldline/connect/sdk/v1/domain/order_line_details.rb +7 -0
  39. data/lib/worldline/connect/sdk/v1/domain/payment_approval_response.rb +0 -1
  40. data/lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb +0 -1
  41. data/lib/worldline/connect/sdk/v1/domain/redirect_payment_product809_specific_input.rb +0 -1
  42. data/lib/worldline/connect/sdk/v1/domain/redirect_payment_product840_specific_input.rb +0 -1
  43. data/lib/worldline/connect/sdk/v1/domain/shipping.rb +7 -0
  44. data/lib/worldline/connect/sdk/v1/domain/value_mapping_element.rb +0 -1
  45. data/lib/worldline/connect/sdk/v1/exception_factory.rb +19 -14
  46. data/lib/worldline/connect/sdk/v1/idempotence_exception.rb +2 -3
  47. data/lib/worldline/connect/sdk/v1/merchant/captures/captures_client.rb +6 -4
  48. data/lib/worldline/connect/sdk/v1/merchant/disputes/disputes_client.rb +12 -8
  49. data/lib/worldline/connect/sdk/v1/merchant/disputes/upload_file_request.rb +2 -1
  50. data/lib/worldline/connect/sdk/v1/merchant/files/files_client.rb +3 -2
  51. data/lib/worldline/connect/sdk/v1/merchant/hostedcheckouts/hostedcheckouts_client.rb +9 -6
  52. data/lib/worldline/connect/sdk/v1/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb +6 -4
  53. data/lib/worldline/connect/sdk/v1/merchant/installments/installments_client.rb +3 -2
  54. data/lib/worldline/connect/sdk/v1/merchant/mandates/mandates_client.rb +18 -12
  55. data/lib/worldline/connect/sdk/v1/merchant/merchant_client.rb +16 -0
  56. data/lib/worldline/connect/sdk/v1/merchant/payments/find_payments_params.rb +1 -0
  57. data/lib/worldline/connect/sdk/v1/merchant/payments/payments_client.rb +51 -34
  58. data/lib/worldline/connect/sdk/v1/merchant/payouts/find_payouts_params.rb +1 -0
  59. data/lib/worldline/connect/sdk/v1/merchant/payouts/payouts_client.rb +18 -12
  60. data/lib/worldline/connect/sdk/v1/merchant/productgroups/find_productgroups_params.rb +1 -0
  61. data/lib/worldline/connect/sdk/v1/merchant/productgroups/get_productgroup_params.rb +1 -0
  62. data/lib/worldline/connect/sdk/v1/merchant/productgroups/productgroups_client.rb +9 -6
  63. data/lib/worldline/connect/sdk/v1/merchant/products/directory_params.rb +1 -0
  64. data/lib/worldline/connect/sdk/v1/merchant/products/find_products_params.rb +1 -0
  65. data/lib/worldline/connect/sdk/v1/merchant/products/get_product_params.rb +1 -0
  66. data/lib/worldline/connect/sdk/v1/merchant/products/networks_params.rb +1 -0
  67. data/lib/worldline/connect/sdk/v1/merchant/products/products_client.rb +21 -14
  68. data/lib/worldline/connect/sdk/v1/merchant/refunds/find_refunds_params.rb +1 -0
  69. data/lib/worldline/connect/sdk/v1/merchant/refunds/refunds_client.rb +15 -10
  70. data/lib/worldline/connect/sdk/v1/merchant/riskassessments/riskassessments_client.rb +6 -4
  71. data/lib/worldline/connect/sdk/v1/merchant/services/convert_amount_params.rb +1 -0
  72. data/lib/worldline/connect/sdk/v1/merchant/services/privacypolicy_params.rb +1 -0
  73. data/lib/worldline/connect/sdk/v1/merchant/services/services_client.rb +15 -10
  74. data/lib/worldline/connect/sdk/v1/merchant/sessions/sessions_client.rb +3 -2
  75. data/lib/worldline/connect/sdk/v1/merchant/tokens/delete_token_params.rb +1 -0
  76. data/lib/worldline/connect/sdk/v1/merchant/tokens/tokens_client.rb +15 -10
  77. data/lib/worldline/connect/sdk/v1/platform_exception.rb +2 -4
  78. data/lib/worldline/connect/sdk/v1/reference_exception.rb +1 -2
  79. data/lib/worldline/connect/sdk/v1/v1_client.rb +1 -0
  80. data/lib/worldline/connect/sdk/v1/validation_exception.rb +2 -3
  81. data/lib/worldline/connect/sdk/v1/webhooks/v1_webhooks_factory.rb +1 -0
  82. metadata +2 -2
@@ -25,18 +25,19 @@ module Worldline
25
25
  end
26
26
 
27
27
  # Resource /!{merchantId}/tokens - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/tokens/create.html Create token}
28
+ #
28
29
  # @param body [Worldline::Connect::SDK::V1::Domain::CreateTokenRequest]
29
30
  # @param context [Worldline::Connect::SDK::CallContext, nil]
30
31
  # @return [Worldline::Connect::SDK::V1::Domain::CreateTokenResponse]
32
+ # @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
31
33
  # @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
32
34
  # @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
33
- # @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
34
35
  # @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
35
36
  # or there was a conflict (HTTP status code 404, 409 or 410)
36
37
  # @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
37
38
  # the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
38
39
  # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
39
- # @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
40
+ # @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
40
41
  def create(body, context = nil)
41
42
  uri = instantiate_uri('/v1/{merchantId}/tokens', nil)
42
43
  @communicator.post(
@@ -53,18 +54,19 @@ module Worldline
53
54
  end
54
55
 
55
56
  # Resource /!{merchantId}/tokens/!{tokenId} - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/tokens/get.html Get token}
57
+ #
56
58
  # @param token_id [String]
57
59
  # @param context [Worldline::Connect::SDK::CallContext, nil]
58
60
  # @return [Worldline::Connect::SDK::V1::Domain::TokenResponse]
61
+ # @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
59
62
  # @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
60
63
  # @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
61
- # @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
62
64
  # @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
63
65
  # or there was a conflict (HTTP status code 404, 409 or 410)
64
66
  # @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
65
67
  # the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
66
68
  # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
67
- # @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
69
+ # @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
68
70
  def get(token_id, context = nil)
69
71
  path_context = {
70
72
  'tokenId'.freeze => token_id,
@@ -83,18 +85,19 @@ module Worldline
83
85
  end
84
86
 
85
87
  # Resource /!{merchantId}/tokens/!{tokenId} - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/tokens/update.html Update token}
88
+ #
86
89
  # @param token_id [String]
87
90
  # @param body [Worldline::Connect::SDK::V1::Domain::UpdateTokenRequest]
88
91
  # @param context [Worldline::Connect::SDK::CallContext, nil]
92
+ # @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
89
93
  # @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
90
94
  # @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
91
- # @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
92
95
  # @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
93
96
  # or there was a conflict (HTTP status code 404, 409 or 410)
94
97
  # @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
95
98
  # the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
96
99
  # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
97
- # @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
100
+ # @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
98
101
  def update(token_id, body, context = nil)
99
102
  path_context = {
100
103
  'tokenId'.freeze => token_id,
@@ -114,18 +117,19 @@ module Worldline
114
117
  end
115
118
 
116
119
  # Resource /!{merchantId}/tokens/!{tokenId} - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/tokens/delete.html Delete token}
120
+ #
117
121
  # @param token_id [String]
118
122
  # @param query [Worldline::Connect::SDK::V1::Merchant::Tokens::DeleteTokenParams]
119
123
  # @param context [Worldline::Connect::SDK::CallContext, nil]
124
+ # @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
120
125
  # @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
121
126
  # @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
122
- # @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
123
127
  # @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
124
128
  # or there was a conflict (HTTP status code 404, 409 or 410)
125
129
  # @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
126
130
  # the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
127
131
  # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
128
- # @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
132
+ # @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
129
133
  def delete(token_id, query, context = nil)
130
134
  path_context = {
131
135
  'tokenId'.freeze => token_id,
@@ -144,18 +148,19 @@ module Worldline
144
148
  end
145
149
 
146
150
  # Resource /!{merchantId}/tokens/!{tokenId}/approvesepadirectdebit - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/tokens/approvesepadirectdebit.html Approve SEPA DD mandate}
151
+ #
147
152
  # @param token_id [String]
148
153
  # @param body [Worldline::Connect::SDK::V1::Domain::ApproveTokenRequest]
149
154
  # @param context [Worldline::Connect::SDK::CallContext, nil]
155
+ # @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
150
156
  # @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
151
157
  # @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
152
- # @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
153
158
  # @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
154
159
  # or there was a conflict (HTTP status code 404, 409 or 410)
155
160
  # @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
156
161
  # the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
157
162
  # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
158
- # @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
163
+ # @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
159
164
  def approvesepadirectdebit(token_id, body, context = nil)
160
165
  path_context = {
161
166
  'tokenId'.freeze => token_id,
@@ -8,12 +8,10 @@ module Worldline
8
8
  module Connect
9
9
  module SDK
10
10
  module V1
11
- # This exception is thrown when a response from the Worldline Global Collect platform indicates that an error occurred
12
- # on the Worldline Global Collect platform while processing the request.
13
- # This corresponds to a HTTP status code of 500 or 502.
11
+ # Represents an error response from the Worldline Global Collect platform when something went wrong at the Worldline Global Collect platform or further downstream.
14
12
  class PlatformException < ApiException
15
13
 
16
- # Create a new PlatformException
14
+ # Create a new PlatformException.
17
15
  # @see ApiException#initialize
18
16
  def initialize(status_code, response_body, error_id, errors,
19
17
  message='the Worldline Global Collect platform returned an error response')
@@ -8,8 +8,7 @@ module Worldline
8
8
  module Connect
9
9
  module SDK
10
10
  module V1
11
- # This error is raised when the request refers to a resource or object that is not found by the Worldline Global Collect platform.
12
- # The object referred to may not exist or it could have been removed recently.
11
+ # Represents an error response from the Worldline Global Collect platform when a non-existing or removed object is trying to be accessed.
13
12
  class ReferenceException < ApiException
14
13
 
15
14
  # Create a new ReferenceException.
@@ -21,6 +21,7 @@ module Worldline
21
21
  end
22
22
 
23
23
  # Resource /!{merchantId}
24
+ #
24
25
  # @param merchant_id [String]
25
26
  # @return [Worldline::Connect::SDK::V1::Merchant::MerchantClient]
26
27
  def merchant(merchant_id)
@@ -8,11 +8,10 @@ module Worldline
8
8
  module Connect
9
9
  module SDK
10
10
  module V1
11
- # Raised when the request sent to the Worldline Global Collect platform returned a HTTP response with status code 400.
12
- # This indicates the request received by the Worldline Global Collect platform was malformed.
11
+ # Represents an error response from the Worldline Global Collect platform when validation of requests failed.
13
12
  class ValidationException < ApiException
14
13
 
15
- # Create a new ValidationException
14
+ # Create a new ValidationException.
16
15
  # @see ApiException#initialize
17
16
  def initialize(status_code, response_body, error_id, errors,
18
17
  message='the Worldline Global Collect platform returned an incorrect request error response')
@@ -14,6 +14,7 @@ module Worldline
14
14
  class V1WebhooksFactory
15
15
 
16
16
  # Creates a WebhooksHelper that uses the given SecretKeyStore.
17
+ #
17
18
  # @return [Worldline::Connect::SDK::V1::Webhooks::WebhooksHelper]
18
19
  def create_helper(secret_key_store, marshaller: nil)
19
20
  marshaller = DefaultMarshaller.instance unless marshaller
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: connect-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Worldline Global Collect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-19 00:00:00.000000000 Z
11
+ date: 2024-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient