connect-sdk-ruby 3.0.0 → 3.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/connect-sdk-ruby.gemspec +1 -1
- data/examples/v1/merchant/captures/create_refund_capture_example.rb +3 -3
- data/examples/v1/merchant/payments/create_payment_example.rb +3 -3
- data/examples/v1/merchant/payments/refund_payment_example.rb +3 -3
- data/examples/v1/merchant/payouts/create_payout_example.rb +3 -3
- data/lib/worldline/connect/sdk/communication/metadata_provider.rb +1 -1
- data/lib/worldline/connect/sdk/v1/api_exception.rb +5 -7
- data/lib/worldline/connect/sdk/v1/authorization_exception.rb +3 -3
- data/lib/worldline/connect/sdk/v1/declined_payment_exception.rb +12 -23
- data/lib/worldline/connect/sdk/v1/declined_payout_exception.rb +13 -24
- data/lib/worldline/connect/sdk/v1/declined_refund_exception.rb +13 -24
- data/lib/worldline/connect/sdk/v1/declined_transaction_exception.rb +2 -2
- data/lib/worldline/connect/sdk/v1/domain/abstract_card_payment_method_specific_input.rb +0 -3
- data/lib/worldline/connect/sdk/v1/domain/abstract_sepa_direct_debit_payment_product771_specific_input.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/additional_order_input.rb +0 -3
- data/lib/worldline/connect/sdk/v1/domain/airline_data.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/airline_flight_leg.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/bank_transfer_payout_method_specific_input.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/card_payment_method_specific_input.rb +0 -2
- data/lib/worldline/connect/sdk/v1/domain/card_payment_method_specific_output.rb +7 -0
- data/lib/worldline/connect/sdk/v1/domain/cash_payment_method_specific_input.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/cash_payment_product1503_specific_input.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/create_payout_request.rb +0 -8
- data/lib/worldline/connect/sdk/v1/domain/created_payment_output.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/customer.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/customer_base.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/customer_risk_assessment.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/decrypted_payment_data.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/device_render_options.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/external_cardholder_authentication_data.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/fraud_fields.rb +0 -12
- data/lib/worldline/connect/sdk/v1/domain/fraud_fields_shipping_details.rb +0 -3
- data/lib/worldline/connect/sdk/v1/domain/level3_summary_data.rb +0 -3
- data/lib/worldline/connect/sdk/v1/domain/line_item.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/loan_recipient.rb +0 -5
- data/lib/worldline/connect/sdk/v1/domain/order.rb +0 -2
- data/lib/worldline/connect/sdk/v1/domain/order_line_details.rb +7 -0
- data/lib/worldline/connect/sdk/v1/domain/payment_approval_response.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/redirect_payment_product809_specific_input.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/redirect_payment_product840_specific_input.rb +0 -1
- data/lib/worldline/connect/sdk/v1/domain/shipping.rb +7 -0
- data/lib/worldline/connect/sdk/v1/domain/value_mapping_element.rb +0 -1
- data/lib/worldline/connect/sdk/v1/exception_factory.rb +19 -14
- data/lib/worldline/connect/sdk/v1/idempotence_exception.rb +2 -3
- data/lib/worldline/connect/sdk/v1/merchant/captures/captures_client.rb +6 -4
- data/lib/worldline/connect/sdk/v1/merchant/disputes/disputes_client.rb +12 -8
- data/lib/worldline/connect/sdk/v1/merchant/disputes/upload_file_request.rb +2 -1
- data/lib/worldline/connect/sdk/v1/merchant/files/files_client.rb +3 -2
- data/lib/worldline/connect/sdk/v1/merchant/hostedcheckouts/hostedcheckouts_client.rb +9 -6
- data/lib/worldline/connect/sdk/v1/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb +6 -4
- data/lib/worldline/connect/sdk/v1/merchant/installments/installments_client.rb +3 -2
- data/lib/worldline/connect/sdk/v1/merchant/mandates/mandates_client.rb +18 -12
- data/lib/worldline/connect/sdk/v1/merchant/merchant_client.rb +16 -0
- data/lib/worldline/connect/sdk/v1/merchant/payments/find_payments_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/payments/payments_client.rb +51 -34
- data/lib/worldline/connect/sdk/v1/merchant/payouts/find_payouts_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/payouts/payouts_client.rb +18 -12
- data/lib/worldline/connect/sdk/v1/merchant/productgroups/find_productgroups_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/productgroups/get_productgroup_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/productgroups/productgroups_client.rb +9 -6
- data/lib/worldline/connect/sdk/v1/merchant/products/directory_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/products/find_products_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/products/get_product_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/products/networks_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/products/products_client.rb +21 -14
- data/lib/worldline/connect/sdk/v1/merchant/refunds/find_refunds_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/refunds/refunds_client.rb +15 -10
- data/lib/worldline/connect/sdk/v1/merchant/riskassessments/riskassessments_client.rb +6 -4
- data/lib/worldline/connect/sdk/v1/merchant/services/convert_amount_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/services/privacypolicy_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/services/services_client.rb +15 -10
- data/lib/worldline/connect/sdk/v1/merchant/sessions/sessions_client.rb +3 -2
- data/lib/worldline/connect/sdk/v1/merchant/tokens/delete_token_params.rb +1 -0
- data/lib/worldline/connect/sdk/v1/merchant/tokens/tokens_client.rb +15 -10
- data/lib/worldline/connect/sdk/v1/platform_exception.rb +2 -4
- data/lib/worldline/connect/sdk/v1/reference_exception.rb +1 -2
- data/lib/worldline/connect/sdk/v1/v1_client.rb +1 -0
- data/lib/worldline/connect/sdk/v1/validation_exception.rb +2 -3
- data/lib/worldline/connect/sdk/v1/webhooks/v1_webhooks_factory.rb +1 -0
- metadata +2 -2
|
@@ -31,27 +31,22 @@ module Worldline
|
|
|
31
31
|
# @attr [String] website
|
|
32
32
|
class FraudFields < Worldline::Connect::SDK::Domain::DataObject
|
|
33
33
|
|
|
34
|
-
#
|
|
35
34
|
# @deprecated For risk assessments there is no replacement. For other calls, use Order.shipping.addressIndicator instead
|
|
36
35
|
attr_accessor :addresses_are_identical
|
|
37
36
|
|
|
38
37
|
attr_accessor :black_list_data
|
|
39
38
|
|
|
40
|
-
#
|
|
41
39
|
# @deprecated This should be the same as Order.customer.billingAddress
|
|
42
40
|
attr_accessor :card_owner_address
|
|
43
41
|
|
|
44
42
|
attr_accessor :customer_ip_address
|
|
45
43
|
|
|
46
|
-
#
|
|
47
44
|
# @deprecated Use Order.customer.device.defaultFormFill instead
|
|
48
45
|
attr_accessor :default_form_fill
|
|
49
46
|
|
|
50
|
-
#
|
|
51
47
|
# @deprecated No replacement
|
|
52
48
|
attr_accessor :device_fingerprint_activated
|
|
53
49
|
|
|
54
|
-
#
|
|
55
50
|
# @deprecated Use Order.customer.device.deviceFingerprintTransactionId instead
|
|
56
51
|
attr_accessor :device_fingerprint_transaction_id
|
|
57
52
|
|
|
@@ -59,35 +54,28 @@ module Worldline
|
|
|
59
54
|
|
|
60
55
|
attr_accessor :gift_message
|
|
61
56
|
|
|
62
|
-
#
|
|
63
57
|
# @deprecated Use Order.customer.account.hasForgottenPassword instead
|
|
64
58
|
attr_accessor :has_forgotten_pwd
|
|
65
59
|
|
|
66
|
-
#
|
|
67
60
|
# @deprecated Use Order.customer.account.hasPassword instead
|
|
68
61
|
attr_accessor :has_password
|
|
69
62
|
|
|
70
|
-
#
|
|
71
63
|
# @deprecated Use Order.customer.isPreviousCustomer instead
|
|
72
64
|
attr_accessor :is_previous_customer
|
|
73
65
|
|
|
74
66
|
attr_accessor :order_timezone
|
|
75
67
|
|
|
76
|
-
#
|
|
77
68
|
# @deprecated Use Order.shipping.comments instead
|
|
78
69
|
attr_accessor :ship_comments
|
|
79
70
|
|
|
80
|
-
#
|
|
81
71
|
# @deprecated Use Order.shipping.trackingNumber instead
|
|
82
72
|
attr_accessor :shipment_tracking_number
|
|
83
73
|
|
|
84
|
-
#
|
|
85
74
|
# @deprecated No replacement
|
|
86
75
|
attr_accessor :shipping_details
|
|
87
76
|
|
|
88
77
|
attr_accessor :user_data
|
|
89
78
|
|
|
90
|
-
#
|
|
91
79
|
# @deprecated Use Merchant.websiteUrl instead
|
|
92
80
|
attr_accessor :website
|
|
93
81
|
|
|
@@ -15,15 +15,12 @@ module Worldline
|
|
|
15
15
|
# @deprecated No replacement
|
|
16
16
|
class FraudFieldsShippingDetails < Worldline::Connect::SDK::Domain::DataObject
|
|
17
17
|
|
|
18
|
-
#
|
|
19
18
|
# @deprecated No replacement
|
|
20
19
|
attr_accessor :method_details
|
|
21
20
|
|
|
22
|
-
#
|
|
23
21
|
# @deprecated No replacement
|
|
24
22
|
attr_accessor :method_speed
|
|
25
23
|
|
|
26
|
-
#
|
|
27
24
|
# @deprecated No replacement
|
|
28
25
|
attr_accessor :method_type
|
|
29
26
|
|
|
@@ -15,15 +15,12 @@ module Worldline
|
|
|
15
15
|
# @deprecated Use ShoppingCart.amountBreakdown instead
|
|
16
16
|
class Level3SummaryData < Worldline::Connect::SDK::Domain::DataObject
|
|
17
17
|
|
|
18
|
-
#
|
|
19
18
|
# @deprecated Use ShoppingCart.amountBreakdown with type DISCOUNT instead
|
|
20
19
|
attr_accessor :discount_amount
|
|
21
20
|
|
|
22
|
-
#
|
|
23
21
|
# @deprecated Use ShoppingCart.amountBreakdown with type DUTY instead
|
|
24
22
|
attr_accessor :duty_amount
|
|
25
23
|
|
|
26
|
-
#
|
|
27
24
|
# @deprecated Use ShoppingCart.amountBreakdown with type SHIPPING instead
|
|
28
25
|
attr_accessor :shipping_amount
|
|
29
26
|
|
|
@@ -17,23 +17,18 @@ module Worldline
|
|
|
17
17
|
# @deprecated No replacement
|
|
18
18
|
class LoanRecipient < Worldline::Connect::SDK::Domain::DataObject
|
|
19
19
|
|
|
20
|
-
#
|
|
21
20
|
# @deprecated No replacement
|
|
22
21
|
attr_accessor :account_number
|
|
23
22
|
|
|
24
|
-
#
|
|
25
23
|
# @deprecated No replacement
|
|
26
24
|
attr_accessor :date_of_birth
|
|
27
25
|
|
|
28
|
-
#
|
|
29
26
|
# @deprecated No replacement
|
|
30
27
|
attr_accessor :partial_pan
|
|
31
28
|
|
|
32
|
-
#
|
|
33
29
|
# @deprecated No replacement
|
|
34
30
|
attr_accessor :surname
|
|
35
31
|
|
|
36
|
-
#
|
|
37
32
|
# @deprecated No replacement
|
|
38
33
|
attr_accessor :zip
|
|
39
34
|
|
|
@@ -12,6 +12,7 @@ module Worldline
|
|
|
12
12
|
# @attr [Integer] discount_amount
|
|
13
13
|
# @attr [Integer] google_product_category_id
|
|
14
14
|
# @attr [Integer] line_amount_total
|
|
15
|
+
# @attr [String] naics_commodity_code
|
|
15
16
|
# @attr [String] product_category
|
|
16
17
|
# @attr [String] product_code
|
|
17
18
|
# @attr [String] product_name
|
|
@@ -29,6 +30,8 @@ module Worldline
|
|
|
29
30
|
|
|
30
31
|
attr_accessor :line_amount_total
|
|
31
32
|
|
|
33
|
+
attr_accessor :naics_commodity_code
|
|
34
|
+
|
|
32
35
|
attr_accessor :product_category
|
|
33
36
|
|
|
34
37
|
attr_accessor :product_code
|
|
@@ -53,6 +56,7 @@ module Worldline
|
|
|
53
56
|
hash['discountAmount'] = @discount_amount unless @discount_amount.nil?
|
|
54
57
|
hash['googleProductCategoryId'] = @google_product_category_id unless @google_product_category_id.nil?
|
|
55
58
|
hash['lineAmountTotal'] = @line_amount_total unless @line_amount_total.nil?
|
|
59
|
+
hash['naicsCommodityCode'] = @naics_commodity_code unless @naics_commodity_code.nil?
|
|
56
60
|
hash['productCategory'] = @product_category unless @product_category.nil?
|
|
57
61
|
hash['productCode'] = @product_code unless @product_code.nil?
|
|
58
62
|
hash['productName'] = @product_name unless @product_name.nil?
|
|
@@ -76,6 +80,9 @@ module Worldline
|
|
|
76
80
|
if hash.has_key? 'lineAmountTotal'
|
|
77
81
|
@line_amount_total = hash['lineAmountTotal']
|
|
78
82
|
end
|
|
83
|
+
if hash.has_key? 'naicsCommodityCode'
|
|
84
|
+
@naics_commodity_code = hash['naicsCommodityCode']
|
|
85
|
+
end
|
|
79
86
|
if hash.has_key? 'productCategory'
|
|
80
87
|
@product_category = hash['productCategory']
|
|
81
88
|
end
|
|
@@ -13,7 +13,6 @@ module Worldline
|
|
|
13
13
|
# @attr [String] issuer_id
|
|
14
14
|
class RedirectPaymentProduct809SpecificInput < Worldline::Connect::SDK::Domain::DataObject
|
|
15
15
|
|
|
16
|
-
#
|
|
17
16
|
# @deprecated Use RedirectPaymentMethodSpecificInput.expirationPeriod instead
|
|
18
17
|
attr_accessor :expiration_period
|
|
19
18
|
|
|
@@ -13,7 +13,6 @@ module Worldline
|
|
|
13
13
|
# @attr [true/false] is_shortcut
|
|
14
14
|
class RedirectPaymentProduct840SpecificInput < Worldline::Connect::SDK::V1::Domain::AbstractRedirectPaymentProduct840SpecificInput
|
|
15
15
|
|
|
16
|
-
#
|
|
17
16
|
# @deprecated Use Order.references.descriptor instead
|
|
18
17
|
attr_accessor :custom
|
|
19
18
|
|
|
@@ -16,6 +16,7 @@ module Worldline
|
|
|
16
16
|
# @attr [String] email_address
|
|
17
17
|
# @attr [String] first_usage_date
|
|
18
18
|
# @attr [true/false] is_first_usage
|
|
19
|
+
# @attr [String] shipped_from_zip
|
|
19
20
|
# @attr [String] tracking_number
|
|
20
21
|
# @attr [String] type
|
|
21
22
|
class Shipping < Worldline::Connect::SDK::Domain::DataObject
|
|
@@ -32,6 +33,8 @@ module Worldline
|
|
|
32
33
|
|
|
33
34
|
attr_accessor :is_first_usage
|
|
34
35
|
|
|
36
|
+
attr_accessor :shipped_from_zip
|
|
37
|
+
|
|
35
38
|
attr_accessor :tracking_number
|
|
36
39
|
|
|
37
40
|
attr_accessor :type
|
|
@@ -45,6 +48,7 @@ module Worldline
|
|
|
45
48
|
hash['emailAddress'] = @email_address unless @email_address.nil?
|
|
46
49
|
hash['firstUsageDate'] = @first_usage_date unless @first_usage_date.nil?
|
|
47
50
|
hash['isFirstUsage'] = @is_first_usage unless @is_first_usage.nil?
|
|
51
|
+
hash['shippedFromZip'] = @shipped_from_zip unless @shipped_from_zip.nil?
|
|
48
52
|
hash['trackingNumber'] = @tracking_number unless @tracking_number.nil?
|
|
49
53
|
hash['type'] = @type unless @type.nil?
|
|
50
54
|
hash
|
|
@@ -71,6 +75,9 @@ module Worldline
|
|
|
71
75
|
if hash.has_key? 'isFirstUsage'
|
|
72
76
|
@is_first_usage = hash['isFirstUsage']
|
|
73
77
|
end
|
|
78
|
+
if hash.has_key? 'shippedFromZip'
|
|
79
|
+
@shipped_from_zip = hash['shippedFromZip']
|
|
80
|
+
end
|
|
74
81
|
if hash.has_key? 'trackingNumber'
|
|
75
82
|
@tracking_number = hash['trackingNumber']
|
|
76
83
|
end
|
|
@@ -12,8 +12,6 @@ require_relative 'platform_exception'
|
|
|
12
12
|
require_relative 'reference_exception'
|
|
13
13
|
require_relative 'validation_exception'
|
|
14
14
|
|
|
15
|
-
require 'worldline/connect/sdk/api_resource'
|
|
16
|
-
require 'worldline/connect/sdk/communication/request_header'
|
|
17
15
|
require 'worldline/connect/sdk/v1/domain/error_response'
|
|
18
16
|
require 'worldline/connect/sdk/v1/domain/payment_error_response'
|
|
19
17
|
require 'worldline/connect/sdk/v1/domain/payout_error_response'
|
|
@@ -26,41 +24,46 @@ module Worldline
|
|
|
26
24
|
def self.create_exception(status_code, response_body, error_object, context)
|
|
27
25
|
if error_object.is_a?(Worldline::Connect::SDK::V1::Domain::PaymentErrorResponse)
|
|
28
26
|
return DeclinedPaymentException.new(status_code, response_body, error_object) unless error_object.payment_result.nil?
|
|
29
|
-
return
|
|
27
|
+
return create_exception_from_response_fields(status_code, response_body, error_object.error_id, error_object.errors, context)
|
|
30
28
|
end
|
|
31
29
|
if error_object.is_a?(Worldline::Connect::SDK::V1::Domain::PayoutErrorResponse)
|
|
32
30
|
return DeclinedPayoutException.new(status_code, response_body, error_object) unless error_object.payout_result.nil?
|
|
33
|
-
return
|
|
31
|
+
return create_exception_from_response_fields(status_code, response_body, error_object.error_id, error_object.errors, context)
|
|
34
32
|
end
|
|
35
33
|
if error_object.is_a?(Worldline::Connect::SDK::V1::Domain::RefundErrorResponse)
|
|
36
34
|
return DeclinedRefundException.new(status_code, response_body, error_object) unless error_object.refund_result.nil?
|
|
37
|
-
return
|
|
35
|
+
return create_exception_from_response_fields(status_code, response_body, error_object.error_id, error_object.errors, context)
|
|
38
36
|
end
|
|
39
37
|
raise ArgumentError.new("unsupported error object type: " + error_object.class.name) unless error_object.is_a?(Worldline::Connect::SDK::V1::Domain::ErrorResponse)
|
|
40
|
-
|
|
38
|
+
create_exception_from_response_fields(status_code, response_body, error_object.error_id, error_object.errors, context)
|
|
41
39
|
end
|
|
42
40
|
|
|
43
41
|
private
|
|
44
42
|
|
|
45
|
-
def self.
|
|
43
|
+
def self.create_exception_from_response_fields(status_code, response_body, error_id, errors, context)
|
|
46
44
|
case status_code
|
|
47
45
|
when 400
|
|
48
|
-
|
|
46
|
+
return ValidationException.new(status_code, response_body, error_id, errors)
|
|
49
47
|
when 403
|
|
50
48
|
return AuthorizationException.new(status_code, response_body, error_id, errors)
|
|
51
|
-
when 404
|
|
49
|
+
when 404
|
|
52
50
|
return ReferenceException.new(status_code, response_body, error_id, errors)
|
|
53
51
|
when 409
|
|
54
52
|
if is_idempotence_error(errors, context)
|
|
55
53
|
idempotence_key = context.idempotence_key
|
|
56
54
|
idempotence_request_timestamp = context.idempotence_request_timestamp
|
|
57
|
-
return IdempotenceException.new(status_code, response_body, error_id,
|
|
58
|
-
|
|
59
|
-
idempotence_request_timestamp)
|
|
55
|
+
return IdempotenceException.new(status_code, response_body, error_id, errors,
|
|
56
|
+
idempotence_key, idempotence_request_timestamp)
|
|
60
57
|
else
|
|
61
58
|
return ReferenceException.new(status_code, response_body, error_id, errors)
|
|
62
59
|
end
|
|
63
|
-
when
|
|
60
|
+
when 410
|
|
61
|
+
return ReferenceException.new(status_code, response_body, error_id, errors)
|
|
62
|
+
when 500
|
|
63
|
+
return PlatformException.new(status_code, response_body, error_id, errors)
|
|
64
|
+
when 502
|
|
65
|
+
return PlatformException.new(status_code, response_body, error_id, errors)
|
|
66
|
+
when 503
|
|
64
67
|
return PlatformException.new(status_code, response_body, error_id, errors)
|
|
65
68
|
else
|
|
66
69
|
return ApiException.new(status_code, response_body, error_id, errors)
|
|
@@ -68,7 +71,9 @@ module Worldline
|
|
|
68
71
|
end
|
|
69
72
|
|
|
70
73
|
def self.is_idempotence_error(errors, context)
|
|
71
|
-
!context
|
|
74
|
+
!context&.idempotence_key.nil? &&
|
|
75
|
+
errors&.length == 1 &&
|
|
76
|
+
errors[0]&.code == '1409'
|
|
72
77
|
end
|
|
73
78
|
end
|
|
74
79
|
end
|
|
@@ -8,15 +8,14 @@ module Worldline
|
|
|
8
8
|
module Connect
|
|
9
9
|
module SDK
|
|
10
10
|
module V1
|
|
11
|
-
#
|
|
12
|
-
# a request with the same _idempotence_key_ was received earlier.
|
|
11
|
+
# Represents an error response from the Worldline Global Collect platform when an idempotent request failed because the first request has not finished yet.
|
|
13
12
|
# The _idempotence_request_timestamp_ indicates the time when the first request with this _idempotence_key_ arrived.
|
|
14
13
|
#
|
|
15
14
|
# @attr_reader [String] idempotence_key The idempotence key used in the request.
|
|
16
15
|
# @attr_reader [Integer] idempotence_request_timestamp A timestamp indicating the arrival time of the request that conflicts with the request just sent.
|
|
17
16
|
class IdempotenceException < ApiException
|
|
18
17
|
|
|
19
|
-
# Create a new IdempotenceException
|
|
18
|
+
# Create a new IdempotenceException.
|
|
20
19
|
# @see ApiException#initialize
|
|
21
20
|
def initialize(status_code, response_body, error_id, errors, idempotence_key, idempotence_request_timestamp,
|
|
22
21
|
message='the Worldline Global Collect platform returned a duplicate request error response')
|
|
@@ -26,18 +26,19 @@ module Worldline
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
# Resource /!{merchantId}/captures/!{captureId} - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/captures/get.html Get capture}
|
|
29
|
+
#
|
|
29
30
|
# @param capture_id [String]
|
|
30
31
|
# @param context [Worldline::Connect::SDK::CallContext, nil]
|
|
31
32
|
# @return [Worldline::Connect::SDK::V1::Domain::CaptureResponse]
|
|
33
|
+
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
32
34
|
# @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
33
35
|
# @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
34
|
-
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
35
36
|
# @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
36
37
|
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
37
38
|
# @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
|
|
38
39
|
# the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
|
|
39
40
|
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
40
|
-
# @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
|
|
41
|
+
# @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
|
|
41
42
|
def get(capture_id, context = nil)
|
|
42
43
|
path_context = {
|
|
43
44
|
'captureId'.freeze => capture_id,
|
|
@@ -56,20 +57,21 @@ module Worldline
|
|
|
56
57
|
end
|
|
57
58
|
|
|
58
59
|
# Resource /!{merchantId}/captures/!{captureId}/refund - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/captures/refund.html Create Refund}
|
|
60
|
+
#
|
|
59
61
|
# @param capture_id [String]
|
|
60
62
|
# @param body [Worldline::Connect::SDK::V1::Domain::RefundRequest]
|
|
61
63
|
# @param context [Worldline::Connect::SDK::CallContext, nil]
|
|
62
64
|
# @return [Worldline::Connect::SDK::V1::Domain::RefundResponse]
|
|
63
65
|
# @raise [Worldline::Connect::SDK::V1::DeclinedRefundException] if the Worldline Global Collect platform declined / rejected the refund. The refund result will be available from the exception.
|
|
66
|
+
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
64
67
|
# @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
65
68
|
# @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
66
|
-
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
67
69
|
# @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
68
70
|
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
69
71
|
# @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
|
|
70
72
|
# the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
|
|
71
73
|
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
72
|
-
# @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
|
|
74
|
+
# @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
|
|
73
75
|
def refund(capture_id, body, context = nil)
|
|
74
76
|
path_context = {
|
|
75
77
|
'captureId'.freeze => capture_id,
|
|
@@ -25,18 +25,19 @@ module Worldline
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
# Resource /!{merchantId}/disputes/!{disputeId} - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/disputes/get.html Get dispute}
|
|
28
|
+
#
|
|
28
29
|
# @param dispute_id [String]
|
|
29
30
|
# @param context [Worldline::Connect::SDK::CallContext, nil]
|
|
30
31
|
# @return [Worldline::Connect::SDK::V1::Domain::DisputeResponse]
|
|
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 get(dispute_id, context = nil)
|
|
41
42
|
path_context = {
|
|
42
43
|
'disputeId'.freeze => dispute_id,
|
|
@@ -55,18 +56,19 @@ module Worldline
|
|
|
55
56
|
end
|
|
56
57
|
|
|
57
58
|
# Resource /!{merchantId}/disputes/!{disputeId}/submit - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/disputes/submit.html Submit dispute}
|
|
59
|
+
#
|
|
58
60
|
# @param dispute_id [String]
|
|
59
61
|
# @param context [Worldline::Connect::SDK::CallContext, nil]
|
|
60
62
|
# @return [Worldline::Connect::SDK::V1::Domain::DisputeResponse]
|
|
63
|
+
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
61
64
|
# @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
62
65
|
# @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
63
|
-
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
64
66
|
# @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
65
67
|
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
66
68
|
# @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
|
|
67
69
|
# the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
|
|
68
70
|
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
69
|
-
# @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
|
|
71
|
+
# @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
|
|
70
72
|
def submit(dispute_id, context = nil)
|
|
71
73
|
path_context = {
|
|
72
74
|
'disputeId'.freeze => dispute_id,
|
|
@@ -86,18 +88,19 @@ module Worldline
|
|
|
86
88
|
end
|
|
87
89
|
|
|
88
90
|
# Resource /!{merchantId}/disputes/!{disputeId}/cancel - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/disputes/cancel.html Cancel dispute}
|
|
91
|
+
#
|
|
89
92
|
# @param dispute_id [String]
|
|
90
93
|
# @param context [Worldline::Connect::SDK::CallContext, nil]
|
|
91
94
|
# @return [Worldline::Connect::SDK::V1::Domain::DisputeResponse]
|
|
95
|
+
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
92
96
|
# @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
93
97
|
# @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
94
|
-
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
95
98
|
# @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
96
99
|
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
97
100
|
# @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
|
|
98
101
|
# the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
|
|
99
102
|
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
100
|
-
# @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
|
|
103
|
+
# @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
|
|
101
104
|
def cancel(dispute_id, context = nil)
|
|
102
105
|
path_context = {
|
|
103
106
|
'disputeId'.freeze => dispute_id,
|
|
@@ -117,19 +120,20 @@ module Worldline
|
|
|
117
120
|
end
|
|
118
121
|
|
|
119
122
|
# Resource /!{merchantId}/disputes/!{disputeId} - {https://apireference.connect.worldline-solutions.com/fileserviceapi/v1/en_US/ruby/disputes/uploadFile.html Upload File}
|
|
123
|
+
#
|
|
120
124
|
# @param dispute_id [String]
|
|
121
125
|
# @param body [Worldline::Connect::SDK::V1::Merchant::Disputes::UploadFileRequest]
|
|
122
126
|
# @param context [Worldline::Connect::SDK::CallContext, nil]
|
|
123
127
|
# @return [Worldline::Connect::SDK::V1::Domain::UploadDisputeFileResponse]
|
|
128
|
+
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
124
129
|
# @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
125
130
|
# @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
126
|
-
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
127
131
|
# @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
128
132
|
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
129
133
|
# @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
|
|
130
134
|
# the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
|
|
131
135
|
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
132
|
-
# @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
|
|
136
|
+
# @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
|
|
133
137
|
def upload_file(dispute_id, body, context = nil)
|
|
134
138
|
path_context = {
|
|
135
139
|
'disputeId'.freeze => dispute_id,
|
|
@@ -12,7 +12,8 @@ module Worldline
|
|
|
12
12
|
module Merchant
|
|
13
13
|
module Disputes
|
|
14
14
|
# Multipart/form-data parameters for {https://apireference.connect.worldline-solutions.com/fileserviceapi/v1/en_US/ruby/disputes/uploadFile.html Upload File}
|
|
15
|
-
#
|
|
15
|
+
#
|
|
16
|
+
# @attr [Worldline::Connect::SDK::Domain::UploadableFile] file
|
|
16
17
|
class UploadFileRequest < Worldline::Connect::SDK::Communication::MultipartFormDataRequest
|
|
17
18
|
|
|
18
19
|
attr_accessor :file
|
|
@@ -23,18 +23,19 @@ module Worldline
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
# Resource /!{merchantId}/files/!{fileId} - {https://apireference.connect.worldline-solutions.com/fileserviceapi/v1/en_US/ruby/files/getFile.html Retrieve File}
|
|
26
|
+
#
|
|
26
27
|
# @param file_id [String]
|
|
27
28
|
# @param context [Worldline::Connect::SDK::CallContext, nil]
|
|
28
29
|
# @yield [Array<Worldline::Connect::SDK::Communication::ResponseHeader>, IO] The response headers and body.
|
|
30
|
+
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
29
31
|
# @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
30
32
|
# @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
31
|
-
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
32
33
|
# @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
33
34
|
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
34
35
|
# @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
|
|
35
36
|
# the Worldline Global Collect 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
|
-
# @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
|
|
38
|
+
# @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
|
|
38
39
|
def get_file(file_id, context = nil)
|
|
39
40
|
path_context = {
|
|
40
41
|
'fileId'.freeze => file_id,
|
|
@@ -25,18 +25,19 @@ module Worldline
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
# Resource /!{merchantId}/hostedcheckouts - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/hostedcheckouts/create.html Create hosted checkout}
|
|
28
|
+
#
|
|
28
29
|
# @param body [Worldline::Connect::SDK::V1::Domain::CreateHostedCheckoutRequest]
|
|
29
30
|
# @param context [Worldline::Connect::SDK::CallContext, nil]
|
|
30
31
|
# @return [Worldline::Connect::SDK::V1::Domain::CreateHostedCheckoutResponse]
|
|
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}/hostedcheckouts', nil)
|
|
42
43
|
@communicator.post(
|
|
@@ -53,18 +54,19 @@ module Worldline
|
|
|
53
54
|
end
|
|
54
55
|
|
|
55
56
|
# Resource /!{merchantId}/hostedcheckouts/!{hostedCheckoutId} - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/hostedcheckouts/get.html Get hosted checkout status}
|
|
57
|
+
#
|
|
56
58
|
# @param hosted_checkout_id [String]
|
|
57
59
|
# @param context [Worldline::Connect::SDK::CallContext, nil]
|
|
58
60
|
# @return [Worldline::Connect::SDK::V1::Domain::GetHostedCheckoutResponse]
|
|
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(hosted_checkout_id, context = nil)
|
|
69
71
|
path_context = {
|
|
70
72
|
'hostedCheckoutId'.freeze => hosted_checkout_id,
|
|
@@ -83,17 +85,18 @@ module Worldline
|
|
|
83
85
|
end
|
|
84
86
|
|
|
85
87
|
# Resource /!{merchantId}/hostedcheckouts/!{hostedCheckoutId} - {https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/ruby/hostedcheckouts/delete.html Delete hosted checkout}
|
|
88
|
+
#
|
|
86
89
|
# @param hosted_checkout_id [String]
|
|
87
90
|
# @param context [Worldline::Connect::SDK::CallContext, nil]
|
|
91
|
+
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
88
92
|
# @raise [Worldline::Connect::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
89
93
|
# @raise [Worldline::Connect::SDK::V1::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
90
|
-
# @raise [Worldline::Connect::SDK::V1::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
91
94
|
# @raise [Worldline::Connect::SDK::V1::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
92
95
|
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
93
96
|
# @raise [Worldline::Connect::SDK::V1::PlatformException] if something went wrong at the Worldline Global Collect platform,
|
|
94
97
|
# the Worldline Global Collect platform was unable to process a message from a downstream partner/acquirer,
|
|
95
98
|
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
96
|
-
# @raise [Worldline::Connect::SDK::V1::ApiException]if the Worldline Global Collect platform returned any other error
|
|
99
|
+
# @raise [Worldline::Connect::SDK::V1::ApiException] if the Worldline Global Collect platform returned any other error
|
|
97
100
|
def delete(hosted_checkout_id, context = nil)
|
|
98
101
|
path_context = {
|
|
99
102
|
'hostedCheckoutId'.freeze => hosted_checkout_id,
|