kintsugi_sdk 5.7.0 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/kintsugi_sdk/addressvalidation.rb +21 -21
- data/lib/kintsugi_sdk/customers.rb +55 -55
- data/lib/kintsugi_sdk/exemptions.rb +44 -44
- data/lib/kintsugi_sdk/models/errors/apierror.rb +1 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_address_validation_responses_validationerrorresponse.rb +1 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_customers_responses_validationerrorresponse.rb +1 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_exemptions_responses_validationerrorresponse.rb +1 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_products_schemas_responses_validationerrorresponse.rb +1 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_tax_estimation_responses_validationerrorresponse.rb +1 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_transactions_responses_validationerrorresponse.rb +1 -1
- data/lib/kintsugi_sdk/models/errors/errorresponse.rb +1 -1
- data/lib/kintsugi_sdk/models/errors/httpvalidationerror.rb +1 -1
- data/lib/kintsugi_sdk/models/ops/get_exemptions_v1_exemptions_get_request.rb +2 -2
- data/lib/kintsugi_sdk/models/shared/backend_src_address_validation_responses_validationerroritem.rb +2 -2
- data/lib/kintsugi_sdk/models/shared/backend_src_customers_responses_validationerroritem.rb +2 -2
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_responses_validationerroritem.rb +2 -2
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_schemas_exemption_exemptionread.rb +6 -2
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_schemas_exemption_exemptionread.rbi +2 -0
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rb +6 -2
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rbi +2 -0
- data/lib/kintsugi_sdk/models/shared/backend_src_products_schemas_responses_validationerroritem.rb +2 -2
- data/lib/kintsugi_sdk/models/shared/backend_src_tax_estimation_responses_validationerroritem.rb +2 -2
- data/lib/kintsugi_sdk/models/shared/backend_src_transactions_responses_validationerroritem.rb +2 -2
- data/lib/kintsugi_sdk/models/shared/currencyenum.rb +1 -1
- data/lib/kintsugi_sdk/models/shared/exemptioncreate.rb +6 -2
- data/lib/kintsugi_sdk/models/shared/exemptioncreate.rbi +2 -0
- data/lib/kintsugi_sdk/models/shared/exemptionsourceenum.rb +4 -0
- data/lib/kintsugi_sdk/models/shared/exemptiontype.rb +1 -0
- data/lib/kintsugi_sdk/models/shared/nexusresponse.rb +31 -21
- data/lib/kintsugi_sdk/models/shared/nexusresponse.rbi +6 -4
- data/lib/kintsugi_sdk/models/shared/productread.rb +4 -6
- data/lib/kintsugi_sdk/models/shared/relatedentitytype.rb +4 -0
- data/lib/kintsugi_sdk/models/shared/sourceenum.rb +8 -0
- data/lib/kintsugi_sdk/models/shared/taxexemptionenum.rb +1 -0
- data/lib/kintsugi_sdk/models/shared/taxitemreturnreasonenum.rb +2 -0
- data/lib/kintsugi_sdk/models/shared/taxtypeenum.rb +7 -3
- data/lib/kintsugi_sdk/models/shared/transactioncreate.rb +8 -4
- data/lib/kintsugi_sdk/models/shared/transactioncreate.rbi +2 -0
- data/lib/kintsugi_sdk/models/shared/{exemption.rb → transactionembeddedexemption.rb} +17 -4
- data/lib/kintsugi_sdk/models/shared/{exemption.rbi → transactionembeddedexemption.rbi} +4 -2
- data/lib/kintsugi_sdk/models/shared/transactionestimatepublicrequest.rb +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse.rb +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rb +6 -2
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rbi +2 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rb +6 -2
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rbi +2 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rb +1 -3
- data/lib/kintsugi_sdk/models/shared/transactionitemestimateresponse.rb +1 -3
- data/lib/kintsugi_sdk/models/shared/transactionitemread.rb +15 -3
- data/lib/kintsugi_sdk/models/shared/transactionitemread.rbi +6 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rb +8 -4
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rbi +2 -0
- data/lib/kintsugi_sdk/models/shared/transactionread.rb +21 -5
- data/lib/kintsugi_sdk/models/shared/transactionread.rbi +8 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate.rb +8 -4
- data/lib/kintsugi_sdk/models/shared/transactionupdate.rbi +2 -0
- data/lib/kintsugi_sdk/models/shared/usetaxregistrationpath.rb +24 -0
- data/lib/kintsugi_sdk/models/shared/usetaxregistrationpath.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared.rb +2 -1
- data/lib/kintsugi_sdk/nexus.rb +7 -7
- data/lib/kintsugi_sdk/openapisdk.rb +5 -5
- data/lib/kintsugi_sdk/products.rb +19 -19
- data/lib/kintsugi_sdk/sdk_hooks/hooks.rb +1 -1
- data/lib/kintsugi_sdk/sdk_hooks/types.rb +14 -14
- data/lib/kintsugi_sdk/sdkconfiguration.rb +17 -17
- data/lib/kintsugi_sdk/taxestimation.rb +11 -11
- data/lib/kintsugi_sdk/transactions.rb +51 -51
- data/lib/kintsugi_sdk/utils/forms.rb +23 -23
- data/lib/kintsugi_sdk/utils/headers.rb +4 -4
- data/lib/kintsugi_sdk/utils/query_params.rb +14 -14
- data/lib/kintsugi_sdk/utils/request_bodies.rb +7 -7
- data/lib/kintsugi_sdk/utils/retries.rb +5 -5
- data/lib/kintsugi_sdk/utils/security.rb +16 -16
- data/lib/kintsugi_sdk/utils/url.rb +6 -6
- data/lib/kintsugi_sdk/utils/utils.rb +31 -31
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 064a4339fc2e628c3e33283a452a28646c5dd073e14ca1bfcdba0d19fcdbfbcb
|
|
4
|
+
data.tar.gz: 77d37b4beb866cc2936532cbc583f5e49b9fbab71ffb73d22fdc77ea10469e17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8a9310e47b8164267fe13384bfd0bf1bf4294fdb172e3b734a8133c2df6f23aac89d80af1ef2f50cfeb200249cb483f87a02a1d3677e7060dd97d153b4ce01bf
|
|
7
|
+
data.tar.gz: 2dbca16ac4940915affa2babaafa26c22abb355af86da9919fa831f15e234c8d82755c9e210790ff8502f7113595d02d759fbffbb2f75788120af45f71cfcfc5
|
|
@@ -23,7 +23,7 @@ module KintsugiSDK
|
|
|
23
23
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) }
|
|
26
|
+
sig { params(base_url: ::String, url_variables: T.nilable(T::Hash[::Symbol, T.any(::String, T::Enum)])).returns(::String) }
|
|
27
27
|
def get_url(base_url:, url_variables: nil)
|
|
28
28
|
sd_base_url, sd_options = @sdk_configuration.get_server_details
|
|
29
29
|
|
|
@@ -41,7 +41,7 @@ module KintsugiSDK
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
sig { params(request: Models::Shared::AddressBase, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(T::Array[Models::Shared::AddressSearchResponse]) }
|
|
44
|
+
sig { params(request: Models::Shared::AddressBase, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(T::Array[Models::Shared::AddressSearchResponse]) }
|
|
45
45
|
def search(request:, timeout_ms: nil, http_headers: nil)
|
|
46
46
|
# search - Search
|
|
47
47
|
# This API validates and enriches address information
|
|
@@ -52,15 +52,15 @@ module KintsugiSDK
|
|
|
52
52
|
base_url = Utils.template_url(url, params)
|
|
53
53
|
url = "#{base_url}/v1/address_validation/search"
|
|
54
54
|
headers = {}
|
|
55
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
55
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
56
56
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :request, :json)
|
|
57
57
|
headers['content-type'] = req_content_type
|
|
58
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
58
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
59
59
|
|
|
60
60
|
if form && !form.empty?
|
|
61
61
|
body = Utils.encode_form(form)
|
|
62
62
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
63
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
63
|
+
body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
|
|
64
64
|
else
|
|
65
65
|
body = data
|
|
66
66
|
end
|
|
@@ -83,7 +83,7 @@ module KintsugiSDK
|
|
|
83
83
|
security_source: @sdk_configuration.security_source
|
|
84
84
|
)
|
|
85
85
|
|
|
86
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
86
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
87
87
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
88
88
|
|
|
89
89
|
|
|
@@ -104,7 +104,7 @@ module KintsugiSDK
|
|
|
104
104
|
request: req
|
|
105
105
|
)
|
|
106
106
|
end
|
|
107
|
-
rescue StandardError => e
|
|
107
|
+
rescue ::StandardError => e
|
|
108
108
|
error = e
|
|
109
109
|
ensure
|
|
110
110
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -140,7 +140,7 @@ module KintsugiSDK
|
|
|
140
140
|
response: http_response
|
|
141
141
|
)
|
|
142
142
|
response_data = http_response.env.response_body
|
|
143
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Array.new(Models::Shared::AddressSearchResponse))
|
|
143
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Crystalline::Array.new(Models::Shared::AddressSearchResponse))
|
|
144
144
|
|
|
145
145
|
return obj
|
|
146
146
|
else
|
|
@@ -155,7 +155,7 @@ module KintsugiSDK
|
|
|
155
155
|
response: http_response
|
|
156
156
|
)
|
|
157
157
|
response_data = http_response.env.response_body
|
|
158
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
158
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
159
159
|
raise obj
|
|
160
160
|
else
|
|
161
161
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -169,7 +169,7 @@ module KintsugiSDK
|
|
|
169
169
|
response: http_response
|
|
170
170
|
)
|
|
171
171
|
response_data = http_response.env.response_body
|
|
172
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcAddressValidationResponsesValidationErrorResponse)
|
|
172
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::BackendSrcAddressValidationResponsesValidationErrorResponse)
|
|
173
173
|
raise obj
|
|
174
174
|
else
|
|
175
175
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -183,7 +183,7 @@ module KintsugiSDK
|
|
|
183
183
|
response: http_response
|
|
184
184
|
)
|
|
185
185
|
response_data = http_response.env.response_body
|
|
186
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
186
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
187
187
|
raise obj
|
|
188
188
|
else
|
|
189
189
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -199,7 +199,7 @@ module KintsugiSDK
|
|
|
199
199
|
end
|
|
200
200
|
|
|
201
201
|
|
|
202
|
-
sig { params(request: Models::Ops::SuggestionsV1AddressValidationSuggestionsPostRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(::Object) }
|
|
202
|
+
sig { params(request: Models::Ops::SuggestionsV1AddressValidationSuggestionsPostRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(::Object) }
|
|
203
203
|
def suggestions(request:, timeout_ms: nil, http_headers: nil)
|
|
204
204
|
# suggestions - Suggestions
|
|
205
205
|
# This API endpoint provides address suggestions based on
|
|
@@ -211,15 +211,15 @@ module KintsugiSDK
|
|
|
211
211
|
base_url = Utils.template_url(url, params)
|
|
212
212
|
url = "#{base_url}/v1/address_validation/suggestions"
|
|
213
213
|
headers = Utils.get_headers(request)
|
|
214
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
214
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
215
215
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :validation_address, :json)
|
|
216
216
|
headers['content-type'] = req_content_type
|
|
217
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
217
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
218
218
|
|
|
219
219
|
if form && !form.empty?
|
|
220
220
|
body = Utils.encode_form(form)
|
|
221
221
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
222
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
222
|
+
body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
|
|
223
223
|
else
|
|
224
224
|
body = data
|
|
225
225
|
end
|
|
@@ -242,7 +242,7 @@ module KintsugiSDK
|
|
|
242
242
|
security_source: @sdk_configuration.security_source
|
|
243
243
|
)
|
|
244
244
|
|
|
245
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
245
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
246
246
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
247
247
|
|
|
248
248
|
|
|
@@ -263,7 +263,7 @@ module KintsugiSDK
|
|
|
263
263
|
request: req
|
|
264
264
|
)
|
|
265
265
|
end
|
|
266
|
-
rescue StandardError => e
|
|
266
|
+
rescue ::StandardError => e
|
|
267
267
|
error = e
|
|
268
268
|
ensure
|
|
269
269
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -299,7 +299,7 @@ module KintsugiSDK
|
|
|
299
299
|
response: http_response
|
|
300
300
|
)
|
|
301
301
|
response_data = http_response.env.response_body
|
|
302
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), ::Object)
|
|
302
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), ::Object)
|
|
303
303
|
|
|
304
304
|
return obj
|
|
305
305
|
else
|
|
@@ -314,7 +314,7 @@ module KintsugiSDK
|
|
|
314
314
|
response: http_response
|
|
315
315
|
)
|
|
316
316
|
response_data = http_response.env.response_body
|
|
317
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
317
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
318
318
|
raise obj
|
|
319
319
|
else
|
|
320
320
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -328,7 +328,7 @@ module KintsugiSDK
|
|
|
328
328
|
response: http_response
|
|
329
329
|
)
|
|
330
330
|
response_data = http_response.env.response_body
|
|
331
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcAddressValidationResponsesValidationErrorResponse)
|
|
331
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::BackendSrcAddressValidationResponsesValidationErrorResponse)
|
|
332
332
|
raise obj
|
|
333
333
|
else
|
|
334
334
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -342,7 +342,7 @@ module KintsugiSDK
|
|
|
342
342
|
response: http_response
|
|
343
343
|
)
|
|
344
344
|
response_data = http_response.env.response_body
|
|
345
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
345
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
346
346
|
raise obj
|
|
347
347
|
else
|
|
348
348
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -23,7 +23,7 @@ module KintsugiSDK
|
|
|
23
23
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) }
|
|
26
|
+
sig { params(base_url: ::String, url_variables: T.nilable(T::Hash[::Symbol, T.any(::String, T::Enum)])).returns(::String) }
|
|
27
27
|
def get_url(base_url:, url_variables: nil)
|
|
28
28
|
sd_base_url, sd_options = @sdk_configuration.get_server_details
|
|
29
29
|
|
|
@@ -41,7 +41,7 @@ module KintsugiSDK
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
sig { params(request: Models::Ops::GetCustomersV1Request, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::PageCustomerRead) }
|
|
44
|
+
sig { params(request: Models::Ops::GetCustomersV1Request, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Shared::PageCustomerRead) }
|
|
45
45
|
def list(request:, timeout_ms: nil, http_headers: nil)
|
|
46
46
|
# list - Get customers
|
|
47
47
|
# The Get Customers API retrieves
|
|
@@ -51,7 +51,7 @@ module KintsugiSDK
|
|
|
51
51
|
base_url = Utils.template_url(url, params)
|
|
52
52
|
url = "#{base_url}/v1/customers"
|
|
53
53
|
headers = Utils.get_headers(request)
|
|
54
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
54
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
55
55
|
query_params = Utils.get_query_params(Models::Ops::GetCustomersV1Request, request, nil)
|
|
56
56
|
headers['Accept'] = 'application/json'
|
|
57
57
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
@@ -72,7 +72,7 @@ module KintsugiSDK
|
|
|
72
72
|
security_source: @sdk_configuration.security_source
|
|
73
73
|
)
|
|
74
74
|
|
|
75
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
75
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
76
76
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
77
77
|
|
|
78
78
|
|
|
@@ -93,7 +93,7 @@ module KintsugiSDK
|
|
|
93
93
|
request: req
|
|
94
94
|
)
|
|
95
95
|
end
|
|
96
|
-
rescue StandardError => e
|
|
96
|
+
rescue ::StandardError => e
|
|
97
97
|
error = e
|
|
98
98
|
ensure
|
|
99
99
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -129,7 +129,7 @@ module KintsugiSDK
|
|
|
129
129
|
response: http_response
|
|
130
130
|
)
|
|
131
131
|
response_data = http_response.env.response_body
|
|
132
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::PageCustomerRead)
|
|
132
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Shared::PageCustomerRead)
|
|
133
133
|
|
|
134
134
|
return obj
|
|
135
135
|
else
|
|
@@ -144,7 +144,7 @@ module KintsugiSDK
|
|
|
144
144
|
response: http_response
|
|
145
145
|
)
|
|
146
146
|
response_data = http_response.env.response_body
|
|
147
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
147
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
148
148
|
raise obj
|
|
149
149
|
else
|
|
150
150
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -158,7 +158,7 @@ module KintsugiSDK
|
|
|
158
158
|
response: http_response
|
|
159
159
|
)
|
|
160
160
|
response_data = http_response.env.response_body
|
|
161
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcCustomersResponsesValidationErrorResponse)
|
|
161
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::BackendSrcCustomersResponsesValidationErrorResponse)
|
|
162
162
|
raise obj
|
|
163
163
|
else
|
|
164
164
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -172,7 +172,7 @@ module KintsugiSDK
|
|
|
172
172
|
response: http_response
|
|
173
173
|
)
|
|
174
174
|
response_data = http_response.env.response_body
|
|
175
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
175
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
176
176
|
raise obj
|
|
177
177
|
else
|
|
178
178
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -188,7 +188,7 @@ module KintsugiSDK
|
|
|
188
188
|
end
|
|
189
189
|
|
|
190
190
|
|
|
191
|
-
sig { params(request: Models::Ops::CreateCustomerV1CustomersPostRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::CustomerRead) }
|
|
191
|
+
sig { params(request: Models::Ops::CreateCustomerV1CustomersPostRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Shared::CustomerRead) }
|
|
192
192
|
def create(request:, timeout_ms: nil, http_headers: nil)
|
|
193
193
|
# create - Create customer
|
|
194
194
|
# The Create Customer API enables the creation of a new customer record with essential
|
|
@@ -197,15 +197,15 @@ module KintsugiSDK
|
|
|
197
197
|
base_url = Utils.template_url(url, params)
|
|
198
198
|
url = "#{base_url}/v1/customers"
|
|
199
199
|
headers = Utils.get_headers(request)
|
|
200
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
200
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
201
201
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :customer_create, :json)
|
|
202
202
|
headers['content-type'] = req_content_type
|
|
203
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
203
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
204
204
|
|
|
205
205
|
if form && !form.empty?
|
|
206
206
|
body = Utils.encode_form(form)
|
|
207
207
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
208
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
208
|
+
body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
|
|
209
209
|
else
|
|
210
210
|
body = data
|
|
211
211
|
end
|
|
@@ -228,7 +228,7 @@ module KintsugiSDK
|
|
|
228
228
|
security_source: @sdk_configuration.security_source
|
|
229
229
|
)
|
|
230
230
|
|
|
231
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
231
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
232
232
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
233
233
|
|
|
234
234
|
|
|
@@ -249,7 +249,7 @@ module KintsugiSDK
|
|
|
249
249
|
request: req
|
|
250
250
|
)
|
|
251
251
|
end
|
|
252
|
-
rescue StandardError => e
|
|
252
|
+
rescue ::StandardError => e
|
|
253
253
|
error = e
|
|
254
254
|
ensure
|
|
255
255
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -285,7 +285,7 @@ module KintsugiSDK
|
|
|
285
285
|
response: http_response
|
|
286
286
|
)
|
|
287
287
|
response_data = http_response.env.response_body
|
|
288
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::CustomerRead)
|
|
288
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Shared::CustomerRead)
|
|
289
289
|
|
|
290
290
|
return obj
|
|
291
291
|
else
|
|
@@ -300,7 +300,7 @@ module KintsugiSDK
|
|
|
300
300
|
response: http_response
|
|
301
301
|
)
|
|
302
302
|
response_data = http_response.env.response_body
|
|
303
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
303
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
304
304
|
raise obj
|
|
305
305
|
else
|
|
306
306
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -314,7 +314,7 @@ module KintsugiSDK
|
|
|
314
314
|
response: http_response
|
|
315
315
|
)
|
|
316
316
|
response_data = http_response.env.response_body
|
|
317
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcCustomersResponsesValidationErrorResponse)
|
|
317
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::BackendSrcCustomersResponsesValidationErrorResponse)
|
|
318
318
|
raise obj
|
|
319
319
|
else
|
|
320
320
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -328,7 +328,7 @@ module KintsugiSDK
|
|
|
328
328
|
response: http_response
|
|
329
329
|
)
|
|
330
330
|
response_data = http_response.env.response_body
|
|
331
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
331
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
332
332
|
raise obj
|
|
333
333
|
else
|
|
334
334
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -344,7 +344,7 @@ module KintsugiSDK
|
|
|
344
344
|
end
|
|
345
345
|
|
|
346
346
|
|
|
347
|
-
sig { params(request: Models::Ops::GetCustomerByExternalIdV1CustomersExternalExternalIdGetRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::CustomerRead) }
|
|
347
|
+
sig { params(request: Models::Ops::GetCustomerByExternalIdV1CustomersExternalExternalIdGetRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Shared::CustomerRead) }
|
|
348
348
|
def get_by_external_id(request:, timeout_ms: nil, http_headers: nil)
|
|
349
349
|
# get_by_external_id - Get customer by external id
|
|
350
350
|
# The Get Customer By External ID API retrieves the details of a single customer using
|
|
@@ -359,7 +359,7 @@ module KintsugiSDK
|
|
|
359
359
|
request
|
|
360
360
|
)
|
|
361
361
|
headers = Utils.get_headers(request)
|
|
362
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
362
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
363
363
|
headers['Accept'] = 'application/json'
|
|
364
364
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
365
365
|
|
|
@@ -379,7 +379,7 @@ module KintsugiSDK
|
|
|
379
379
|
security_source: @sdk_configuration.security_source
|
|
380
380
|
)
|
|
381
381
|
|
|
382
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
382
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
383
383
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
384
384
|
|
|
385
385
|
|
|
@@ -399,7 +399,7 @@ module KintsugiSDK
|
|
|
399
399
|
request: req
|
|
400
400
|
)
|
|
401
401
|
end
|
|
402
|
-
rescue StandardError => e
|
|
402
|
+
rescue ::StandardError => e
|
|
403
403
|
error = e
|
|
404
404
|
ensure
|
|
405
405
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -435,7 +435,7 @@ module KintsugiSDK
|
|
|
435
435
|
response: http_response
|
|
436
436
|
)
|
|
437
437
|
response_data = http_response.env.response_body
|
|
438
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::CustomerRead)
|
|
438
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Shared::CustomerRead)
|
|
439
439
|
|
|
440
440
|
return obj
|
|
441
441
|
else
|
|
@@ -450,7 +450,7 @@ module KintsugiSDK
|
|
|
450
450
|
response: http_response
|
|
451
451
|
)
|
|
452
452
|
response_data = http_response.env.response_body
|
|
453
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::HTTPValidationError)
|
|
453
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::HTTPValidationError)
|
|
454
454
|
raise obj
|
|
455
455
|
else
|
|
456
456
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -466,7 +466,7 @@ module KintsugiSDK
|
|
|
466
466
|
end
|
|
467
467
|
|
|
468
468
|
|
|
469
|
-
sig { params(request: Models::Ops::GetCustomerByIdV1CustomersCustomerIdGetRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::CustomerRead) }
|
|
469
|
+
sig { params(request: Models::Ops::GetCustomerByIdV1CustomersCustomerIdGetRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Shared::CustomerRead) }
|
|
470
470
|
def get(request:, timeout_ms: nil, http_headers: nil)
|
|
471
471
|
# get - Get customer by id
|
|
472
472
|
# The Get Customer By ID API retrieves the details of a single customer
|
|
@@ -481,7 +481,7 @@ module KintsugiSDK
|
|
|
481
481
|
request
|
|
482
482
|
)
|
|
483
483
|
headers = Utils.get_headers(request)
|
|
484
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
484
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
485
485
|
headers['Accept'] = 'application/json'
|
|
486
486
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
487
487
|
|
|
@@ -501,7 +501,7 @@ module KintsugiSDK
|
|
|
501
501
|
security_source: @sdk_configuration.security_source
|
|
502
502
|
)
|
|
503
503
|
|
|
504
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
504
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
505
505
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
506
506
|
|
|
507
507
|
|
|
@@ -521,7 +521,7 @@ module KintsugiSDK
|
|
|
521
521
|
request: req
|
|
522
522
|
)
|
|
523
523
|
end
|
|
524
|
-
rescue StandardError => e
|
|
524
|
+
rescue ::StandardError => e
|
|
525
525
|
error = e
|
|
526
526
|
ensure
|
|
527
527
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -557,7 +557,7 @@ module KintsugiSDK
|
|
|
557
557
|
response: http_response
|
|
558
558
|
)
|
|
559
559
|
response_data = http_response.env.response_body
|
|
560
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::CustomerRead)
|
|
560
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Shared::CustomerRead)
|
|
561
561
|
|
|
562
562
|
return obj
|
|
563
563
|
else
|
|
@@ -572,7 +572,7 @@ module KintsugiSDK
|
|
|
572
572
|
response: http_response
|
|
573
573
|
)
|
|
574
574
|
response_data = http_response.env.response_body
|
|
575
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::HTTPValidationError)
|
|
575
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::HTTPValidationError)
|
|
576
576
|
raise obj
|
|
577
577
|
else
|
|
578
578
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -588,7 +588,7 @@ module KintsugiSDK
|
|
|
588
588
|
end
|
|
589
589
|
|
|
590
590
|
|
|
591
|
-
sig { params(request: Models::Ops::UpdateCustomerV1CustomersCustomerIdPutRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::CustomerRead) }
|
|
591
|
+
sig { params(request: Models::Ops::UpdateCustomerV1CustomersCustomerIdPutRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Shared::CustomerRead) }
|
|
592
592
|
def update(request:, timeout_ms: nil, http_headers: nil)
|
|
593
593
|
# update - Update customer
|
|
594
594
|
# The Update Customer API allows you to modify an existing customer's
|
|
@@ -603,15 +603,15 @@ module KintsugiSDK
|
|
|
603
603
|
request
|
|
604
604
|
)
|
|
605
605
|
headers = Utils.get_headers(request)
|
|
606
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
606
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
607
607
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :customer_update, :json)
|
|
608
608
|
headers['content-type'] = req_content_type
|
|
609
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
609
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
610
610
|
|
|
611
611
|
if form && !form.empty?
|
|
612
612
|
body = Utils.encode_form(form)
|
|
613
613
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
614
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
614
|
+
body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
|
|
615
615
|
else
|
|
616
616
|
body = data
|
|
617
617
|
end
|
|
@@ -634,7 +634,7 @@ module KintsugiSDK
|
|
|
634
634
|
security_source: @sdk_configuration.security_source
|
|
635
635
|
)
|
|
636
636
|
|
|
637
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
637
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
638
638
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
639
639
|
|
|
640
640
|
|
|
@@ -655,7 +655,7 @@ module KintsugiSDK
|
|
|
655
655
|
request: req
|
|
656
656
|
)
|
|
657
657
|
end
|
|
658
|
-
rescue StandardError => e
|
|
658
|
+
rescue ::StandardError => e
|
|
659
659
|
error = e
|
|
660
660
|
ensure
|
|
661
661
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -691,7 +691,7 @@ module KintsugiSDK
|
|
|
691
691
|
response: http_response
|
|
692
692
|
)
|
|
693
693
|
response_data = http_response.env.response_body
|
|
694
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::CustomerRead)
|
|
694
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Shared::CustomerRead)
|
|
695
695
|
|
|
696
696
|
return obj
|
|
697
697
|
else
|
|
@@ -706,7 +706,7 @@ module KintsugiSDK
|
|
|
706
706
|
response: http_response
|
|
707
707
|
)
|
|
708
708
|
response_data = http_response.env.response_body
|
|
709
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
709
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
710
710
|
raise obj
|
|
711
711
|
else
|
|
712
712
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -720,7 +720,7 @@ module KintsugiSDK
|
|
|
720
720
|
response: http_response
|
|
721
721
|
)
|
|
722
722
|
response_data = http_response.env.response_body
|
|
723
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcCustomersResponsesValidationErrorResponse)
|
|
723
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::BackendSrcCustomersResponsesValidationErrorResponse)
|
|
724
724
|
raise obj
|
|
725
725
|
else
|
|
726
726
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -734,7 +734,7 @@ module KintsugiSDK
|
|
|
734
734
|
response: http_response
|
|
735
735
|
)
|
|
736
736
|
response_data = http_response.env.response_body
|
|
737
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
737
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
738
738
|
raise obj
|
|
739
739
|
else
|
|
740
740
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -750,7 +750,7 @@ module KintsugiSDK
|
|
|
750
750
|
end
|
|
751
751
|
|
|
752
752
|
|
|
753
|
-
sig { params(request: Models::Ops::GetTransactionsByCustomerRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(T.any(T::Array[Models::Shared::TransactionRead], Models::Shared::PageTransactionRead)) }
|
|
753
|
+
sig { params(request: Models::Ops::GetTransactionsByCustomerRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(T.any(T::Array[Models::Shared::TransactionRead], Models::Shared::PageTransactionRead)) }
|
|
754
754
|
def get_transactions(request:, timeout_ms: nil, http_headers: nil)
|
|
755
755
|
# get_transactions - Get transactions by customer id
|
|
756
756
|
# Get a list of transactions for a customer by their unique ID. When pagination params are provided, this endpoint returns a paginated response. When omitted, it returns the legacy list response format (deprecated).
|
|
@@ -763,7 +763,7 @@ module KintsugiSDK
|
|
|
763
763
|
request
|
|
764
764
|
)
|
|
765
765
|
headers = Utils.get_headers(request)
|
|
766
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
766
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
767
767
|
query_params = Utils.get_query_params(Models::Ops::GetTransactionsByCustomerRequest, request, nil)
|
|
768
768
|
headers['Accept'] = 'application/json'
|
|
769
769
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
@@ -784,7 +784,7 @@ module KintsugiSDK
|
|
|
784
784
|
security_source: @sdk_configuration.security_source
|
|
785
785
|
)
|
|
786
786
|
|
|
787
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
787
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
788
788
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
789
789
|
|
|
790
790
|
|
|
@@ -805,7 +805,7 @@ module KintsugiSDK
|
|
|
805
805
|
request: req
|
|
806
806
|
)
|
|
807
807
|
end
|
|
808
|
-
rescue StandardError => e
|
|
808
|
+
rescue ::StandardError => e
|
|
809
809
|
error = e
|
|
810
810
|
ensure
|
|
811
811
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -841,7 +841,7 @@ module KintsugiSDK
|
|
|
841
841
|
response: http_response
|
|
842
842
|
)
|
|
843
843
|
response_data = http_response.env.response_body
|
|
844
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Union.new(Crystalline::Array.new(Models::Shared::TransactionRead), Models::Shared::PageTransactionRead))
|
|
844
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Crystalline::Union.new(Crystalline::Array.new(Models::Shared::TransactionRead), Models::Shared::PageTransactionRead))
|
|
845
845
|
|
|
846
846
|
return obj
|
|
847
847
|
else
|
|
@@ -856,7 +856,7 @@ module KintsugiSDK
|
|
|
856
856
|
response: http_response
|
|
857
857
|
)
|
|
858
858
|
response_data = http_response.env.response_body
|
|
859
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::HTTPValidationError)
|
|
859
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::HTTPValidationError)
|
|
860
860
|
raise obj
|
|
861
861
|
else
|
|
862
862
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
@@ -872,7 +872,7 @@ module KintsugiSDK
|
|
|
872
872
|
end
|
|
873
873
|
|
|
874
874
|
|
|
875
|
-
sig { params(request: Models::Ops::CreateTransactionByCustomerRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::TransactionRead) }
|
|
875
|
+
sig { params(request: Models::Ops::CreateTransactionByCustomerRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Shared::TransactionRead) }
|
|
876
876
|
def create_transaction(request:, timeout_ms: nil, http_headers: nil)
|
|
877
877
|
# create_transaction - Create transaction by customer id
|
|
878
878
|
# Create a new transaction for a specific customer.
|
|
@@ -885,15 +885,15 @@ module KintsugiSDK
|
|
|
885
885
|
request
|
|
886
886
|
)
|
|
887
887
|
headers = Utils.get_headers(request)
|
|
888
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
888
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
889
889
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :transaction_create, :json)
|
|
890
890
|
headers['content-type'] = req_content_type
|
|
891
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
891
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
892
892
|
|
|
893
893
|
if form && !form.empty?
|
|
894
894
|
body = Utils.encode_form(form)
|
|
895
895
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
896
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
896
|
+
body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
|
|
897
897
|
else
|
|
898
898
|
body = data
|
|
899
899
|
end
|
|
@@ -916,7 +916,7 @@ module KintsugiSDK
|
|
|
916
916
|
security_source: @sdk_configuration.security_source
|
|
917
917
|
)
|
|
918
918
|
|
|
919
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
919
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
920
920
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
921
921
|
|
|
922
922
|
|
|
@@ -937,7 +937,7 @@ module KintsugiSDK
|
|
|
937
937
|
request: req
|
|
938
938
|
)
|
|
939
939
|
end
|
|
940
|
-
rescue StandardError => e
|
|
940
|
+
rescue ::StandardError => e
|
|
941
941
|
error = e
|
|
942
942
|
ensure
|
|
943
943
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -973,7 +973,7 @@ module KintsugiSDK
|
|
|
973
973
|
response: http_response
|
|
974
974
|
)
|
|
975
975
|
response_data = http_response.env.response_body
|
|
976
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::TransactionRead)
|
|
976
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Shared::TransactionRead)
|
|
977
977
|
|
|
978
978
|
return obj
|
|
979
979
|
else
|
|
@@ -988,7 +988,7 @@ module KintsugiSDK
|
|
|
988
988
|
response: http_response
|
|
989
989
|
)
|
|
990
990
|
response_data = http_response.env.response_body
|
|
991
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::HTTPValidationError)
|
|
991
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::HTTPValidationError)
|
|
992
992
|
raise obj
|
|
993
993
|
else
|
|
994
994
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|