kintsugi_sdk 5.6.0 → 5.7.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/lib/crystalline/types.rb +11 -3
- data/lib/kintsugi_sdk/addressvalidation.rb +26 -16
- data/lib/kintsugi_sdk/customers.rb +148 -123
- data/lib/kintsugi_sdk/exemptions.rb +102 -85
- data/lib/kintsugi_sdk/models/errors/apierror.rbi +2 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_address_validation_responses_validationerrorresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_customers_responses_validationerrorresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_exemptions_responses_validationerrorresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/errors/{backend_src_products_responses_validationerrorresponse.rb → backend_src_products_schemas_responses_validationerrorresponse.rb} +3 -3
- data/lib/kintsugi_sdk/models/errors/backend_src_products_schemas_responses_validationerrorresponse.rbi +13 -0
- data/lib/kintsugi_sdk/models/errors/backend_src_tax_estimation_responses_validationerrorresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_transactions_responses_validationerrorresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/errors/errorresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/errors/httpvalidationerror.rbi +1 -1
- data/lib/kintsugi_sdk/models/errors.rb +1 -1
- data/lib/kintsugi_sdk/models/ops/{search_v1_address_validation_search_post_security.rb → country.rb} +3 -8
- data/lib/kintsugi_sdk/models/{shared/registration.rbi → ops/country.rbi} +3 -3
- data/lib/kintsugi_sdk/models/ops/country_code.rb +27 -0
- data/lib/kintsugi_sdk/models/ops/country_code.rbi +11 -0
- data/lib/kintsugi_sdk/models/ops/create_customer_v1_customers_post_request.rb +36 -0
- data/lib/kintsugi_sdk/models/ops/create_customer_v1_customers_post_request.rbi +15 -0
- data/lib/kintsugi_sdk/models/ops/create_exemption_v1_exemptions_post_request.rb +36 -0
- data/lib/kintsugi_sdk/models/ops/create_exemption_v1_exemptions_post_request.rbi +15 -0
- data/lib/kintsugi_sdk/models/ops/create_transaction_v1_transactions_post_request.rb +36 -0
- data/lib/kintsugi_sdk/models/ops/create_transaction_v1_transactions_post_request.rbi +15 -0
- data/lib/kintsugi_sdk/models/ops/createtransactionbycustomer_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/createtransactionbycustomer_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/estimate_tax_v1_tax_estimate_post_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/estimate_tax_v1_tax_estimate_post_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/get_customer_by_external_id_v1_customers_external_external_id_get_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/get_customer_by_external_id_v1_customers_external_external_id_get_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/get_customer_by_id_v1_customers_customer_id_get_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/get_customer_by_id_v1_customers_customer_id_get_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/get_customers_v1_request.rb +13 -5
- data/lib/kintsugi_sdk/models/ops/get_customers_v1_request.rbi +5 -1
- data/lib/kintsugi_sdk/models/ops/get_exemption_by_id_v1_exemptions_exemption_id_get_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/get_exemption_by_id_v1_exemptions_exemption_id_get_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/get_exemptions_v1_exemptions_get_request.rb +17 -9
- data/lib/kintsugi_sdk/models/ops/get_exemptions_v1_exemptions_get_request.rbi +7 -3
- data/lib/kintsugi_sdk/models/ops/get_nexus_for_org_v1_nexus_get_request.rb +29 -13
- data/lib/kintsugi_sdk/models/ops/get_nexus_for_org_v1_nexus_get_request.rbi +15 -7
- data/lib/kintsugi_sdk/models/ops/get_nexus_for_org_v1_nexus_get_response_get_nexus_for_org_v1_nexus_get.rb +27 -0
- data/lib/kintsugi_sdk/models/ops/get_nexus_for_org_v1_nexus_get_response_get_nexus_for_org_v1_nexus_get.rbi +11 -0
- data/lib/kintsugi_sdk/models/ops/get_product_by_id_v1_products_product_id_get_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/get_product_by_id_v1_products_product_id_get_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/get_transaction_by_id_v1_transactions_transaction_id_get_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/get_transaction_by_id_v1_transactions_transaction_id_get_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/get_transactions_v1_transactions_get_request.rb +44 -18
- data/lib/kintsugi_sdk/models/ops/get_transactions_v1_transactions_get_request.rbi +15 -5
- data/lib/kintsugi_sdk/models/ops/getexemptionattachments_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/getexemptionattachments_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/gettransactionbyexternalid_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/gettransactionbyexternalid_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/gettransactionsbycustomer_request.rb +14 -2
- data/lib/kintsugi_sdk/models/ops/gettransactionsbycustomer_request.rbi +7 -1
- data/lib/kintsugi_sdk/models/ops/gettransactionsbycustomer_response_get_transactions_by_customer_id_v1_cus_6a2c85.rb +27 -0
- data/lib/kintsugi_sdk/models/ops/gettransactionsbycustomer_response_get_transactions_by_customer_id_v1_cus_6a2c85.rbi +11 -0
- data/lib/kintsugi_sdk/models/ops/gettransactionsbyfiling_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/gettransactionsbyfiling_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/queryparam_country.rb +27 -0
- data/lib/kintsugi_sdk/models/ops/queryparam_country.rbi +11 -0
- data/lib/kintsugi_sdk/models/ops/suggestions_v1_address_validation_suggestions_post_request.rb +36 -0
- data/lib/kintsugi_sdk/models/ops/suggestions_v1_address_validation_suggestions_post_request.rbi +15 -0
- data/lib/kintsugi_sdk/models/ops/update_customer_v1_customers_customer_id_put_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/update_customer_v1_customers_customer_id_put_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/update_product_v1_products_product_id_put_product.rb +27 -0
- data/lib/kintsugi_sdk/models/ops/update_product_v1_products_product_id_put_product.rbi +11 -0
- data/lib/kintsugi_sdk/models/ops/update_product_v1_products_product_id_put_request.rb +9 -5
- data/lib/kintsugi_sdk/models/ops/update_product_v1_products_product_id_put_request.rbi +5 -3
- data/lib/kintsugi_sdk/models/ops/update_transaction_v1_transactions_transaction_id_put_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/update_transaction_v1_transactions_transaction_id_put_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/uploadexemptioncert_request.rb +6 -2
- data/lib/kintsugi_sdk/models/ops/uploadexemptioncert_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops.rb +10 -1
- data/lib/kintsugi_sdk/models/shared/addressbase.rb +1 -1
- data/lib/kintsugi_sdk/models/shared/addressbase.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addresses.rb +7 -3
- data/lib/kintsugi_sdk/models/shared/addresses.rbi +3 -1
- data/lib/kintsugi_sdk/models/shared/addressresponsedata.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addresssearchresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addressstatus.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addresssubmittedresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addresstype.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/appliedto.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/attachmentread.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_address_validation_responses_validationerroritem.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_customers_responses_validationerroritem.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_responses_validationerroritem.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/{backend_src_exemptions_models_exemptionread.rb → backend_src_exemptions_schemas_exemption_exemptionread.rb} +11 -10
- data/lib/kintsugi_sdk/models/shared/{backend_src_exemptions_models_exemptionread.rbi → backend_src_exemptions_schemas_exemption_exemptionread.rbi} +5 -5
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rb +9 -9
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rbi +3 -3
- data/lib/kintsugi_sdk/models/shared/{backend_src_products_responses_validationerroritem.rb → backend_src_products_schemas_responses_validationerroritem.rb} +1 -1
- data/lib/kintsugi_sdk/models/shared/{backend_src_products_responses_validationerroritem.rbi → backend_src_products_schemas_responses_validationerroritem.rbi} +3 -3
- data/lib/kintsugi_sdk/models/shared/backend_src_tax_estimation_responses_validationerroritem.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_transactions_responses_validationerroritem.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/body_upload_exemption_certificate_v1_exemptions_exemption_id_attachments_post.rb +2 -2
- data/lib/kintsugi_sdk/models/shared/body_upload_exemption_certificate_v1_exemptions_exemption_id_attachments_post.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/{registration.rb → context.rb} +1 -1
- data/lib/kintsugi_sdk/models/shared/context.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/conversion_rate.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/conversion_rate.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/converted_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/converted_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/converted_subtotal.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/converted_subtotal.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/converted_tax_amount_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/converted_tax_amount_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/converted_tax_amount_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/converted_tax_amount_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/converted_taxable_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/converted_taxable_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/converted_total_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/converted_total_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/converted_total_discount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/converted_total_discount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/converted_total_tax_amount_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/converted_total_tax_amount_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/converted_total_tax_amount_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/converted_total_tax_amount_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/converted_total_tax_liability_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/converted_total_tax_liability_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/countrycodeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/currencyenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customer.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/customer.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/customerbase.rb +16 -12
- data/lib/kintsugi_sdk/models/shared/customerbase.rbi +7 -5
- data/lib/kintsugi_sdk/models/shared/customerbasebase.rb +16 -12
- data/lib/kintsugi_sdk/models/shared/customerbasebase.rbi +7 -5
- data/lib/kintsugi_sdk/models/shared/customerbasepublic.rb +16 -12
- data/lib/kintsugi_sdk/models/shared/customerbasepublic.rbi +7 -5
- data/lib/kintsugi_sdk/models/shared/customercreate.rb +20 -16
- data/lib/kintsugi_sdk/models/shared/customercreate.rbi +9 -7
- data/lib/kintsugi_sdk/models/shared/customerread.rb +24 -16
- data/lib/kintsugi_sdk/models/shared/customerread.rbi +11 -7
- data/lib/kintsugi_sdk/models/shared/customertaxregistrationread.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customertaxtypeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customerupdate.rb +13 -9
- data/lib/kintsugi_sdk/models/shared/customerupdate.rbi +5 -3
- data/lib/kintsugi_sdk/models/shared/discount_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/discount_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/discountbuilder.rb +6 -6
- data/lib/kintsugi_sdk/models/shared/discountbuilder.rbi +3 -3
- data/lib/kintsugi_sdk/models/shared/disregardedtypeenum.rb +20 -0
- data/lib/kintsugi_sdk/models/shared/disregardedtypeenum.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/documenttypeenum.rb +21 -0
- data/lib/kintsugi_sdk/models/shared/documenttypeenum.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/exemption.rb +23 -14
- data/lib/kintsugi_sdk/models/shared/exemption.rbi +9 -5
- data/lib/kintsugi_sdk/models/shared/exemptioncreate.rb +3 -3
- data/lib/kintsugi_sdk/models/shared/exemptioncreate.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/exemptionrequired.rb +22 -2
- data/lib/kintsugi_sdk/models/shared/exemptionrequired.rbi +11 -1
- data/lib/kintsugi_sdk/models/shared/exemptionsourceenum.rb +42 -0
- data/lib/kintsugi_sdk/models/shared/exemptionsourceenum.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/exemptionstatus.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/exemptiontype.rb +1 -0
- data/lib/kintsugi_sdk/models/shared/exemptiontype.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/fastapi_pagination_default_page_exemptionread_2.rb +2 -2
- data/lib/kintsugi_sdk/models/shared/fastapi_pagination_default_page_exemptionread_2.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/findthresholdcrossingtransactionstate.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/jurisdictiontype.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/loc.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/loc.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/nexusresponse.rb +112 -82
- data/lib/kintsugi_sdk/models/shared/nexusresponse.rbi +53 -41
- data/lib/kintsugi_sdk/models/shared/nexusstateenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/nexusstatusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/nexustypeenum.rb +1 -0
- data/lib/kintsugi_sdk/models/shared/nexustypeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/page_customerread_.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/page_nexusresponse_.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/page_transactionread_.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/periodmodelenum.rb +2 -0
- data/lib/kintsugi_sdk/models/shared/periodmodelenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/processingstatusenum.rb +1 -0
- data/lib/kintsugi_sdk/models/shared/processingstatusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/productread.rb +40 -12
- data/lib/kintsugi_sdk/models/shared/productread.rbi +19 -5
- data/lib/kintsugi_sdk/models/shared/productstatusenum.rb +1 -0
- data/lib/kintsugi_sdk/models/shared/productstatusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/productupdate.rb +6 -6
- data/lib/kintsugi_sdk/models/shared/productupdate.rbi +3 -3
- data/lib/kintsugi_sdk/models/shared/productupdatev2.rb +64 -0
- data/lib/kintsugi_sdk/models/shared/productupdatev2.rbi +29 -0
- data/lib/kintsugi_sdk/models/shared/quantity.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/quantity.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/quantity_of_the_product_.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/quantity_of_the_product_.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/rate.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/rate.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/registrationsregimeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/relatedentitytype.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/salesortransactionsenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/security.rb +2 -6
- data/lib/kintsugi_sdk/models/shared/security.rbi +1 -3
- data/lib/kintsugi_sdk/models/shared/sourceenum.rb +15 -0
- data/lib/kintsugi_sdk/models/shared/sourceenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/statusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/tax_amount_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/tax_amount_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/tax_amount_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/tax_amount_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/tax_rate_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/tax_rate_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/tax_rate_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/tax_rate_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/taxable_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/taxable_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/taxexemptionenum.rb +1 -0
- data/lib/kintsugi_sdk/models/shared/taxexemptionenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxitembuilder.rb +14 -14
- data/lib/kintsugi_sdk/models/shared/taxitembuilder.rbi +5 -5
- data/lib/kintsugi_sdk/models/shared/taxitembuilder_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/taxitembuilder_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/taxitembuilder_converted_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/taxitembuilder_converted_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/taxitemestimate.rb +10 -10
- data/lib/kintsugi_sdk/models/shared/taxitemestimate.rbi +5 -5
- data/lib/kintsugi_sdk/models/shared/taxitemread.rb +10 -10
- data/lib/kintsugi_sdk/models/shared/taxitemread.rbi +5 -5
- data/lib/kintsugi_sdk/models/shared/taxitemreturnreasonenum.rb +1 -0
- data/lib/kintsugi_sdk/models/shared/taxitemreturnreasonenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxitemtypeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxliabilitysourceenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxtypeenum.rb +26 -0
- data/lib/kintsugi_sdk/models/shared/taxtypeenum.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/total_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/total_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/total_amount_of_this_transaction_item_after_discounts_.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/total_amount_of_this_transaction_item_after_discounts_.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/total_tax_amount_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/total_tax_amount_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/total_tax_amount_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/total_tax_amount_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/total_tax_liability_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/total_tax_liability_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionaddressbuilder.rb +11 -7
- data/lib/kintsugi_sdk/models/shared/transactionaddressbuilder.rbi +5 -3
- data/lib/kintsugi_sdk/models/shared/transactionaddresspublic.rb +8 -4
- data/lib/kintsugi_sdk/models/shared/transactionaddresspublic.rbi +3 -1
- data/lib/kintsugi_sdk/models/shared/transactionaddressread_output.rb +11 -7
- data/lib/kintsugi_sdk/models/shared/transactionaddressread_output.rbi +5 -3
- data/lib/kintsugi_sdk/models/shared/transactioncreate.rb +84 -78
- data/lib/kintsugi_sdk/models/shared/transactioncreate.rbi +35 -29
- data/lib/kintsugi_sdk/models/shared/transactiondirectionenum.rb +19 -0
- data/lib/kintsugi_sdk/models/shared/transactiondirectionenum.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionestimatepublicrequest.rb +9 -7
- data/lib/kintsugi_sdk/models/shared/transactionestimatepublicrequest.rbi +3 -3
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse.rb +10 -8
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse.rbi +3 -3
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_addresses.rb +7 -3
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_addresses.rbi +3 -1
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_type.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionexemptstatusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionimportcustomer.rb +104 -0
- data/lib/kintsugi_sdk/models/shared/transactionimportcustomer.rbi +49 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rb +53 -53
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rbi +21 -21
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_subtotal.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_subtotal.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_tax_amount_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_tax_amount_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_tax_amount_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_tax_amount_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_taxable_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_taxable_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_total_discount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_converted_total_discount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_quantity.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_quantity.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_tax_amount_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_tax_amount_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_tax_amount_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_tax_amount_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_tax_rate_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_tax_rate_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_tax_rate_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_tax_rate_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_taxable_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder_taxable_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rb +53 -53
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rbi +21 -21
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_converted_subtotal.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_converted_subtotal.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_converted_taxable_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_converted_taxable_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_converted_total_discount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_converted_total_discount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_tax_rate_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_tax_rate_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_tax_rate_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_tax_rate_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_taxable_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate_taxable_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rb +17 -7
- data/lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rbi +5 -3
- data/lib/kintsugi_sdk/models/shared/transactionitemestimateresponse.rb +20 -10
- data/lib/kintsugi_sdk/models/shared/transactionitemestimateresponse.rbi +7 -5
- data/lib/kintsugi_sdk/models/shared/transactionitemread.rb +51 -43
- data/lib/kintsugi_sdk/models/shared/transactionitemread.rbi +23 -19
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rb +64 -62
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rbi +29 -25
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_tax_rate_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_tax_rate_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_tax_rate_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_tax_rate_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_taxable_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_taxable_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_total_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_total_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_total_tax_amount_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_total_tax_amount_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_total_tax_amount_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_total_tax_amount_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_total_tax_liability_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest_total_tax_liability_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionread.rb +89 -71
- data/lib/kintsugi_sdk/models/shared/transactionread.rbi +41 -29
- data/lib/kintsugi_sdk/models/shared/transactionrefundstatus.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionstatusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactiontypeenum.rb +1 -0
- data/lib/kintsugi_sdk/models/shared/transactiontypeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionupdate.rb +63 -61
- data/lib/kintsugi_sdk/models/shared/transactionupdate.rbi +29 -25
- data/lib/kintsugi_sdk/models/shared/transactionupdate_tax_rate_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_tax_rate_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_tax_rate_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_tax_rate_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_taxable_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_taxable_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_total_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_total_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_total_tax_amount_calculated.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_total_tax_amount_calculated.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_total_tax_amount_imported.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_total_tax_amount_imported.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_total_tax_liability_amount.rb +27 -0
- data/lib/kintsugi_sdk/models/shared/transactionupdate_total_tax_liability_amount.rbi +11 -0
- data/lib/kintsugi_sdk/models/shared/treatmentenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/type.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/validationaddress.rb +12 -12
- data/lib/kintsugi_sdk/models/shared/validationaddress.rbi +5 -5
- data/lib/kintsugi_sdk/models/shared/validationerror.rb +11 -3
- data/lib/kintsugi_sdk/models/shared/validationerror.rbi +5 -1
- data/lib/kintsugi_sdk/models/shared.rb +73 -5
- data/lib/kintsugi_sdk/nexus.rb +15 -10
- data/lib/kintsugi_sdk/openapisdk.rb +7 -6
- data/lib/kintsugi_sdk/products.rb +32 -22
- data/lib/kintsugi_sdk/sdkconfiguration.rb +10 -11
- data/lib/kintsugi_sdk/taxestimation.rb +17 -12
- data/lib/kintsugi_sdk/transactions.rb +125 -105
- data/lib/kintsugi_sdk/utils/retries.rb +43 -1
- data/lib/kintsugi_sdk/utils/security.rb +22 -11
- data/lib/kintsugi_sdk/utils/utils.rb +6 -2
- data/lib/kintsugi_sdk.rb +1 -1
- metadata +172 -18
- data/lib/kintsugi_sdk/models/errors/backend_src_products_responses_validationerrorresponse.rbi +0 -13
- data/lib/kintsugi_sdk/models/ops/search_v1_address_validation_search_post_security.rbi +0 -13
- data/lib/kintsugi_sdk/models/shared/file.rb +0 -36
- data/lib/kintsugi_sdk/models/shared/file.rbi +0 -15
- data/lib/kintsugi_sdk/models/shared/page_transactionestimateresponse_.rb +0 -48
- data/lib/kintsugi_sdk/models/shared/page_transactionestimateresponse_.rbi +0 -21
|
@@ -39,16 +39,18 @@ module KintsugiSDK
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
|
|
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) }
|
|
45
|
+
def list(request:, timeout_ms: nil, http_headers: nil)
|
|
46
|
+
# list - Get customers
|
|
45
47
|
# The Get Customers API retrieves
|
|
46
48
|
# a paginated list of customers based on specified filters.
|
|
47
49
|
# This API allows searching, filtering by country and state, and sorting the results.
|
|
48
50
|
url, params = @sdk_configuration.get_server_details
|
|
49
51
|
base_url = Utils.template_url(url, params)
|
|
50
52
|
url = "#{base_url}/v1/customers"
|
|
51
|
-
headers =
|
|
53
|
+
headers = Utils.get_headers(request)
|
|
52
54
|
headers = T.cast(headers, T::Hash[String, String])
|
|
53
55
|
query_params = Utils.get_query_params(Models::Ops::GetCustomersV1Request, request, nil)
|
|
54
56
|
headers['Accept'] = 'application/json'
|
|
@@ -58,7 +60,7 @@ module KintsugiSDK
|
|
|
58
60
|
|
|
59
61
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
60
62
|
timeout ||= @sdk_configuration.timeout
|
|
61
|
-
|
|
63
|
+
|
|
62
64
|
|
|
63
65
|
connection = @sdk_configuration.client
|
|
64
66
|
|
|
@@ -73,13 +75,16 @@ module KintsugiSDK
|
|
|
73
75
|
error = T.let(nil, T.nilable(StandardError))
|
|
74
76
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
|
|
77
79
|
begin
|
|
78
80
|
http_response = T.must(connection).get(url) do |req|
|
|
79
81
|
req.headers.merge!(headers)
|
|
80
82
|
req.options.timeout = timeout unless timeout.nil?
|
|
81
83
|
req.params = query_params
|
|
82
84
|
Utils.configure_request_security(req, security)
|
|
85
|
+
http_headers&.each do |key, value|
|
|
86
|
+
req.headers[key.to_s] = value
|
|
87
|
+
end
|
|
83
88
|
|
|
84
89
|
@sdk_configuration.hooks.before_request(
|
|
85
90
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -107,13 +112,13 @@ module KintsugiSDK
|
|
|
107
112
|
response: http_response
|
|
108
113
|
)
|
|
109
114
|
end
|
|
110
|
-
|
|
115
|
+
|
|
111
116
|
if http_response.nil?
|
|
112
117
|
raise error if !error.nil?
|
|
113
118
|
raise 'no response'
|
|
114
119
|
end
|
|
115
120
|
end
|
|
116
|
-
|
|
121
|
+
|
|
117
122
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
118
123
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
119
124
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -183,17 +188,17 @@ module KintsugiSDK
|
|
|
183
188
|
end
|
|
184
189
|
|
|
185
190
|
|
|
186
|
-
sig { params(request: Models::
|
|
187
|
-
def create(request:, timeout_ms: nil)
|
|
188
|
-
# create - Create
|
|
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
|
+
def create(request:, timeout_ms: nil, http_headers: nil)
|
|
193
|
+
# create - Create customer
|
|
189
194
|
# The Create Customer API enables the creation of a new customer record with essential
|
|
190
195
|
# details like name, contact information, and address, along with optional metadata.
|
|
191
196
|
url, params = @sdk_configuration.get_server_details
|
|
192
197
|
base_url = Utils.template_url(url, params)
|
|
193
198
|
url = "#{base_url}/v1/customers"
|
|
194
|
-
headers =
|
|
199
|
+
headers = Utils.get_headers(request)
|
|
195
200
|
headers = T.cast(headers, T::Hash[String, String])
|
|
196
|
-
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :
|
|
201
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :customer_create, :json)
|
|
197
202
|
headers['content-type'] = req_content_type
|
|
198
203
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
199
204
|
|
|
@@ -211,7 +216,7 @@ module KintsugiSDK
|
|
|
211
216
|
|
|
212
217
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
213
218
|
timeout ||= @sdk_configuration.timeout
|
|
214
|
-
|
|
219
|
+
|
|
215
220
|
|
|
216
221
|
connection = @sdk_configuration.client
|
|
217
222
|
|
|
@@ -226,13 +231,16 @@ module KintsugiSDK
|
|
|
226
231
|
error = T.let(nil, T.nilable(StandardError))
|
|
227
232
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
228
233
|
|
|
229
|
-
|
|
234
|
+
|
|
230
235
|
begin
|
|
231
236
|
http_response = T.must(connection).post(url) do |req|
|
|
232
237
|
req.body = body
|
|
233
238
|
req.headers.merge!(headers)
|
|
234
239
|
req.options.timeout = timeout unless timeout.nil?
|
|
235
240
|
Utils.configure_request_security(req, security)
|
|
241
|
+
http_headers&.each do |key, value|
|
|
242
|
+
req.headers[key.to_s] = value
|
|
243
|
+
end
|
|
236
244
|
|
|
237
245
|
@sdk_configuration.hooks.before_request(
|
|
238
246
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -260,13 +268,13 @@ module KintsugiSDK
|
|
|
260
268
|
response: http_response
|
|
261
269
|
)
|
|
262
270
|
end
|
|
263
|
-
|
|
271
|
+
|
|
264
272
|
if http_response.nil?
|
|
265
273
|
raise error if !error.nil?
|
|
266
274
|
raise 'no response'
|
|
267
275
|
end
|
|
268
276
|
end
|
|
269
|
-
|
|
277
|
+
|
|
270
278
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
271
279
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
272
280
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -336,21 +344,21 @@ module KintsugiSDK
|
|
|
336
344
|
end
|
|
337
345
|
|
|
338
346
|
|
|
339
|
-
sig { params(request: Models::Ops::
|
|
340
|
-
def
|
|
341
|
-
#
|
|
342
|
-
# The Get Customer By ID API retrieves the details of a single customer
|
|
343
|
-
#
|
|
344
|
-
#
|
|
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
|
+
def get_by_external_id(request:, timeout_ms: nil, http_headers: nil)
|
|
349
|
+
# get_by_external_id - Get customer by external id
|
|
350
|
+
# The Get Customer By External ID API retrieves the details of a single customer using
|
|
351
|
+
# their external identifier. This endpoint is useful for accessing customer data when only
|
|
352
|
+
# an external ID is available.
|
|
345
353
|
url, params = @sdk_configuration.get_server_details
|
|
346
354
|
base_url = Utils.template_url(url, params)
|
|
347
355
|
url = Utils.generate_url(
|
|
348
|
-
Models::Ops::
|
|
356
|
+
Models::Ops::GetCustomerByExternalIdV1CustomersExternalExternalIdGetRequest,
|
|
349
357
|
base_url,
|
|
350
|
-
'/v1/customers/{
|
|
358
|
+
'/v1/customers/external/{external_id}',
|
|
351
359
|
request
|
|
352
360
|
)
|
|
353
|
-
headers =
|
|
361
|
+
headers = Utils.get_headers(request)
|
|
354
362
|
headers = T.cast(headers, T::Hash[String, String])
|
|
355
363
|
headers['Accept'] = 'application/json'
|
|
356
364
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
@@ -359,7 +367,7 @@ module KintsugiSDK
|
|
|
359
367
|
|
|
360
368
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
361
369
|
timeout ||= @sdk_configuration.timeout
|
|
362
|
-
|
|
370
|
+
|
|
363
371
|
|
|
364
372
|
connection = @sdk_configuration.client
|
|
365
373
|
|
|
@@ -367,19 +375,22 @@ module KintsugiSDK
|
|
|
367
375
|
config: @sdk_configuration,
|
|
368
376
|
base_url: base_url,
|
|
369
377
|
oauth2_scopes: nil,
|
|
370
|
-
operation_id: '
|
|
378
|
+
operation_id: 'get_customer_by_external_id_v1_customers_external__external_id__get',
|
|
371
379
|
security_source: @sdk_configuration.security_source
|
|
372
380
|
)
|
|
373
381
|
|
|
374
382
|
error = T.let(nil, T.nilable(StandardError))
|
|
375
383
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
376
384
|
|
|
377
|
-
|
|
385
|
+
|
|
378
386
|
begin
|
|
379
387
|
http_response = T.must(connection).get(url) do |req|
|
|
380
388
|
req.headers.merge!(headers)
|
|
381
389
|
req.options.timeout = timeout unless timeout.nil?
|
|
382
390
|
Utils.configure_request_security(req, security)
|
|
391
|
+
http_headers&.each do |key, value|
|
|
392
|
+
req.headers[key.to_s] = value
|
|
393
|
+
end
|
|
383
394
|
|
|
384
395
|
@sdk_configuration.hooks.before_request(
|
|
385
396
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -407,13 +418,13 @@ module KintsugiSDK
|
|
|
407
418
|
response: http_response
|
|
408
419
|
)
|
|
409
420
|
end
|
|
410
|
-
|
|
421
|
+
|
|
411
422
|
if http_response.nil?
|
|
412
423
|
raise error if !error.nil?
|
|
413
424
|
raise 'no response'
|
|
414
425
|
end
|
|
415
426
|
end
|
|
416
|
-
|
|
427
|
+
|
|
417
428
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
418
429
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
419
430
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -455,33 +466,22 @@ module KintsugiSDK
|
|
|
455
466
|
end
|
|
456
467
|
|
|
457
468
|
|
|
458
|
-
sig { params(request: Models::Ops::
|
|
459
|
-
def
|
|
460
|
-
#
|
|
461
|
-
# The
|
|
462
|
-
#
|
|
463
|
-
#
|
|
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
|
+
def get(request:, timeout_ms: nil, http_headers: nil)
|
|
471
|
+
# get - Get customer by id
|
|
472
|
+
# The Get Customer By ID API retrieves the details of a single customer
|
|
473
|
+
# using their unique identifier. It returns customer-specific data,
|
|
474
|
+
# including contact information, address, name and metadata, etc.
|
|
464
475
|
url, params = @sdk_configuration.get_server_details
|
|
465
476
|
base_url = Utils.template_url(url, params)
|
|
466
477
|
url = Utils.generate_url(
|
|
467
|
-
Models::Ops::
|
|
478
|
+
Models::Ops::GetCustomerByIdV1CustomersCustomerIdGetRequest,
|
|
468
479
|
base_url,
|
|
469
480
|
'/v1/customers/{customer_id}',
|
|
470
481
|
request
|
|
471
482
|
)
|
|
472
|
-
headers =
|
|
483
|
+
headers = Utils.get_headers(request)
|
|
473
484
|
headers = T.cast(headers, T::Hash[String, String])
|
|
474
|
-
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :customer_update, :json)
|
|
475
|
-
headers['content-type'] = req_content_type
|
|
476
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
477
|
-
|
|
478
|
-
if form && !form.empty?
|
|
479
|
-
body = Utils.encode_form(form)
|
|
480
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
481
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
482
|
-
else
|
|
483
|
-
body = data
|
|
484
|
-
end
|
|
485
485
|
headers['Accept'] = 'application/json'
|
|
486
486
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
487
487
|
|
|
@@ -489,7 +489,7 @@ module KintsugiSDK
|
|
|
489
489
|
|
|
490
490
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
491
491
|
timeout ||= @sdk_configuration.timeout
|
|
492
|
-
|
|
492
|
+
|
|
493
493
|
|
|
494
494
|
connection = @sdk_configuration.client
|
|
495
495
|
|
|
@@ -497,20 +497,22 @@ module KintsugiSDK
|
|
|
497
497
|
config: @sdk_configuration,
|
|
498
498
|
base_url: base_url,
|
|
499
499
|
oauth2_scopes: nil,
|
|
500
|
-
operation_id: '
|
|
500
|
+
operation_id: 'get_customer_by_id_v1_customers__customer_id__get',
|
|
501
501
|
security_source: @sdk_configuration.security_source
|
|
502
502
|
)
|
|
503
503
|
|
|
504
504
|
error = T.let(nil, T.nilable(StandardError))
|
|
505
505
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
506
506
|
|
|
507
|
-
|
|
507
|
+
|
|
508
508
|
begin
|
|
509
|
-
http_response = T.must(connection).
|
|
510
|
-
req.body = body
|
|
509
|
+
http_response = T.must(connection).get(url) do |req|
|
|
511
510
|
req.headers.merge!(headers)
|
|
512
511
|
req.options.timeout = timeout unless timeout.nil?
|
|
513
512
|
Utils.configure_request_security(req, security)
|
|
513
|
+
http_headers&.each do |key, value|
|
|
514
|
+
req.headers[key.to_s] = value
|
|
515
|
+
end
|
|
514
516
|
|
|
515
517
|
@sdk_configuration.hooks.before_request(
|
|
516
518
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -538,13 +540,13 @@ module KintsugiSDK
|
|
|
538
540
|
response: http_response
|
|
539
541
|
)
|
|
540
542
|
end
|
|
541
|
-
|
|
543
|
+
|
|
542
544
|
if http_response.nil?
|
|
543
545
|
raise error if !error.nil?
|
|
544
546
|
raise 'no response'
|
|
545
547
|
end
|
|
546
548
|
end
|
|
547
|
-
|
|
549
|
+
|
|
548
550
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
549
551
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
550
552
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -561,20 +563,6 @@ module KintsugiSDK
|
|
|
561
563
|
else
|
|
562
564
|
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'
|
|
563
565
|
end
|
|
564
|
-
elsif Utils.match_status_code(http_response.status, ['401', '404'])
|
|
565
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
566
|
-
@sdk_configuration.hooks.after_success(
|
|
567
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
568
|
-
hook_ctx: hook_ctx
|
|
569
|
-
),
|
|
570
|
-
response: http_response
|
|
571
|
-
)
|
|
572
|
-
response_data = http_response.env.response_body
|
|
573
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
574
|
-
raise obj
|
|
575
|
-
else
|
|
576
|
-
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'
|
|
577
|
-
end
|
|
578
566
|
elsif Utils.match_status_code(http_response.status, ['422'])
|
|
579
567
|
if Utils.match_content_type(content_type, 'application/json')
|
|
580
568
|
@sdk_configuration.hooks.after_success(
|
|
@@ -584,26 +572,12 @@ module KintsugiSDK
|
|
|
584
572
|
response: http_response
|
|
585
573
|
)
|
|
586
574
|
response_data = http_response.env.response_body
|
|
587
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::
|
|
588
|
-
raise obj
|
|
589
|
-
else
|
|
590
|
-
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'
|
|
591
|
-
end
|
|
592
|
-
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
593
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
594
|
-
@sdk_configuration.hooks.after_success(
|
|
595
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
596
|
-
hook_ctx: hook_ctx
|
|
597
|
-
),
|
|
598
|
-
response: http_response
|
|
599
|
-
)
|
|
600
|
-
response_data = http_response.env.response_body
|
|
601
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
575
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::HTTPValidationError)
|
|
602
576
|
raise obj
|
|
603
577
|
else
|
|
604
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'
|
|
605
579
|
end
|
|
606
|
-
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
580
|
+
elsif Utils.match_status_code(http_response.status, ['404', '4XX'])
|
|
607
581
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
608
582
|
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
609
583
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
@@ -614,22 +588,33 @@ module KintsugiSDK
|
|
|
614
588
|
end
|
|
615
589
|
|
|
616
590
|
|
|
617
|
-
sig { params(request: Models::Ops::
|
|
618
|
-
def
|
|
619
|
-
#
|
|
620
|
-
# The
|
|
621
|
-
# their
|
|
622
|
-
#
|
|
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
|
+
def update(request:, timeout_ms: nil, http_headers: nil)
|
|
593
|
+
# update - Update customer
|
|
594
|
+
# The Update Customer API allows you to modify an existing customer's
|
|
595
|
+
# information using their unique identifier,
|
|
596
|
+
# enabling updates to their details as needed.
|
|
623
597
|
url, params = @sdk_configuration.get_server_details
|
|
624
598
|
base_url = Utils.template_url(url, params)
|
|
625
599
|
url = Utils.generate_url(
|
|
626
|
-
Models::Ops::
|
|
600
|
+
Models::Ops::UpdateCustomerV1CustomersCustomerIdPutRequest,
|
|
627
601
|
base_url,
|
|
628
|
-
'/v1/customers/
|
|
602
|
+
'/v1/customers/{customer_id}',
|
|
629
603
|
request
|
|
630
604
|
)
|
|
631
|
-
headers =
|
|
605
|
+
headers = Utils.get_headers(request)
|
|
632
606
|
headers = T.cast(headers, T::Hash[String, String])
|
|
607
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :customer_update, :json)
|
|
608
|
+
headers['content-type'] = req_content_type
|
|
609
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
610
|
+
|
|
611
|
+
if form && !form.empty?
|
|
612
|
+
body = Utils.encode_form(form)
|
|
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]))
|
|
615
|
+
else
|
|
616
|
+
body = data
|
|
617
|
+
end
|
|
633
618
|
headers['Accept'] = 'application/json'
|
|
634
619
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
635
620
|
|
|
@@ -637,7 +622,7 @@ module KintsugiSDK
|
|
|
637
622
|
|
|
638
623
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
639
624
|
timeout ||= @sdk_configuration.timeout
|
|
640
|
-
|
|
625
|
+
|
|
641
626
|
|
|
642
627
|
connection = @sdk_configuration.client
|
|
643
628
|
|
|
@@ -645,19 +630,23 @@ module KintsugiSDK
|
|
|
645
630
|
config: @sdk_configuration,
|
|
646
631
|
base_url: base_url,
|
|
647
632
|
oauth2_scopes: nil,
|
|
648
|
-
operation_id: '
|
|
633
|
+
operation_id: 'update_customer_v1_customers__customer_id__put',
|
|
649
634
|
security_source: @sdk_configuration.security_source
|
|
650
635
|
)
|
|
651
636
|
|
|
652
637
|
error = T.let(nil, T.nilable(StandardError))
|
|
653
638
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
654
639
|
|
|
655
|
-
|
|
640
|
+
|
|
656
641
|
begin
|
|
657
|
-
http_response = T.must(connection).
|
|
642
|
+
http_response = T.must(connection).put(url) do |req|
|
|
643
|
+
req.body = body
|
|
658
644
|
req.headers.merge!(headers)
|
|
659
645
|
req.options.timeout = timeout unless timeout.nil?
|
|
660
646
|
Utils.configure_request_security(req, security)
|
|
647
|
+
http_headers&.each do |key, value|
|
|
648
|
+
req.headers[key.to_s] = value
|
|
649
|
+
end
|
|
661
650
|
|
|
662
651
|
@sdk_configuration.hooks.before_request(
|
|
663
652
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -685,13 +674,13 @@ module KintsugiSDK
|
|
|
685
674
|
response: http_response
|
|
686
675
|
)
|
|
687
676
|
end
|
|
688
|
-
|
|
677
|
+
|
|
689
678
|
if http_response.nil?
|
|
690
679
|
raise error if !error.nil?
|
|
691
680
|
raise 'no response'
|
|
692
681
|
end
|
|
693
682
|
end
|
|
694
|
-
|
|
683
|
+
|
|
695
684
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
696
685
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
697
686
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -708,6 +697,20 @@ module KintsugiSDK
|
|
|
708
697
|
else
|
|
709
698
|
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'
|
|
710
699
|
end
|
|
700
|
+
elsif Utils.match_status_code(http_response.status, ['401', '404'])
|
|
701
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
702
|
+
@sdk_configuration.hooks.after_success(
|
|
703
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
704
|
+
hook_ctx: hook_ctx
|
|
705
|
+
),
|
|
706
|
+
response: http_response
|
|
707
|
+
)
|
|
708
|
+
response_data = http_response.env.response_body
|
|
709
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
710
|
+
raise obj
|
|
711
|
+
else
|
|
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'
|
|
713
|
+
end
|
|
711
714
|
elsif Utils.match_status_code(http_response.status, ['422'])
|
|
712
715
|
if Utils.match_content_type(content_type, 'application/json')
|
|
713
716
|
@sdk_configuration.hooks.after_success(
|
|
@@ -717,12 +720,26 @@ module KintsugiSDK
|
|
|
717
720
|
response: http_response
|
|
718
721
|
)
|
|
719
722
|
response_data = http_response.env.response_body
|
|
720
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::
|
|
723
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcCustomersResponsesValidationErrorResponse)
|
|
721
724
|
raise obj
|
|
722
725
|
else
|
|
723
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'
|
|
724
727
|
end
|
|
725
|
-
elsif Utils.match_status_code(http_response.status, ['
|
|
728
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
729
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
730
|
+
@sdk_configuration.hooks.after_success(
|
|
731
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
732
|
+
hook_ctx: hook_ctx
|
|
733
|
+
),
|
|
734
|
+
response: http_response
|
|
735
|
+
)
|
|
736
|
+
response_data = http_response.env.response_body
|
|
737
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
|
|
738
|
+
raise obj
|
|
739
|
+
else
|
|
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'
|
|
741
|
+
end
|
|
742
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
726
743
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
727
744
|
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
728
745
|
raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
@@ -733,10 +750,10 @@ module KintsugiSDK
|
|
|
733
750
|
end
|
|
734
751
|
|
|
735
752
|
|
|
736
|
-
sig { params(request: Models::Ops::GetTransactionsByCustomerRequest, timeout_ms: T.nilable(Integer)).returns(T::Array[Models::Shared::TransactionRead]) }
|
|
737
|
-
def get_transactions(request:, timeout_ms: nil)
|
|
738
|
-
# get_transactions - Get
|
|
739
|
-
# Get a list of transactions for a customer by their unique ID.
|
|
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
|
+
def get_transactions(request:, timeout_ms: nil, http_headers: nil)
|
|
755
|
+
# get_transactions - Get transactions by customer id
|
|
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).
|
|
740
757
|
url, params = @sdk_configuration.get_server_details
|
|
741
758
|
base_url = Utils.template_url(url, params)
|
|
742
759
|
url = Utils.generate_url(
|
|
@@ -745,8 +762,9 @@ module KintsugiSDK
|
|
|
745
762
|
'/v1/customers/{customer_id}/transactions',
|
|
746
763
|
request
|
|
747
764
|
)
|
|
748
|
-
headers =
|
|
765
|
+
headers = Utils.get_headers(request)
|
|
749
766
|
headers = T.cast(headers, T::Hash[String, String])
|
|
767
|
+
query_params = Utils.get_query_params(Models::Ops::GetTransactionsByCustomerRequest, request, nil)
|
|
750
768
|
headers['Accept'] = 'application/json'
|
|
751
769
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
752
770
|
|
|
@@ -754,7 +772,7 @@ module KintsugiSDK
|
|
|
754
772
|
|
|
755
773
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
756
774
|
timeout ||= @sdk_configuration.timeout
|
|
757
|
-
|
|
775
|
+
|
|
758
776
|
|
|
759
777
|
connection = @sdk_configuration.client
|
|
760
778
|
|
|
@@ -769,12 +787,16 @@ module KintsugiSDK
|
|
|
769
787
|
error = T.let(nil, T.nilable(StandardError))
|
|
770
788
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
771
789
|
|
|
772
|
-
|
|
790
|
+
|
|
773
791
|
begin
|
|
774
792
|
http_response = T.must(connection).get(url) do |req|
|
|
775
793
|
req.headers.merge!(headers)
|
|
776
794
|
req.options.timeout = timeout unless timeout.nil?
|
|
795
|
+
req.params = query_params
|
|
777
796
|
Utils.configure_request_security(req, security)
|
|
797
|
+
http_headers&.each do |key, value|
|
|
798
|
+
req.headers[key.to_s] = value
|
|
799
|
+
end
|
|
778
800
|
|
|
779
801
|
@sdk_configuration.hooks.before_request(
|
|
780
802
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -802,13 +824,13 @@ module KintsugiSDK
|
|
|
802
824
|
response: http_response
|
|
803
825
|
)
|
|
804
826
|
end
|
|
805
|
-
|
|
827
|
+
|
|
806
828
|
if http_response.nil?
|
|
807
829
|
raise error if !error.nil?
|
|
808
830
|
raise 'no response'
|
|
809
831
|
end
|
|
810
832
|
end
|
|
811
|
-
|
|
833
|
+
|
|
812
834
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
813
835
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
814
836
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -819,7 +841,7 @@ module KintsugiSDK
|
|
|
819
841
|
response: http_response
|
|
820
842
|
)
|
|
821
843
|
response_data = http_response.env.response_body
|
|
822
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Array.new(Models::Shared::TransactionRead))
|
|
844
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Union.new(Crystalline::Array.new(Models::Shared::TransactionRead), Models::Shared::PageTransactionRead))
|
|
823
845
|
|
|
824
846
|
return obj
|
|
825
847
|
else
|
|
@@ -850,9 +872,9 @@ module KintsugiSDK
|
|
|
850
872
|
end
|
|
851
873
|
|
|
852
874
|
|
|
853
|
-
sig { params(request: Models::Ops::CreateTransactionByCustomerRequest, timeout_ms: T.nilable(Integer)).returns(Models::Shared::TransactionRead) }
|
|
854
|
-
def create_transaction(request:, timeout_ms: nil)
|
|
855
|
-
# create_transaction - Create
|
|
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
|
+
def create_transaction(request:, timeout_ms: nil, http_headers: nil)
|
|
877
|
+
# create_transaction - Create transaction by customer id
|
|
856
878
|
# Create a new transaction for a specific customer.
|
|
857
879
|
url, params = @sdk_configuration.get_server_details
|
|
858
880
|
base_url = Utils.template_url(url, params)
|
|
@@ -862,7 +884,7 @@ module KintsugiSDK
|
|
|
862
884
|
'/v1/customers/{customer_id}/transactions',
|
|
863
885
|
request
|
|
864
886
|
)
|
|
865
|
-
headers =
|
|
887
|
+
headers = Utils.get_headers(request)
|
|
866
888
|
headers = T.cast(headers, T::Hash[String, String])
|
|
867
889
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :transaction_create, :json)
|
|
868
890
|
headers['content-type'] = req_content_type
|
|
@@ -882,7 +904,7 @@ module KintsugiSDK
|
|
|
882
904
|
|
|
883
905
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
884
906
|
timeout ||= @sdk_configuration.timeout
|
|
885
|
-
|
|
907
|
+
|
|
886
908
|
|
|
887
909
|
connection = @sdk_configuration.client
|
|
888
910
|
|
|
@@ -897,13 +919,16 @@ module KintsugiSDK
|
|
|
897
919
|
error = T.let(nil, T.nilable(StandardError))
|
|
898
920
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
899
921
|
|
|
900
|
-
|
|
922
|
+
|
|
901
923
|
begin
|
|
902
924
|
http_response = T.must(connection).post(url) do |req|
|
|
903
925
|
req.body = body
|
|
904
926
|
req.headers.merge!(headers)
|
|
905
927
|
req.options.timeout = timeout unless timeout.nil?
|
|
906
928
|
Utils.configure_request_security(req, security)
|
|
929
|
+
http_headers&.each do |key, value|
|
|
930
|
+
req.headers[key.to_s] = value
|
|
931
|
+
end
|
|
907
932
|
|
|
908
933
|
@sdk_configuration.hooks.before_request(
|
|
909
934
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -931,13 +956,13 @@ module KintsugiSDK
|
|
|
931
956
|
response: http_response
|
|
932
957
|
)
|
|
933
958
|
end
|
|
934
|
-
|
|
959
|
+
|
|
935
960
|
if http_response.nil?
|
|
936
961
|
raise error if !error.nil?
|
|
937
962
|
raise 'no response'
|
|
938
963
|
end
|
|
939
964
|
end
|
|
940
|
-
|
|
965
|
+
|
|
941
966
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
942
967
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
943
968
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -977,5 +1002,5 @@ module KintsugiSDK
|
|
|
977
1002
|
|
|
978
1003
|
end
|
|
979
1004
|
end
|
|
980
|
-
|
|
1005
|
+
end
|
|
981
1006
|
end
|