kintsugi_sdk 5.5.14 → 5.6.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/crystalline/enum.rbi +17 -0
- data/lib/crystalline/metadata_fields.rb +94 -38
- data/lib/crystalline/module.rb +103 -13
- data/lib/crystalline/types.rb +111 -19
- data/lib/crystalline/utils.rb +13 -0
- data/lib/kintsugi_sdk/addressvalidation.rb +24 -16
- data/lib/kintsugi_sdk/customers.rb +76 -53
- data/lib/kintsugi_sdk/exemptions.rb +55 -38
- data/lib/kintsugi_sdk/models/errors/apierror.rbi +2 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_address_validation_responses_validationerrorresponse.rb +0 -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.rb +0 -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.rb +0 -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 +0 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_products_responses_validationerrorresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_tax_estimation_responses_validationerrorresponse.rb +0 -1
- 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.rb +0 -1
- data/lib/kintsugi_sdk/models/errors/backend_src_transactions_responses_validationerrorresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/errors/errorresponse.rb +0 -1
- data/lib/kintsugi_sdk/models/errors/errorresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/errors/httpvalidationerror.rb +0 -1
- data/lib/kintsugi_sdk/models/errors/httpvalidationerror.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/createtransactionbycustomer_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/createtransactionbycustomer_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/estimate_tax_v1_tax_estimate_post_request.rb +2 -3
- data/lib/kintsugi_sdk/models/ops/estimate_tax_v1_tax_estimate_post_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/get_customer_by_external_id_v1_customers_external_external_id_get_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/get_customer_by_external_id_v1_customers_external_external_id_get_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/get_customer_by_id_v1_customers_customer_id_get_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/get_customer_by_id_v1_customers_customer_id_get_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/get_customers_v1_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/get_customers_v1_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/get_exemption_by_id_v1_exemptions_exemption_id_get_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/get_exemption_by_id_v1_exemptions_exemption_id_get_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/get_exemptions_v1_exemptions_get_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/get_exemptions_v1_exemptions_get_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/get_nexus_for_org_v1_nexus_get_request.rb +6 -3
- data/lib/kintsugi_sdk/models/ops/get_nexus_for_org_v1_nexus_get_request.rbi +3 -1
- data/lib/kintsugi_sdk/models/ops/get_product_by_id_v1_products_product_id_get_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/get_product_by_id_v1_products_product_id_get_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/get_transaction_by_id_v1_transactions_transaction_id_get_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/get_transaction_by_id_v1_transactions_transaction_id_get_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/get_transactions_v1_transactions_get_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/get_transactions_v1_transactions_get_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/getexemptionattachments_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/getexemptionattachments_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/gettransactionbyexternalid_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/gettransactionbyexternalid_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/gettransactionsbycustomer_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/gettransactionsbycustomer_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/gettransactionsbyfiling_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/gettransactionsbyfiling_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/search_v1_address_validation_search_post_security.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/search_v1_address_validation_search_post_security.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/update_customer_v1_customers_customer_id_put_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/update_customer_v1_customers_customer_id_put_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/update_product_v1_products_product_id_put_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/update_product_v1_products_product_id_put_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/update_transaction_v1_transactions_transaction_id_put_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/update_transaction_v1_transactions_transaction_id_put_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops/uploadexemptioncert_request.rb +0 -1
- data/lib/kintsugi_sdk/models/ops/uploadexemptioncert_request.rbi +1 -1
- data/lib/kintsugi_sdk/models/ops.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/addressbase.rb +1 -2
- data/lib/kintsugi_sdk/models/shared/addressbase.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addresses.rb +3 -4
- data/lib/kintsugi_sdk/models/shared/addresses.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addressresponsedata.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/addressresponsedata.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addresssearchresponse.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/addresssearchresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addressstatus.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/addressstatus.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addresssubmittedresponse.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/addresssubmittedresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/addresstype.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/addresstype.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/appliedto.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/appliedto.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/attachmentread.rb +1 -2
- data/lib/kintsugi_sdk/models/shared/attachmentread.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_address_validation_responses_validationerroritem.rb +0 -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.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_customers_responses_validationerroritem.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_models_exemptionread.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_models_exemptionread.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_responses_validationerroritem.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_responses_validationerroritem.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_products_responses_validationerroritem.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_products_responses_validationerroritem.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/backend_src_tax_estimation_responses_validationerroritem.rb +0 -1
- 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.rb +0 -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 +0 -1
- 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/countrycodeenum.rb +1 -3
- data/lib/kintsugi_sdk/models/shared/countrycodeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/currencyenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/currencyenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customerbase.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/customerbase.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customerbasebase.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/customerbasebase.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customerbasepublic.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/customerbasepublic.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customercreate.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/customercreate.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customerread.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/customerread.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customertaxregistrationread.rb +2 -3
- data/lib/kintsugi_sdk/models/shared/customertaxregistrationread.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customertaxtypeenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/customertaxtypeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/customerupdate.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/customerupdate.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/discountbuilder.rb +2 -3
- data/lib/kintsugi_sdk/models/shared/discountbuilder.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/exemption.rb +5 -6
- data/lib/kintsugi_sdk/models/shared/exemption.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/exemptioncreate.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/exemptioncreate.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/exemptionrequired.rb +6 -5
- data/lib/kintsugi_sdk/models/shared/exemptionrequired.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/exemptionstatus.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/exemptionstatus.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/exemptiontype.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/exemptiontype.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/fastapi_pagination_default_page_exemptionread_2.rb +3 -4
- data/lib/kintsugi_sdk/models/shared/fastapi_pagination_default_page_exemptionread_2.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/file.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/file.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/findthresholdcrossingtransactionstate.rb +56 -0
- data/lib/kintsugi_sdk/models/shared/findthresholdcrossingtransactionstate.rbi +25 -0
- data/lib/kintsugi_sdk/models/shared/jurisdictiontype.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/jurisdictiontype.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/nexusresponse.rb +41 -22
- data/lib/kintsugi_sdk/models/shared/nexusresponse.rbi +11 -1
- data/lib/kintsugi_sdk/models/shared/nexusstateenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/nexusstateenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/nexusstatusenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/nexusstatusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/nexustypeenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/nexustypeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/page_customerread_.rb +3 -4
- data/lib/kintsugi_sdk/models/shared/page_customerread_.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/page_nexusresponse_.rb +3 -4
- data/lib/kintsugi_sdk/models/shared/page_nexusresponse_.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/page_transactionestimateresponse_.rb +3 -4
- data/lib/kintsugi_sdk/models/shared/page_transactionestimateresponse_.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/page_transactionread_.rb +3 -4
- data/lib/kintsugi_sdk/models/shared/page_transactionread_.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/periodmodelenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/periodmodelenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/processingstatusenum.rb +1 -3
- data/lib/kintsugi_sdk/models/shared/processingstatusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/productread.rb +12 -9
- data/lib/kintsugi_sdk/models/shared/productread.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/productstatusenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/productstatusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/productupdate.rb +10 -7
- data/lib/kintsugi_sdk/models/shared/productupdate.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/registration.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/registration.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/registrationsregimeenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/registrationsregimeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/relatedentitytype.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/relatedentitytype.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/salesortransactionsenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/salesortransactionsenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/security.rb +2 -3
- data/lib/kintsugi_sdk/models/shared/security.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/sourceenum.rb +6 -3
- data/lib/kintsugi_sdk/models/shared/sourceenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/statusenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/statusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxexemptionenum.rb +1 -3
- data/lib/kintsugi_sdk/models/shared/taxexemptionenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxitembuilder.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/taxitembuilder.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxitemestimate.rb +1 -2
- data/lib/kintsugi_sdk/models/shared/taxitemestimate.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxitemread.rb +4 -5
- data/lib/kintsugi_sdk/models/shared/taxitemread.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxitemreturnreasonenum.rb +2 -3
- data/lib/kintsugi_sdk/models/shared/taxitemreturnreasonenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxitemtypeenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/taxitemtypeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/taxliabilitysourceenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/taxliabilitysourceenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionaddressbuilder.rb +3 -4
- data/lib/kintsugi_sdk/models/shared/transactionaddressbuilder.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionaddresspublic.rb +2 -3
- data/lib/kintsugi_sdk/models/shared/transactionaddresspublic.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionaddressread_output.rb +3 -4
- data/lib/kintsugi_sdk/models/shared/transactionaddressread_output.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactioncreate.rb +23 -19
- data/lib/kintsugi_sdk/models/shared/transactioncreate.rbi +3 -3
- data/lib/kintsugi_sdk/models/shared/transactionestimatepublicrequest.rb +6 -11
- data/lib/kintsugi_sdk/models/shared/transactionestimatepublicrequest.rbi +1 -3
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse.rb +7 -12
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse.rbi +1 -3
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_addresses.rb +3 -4
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_addresses.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_type.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_type.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionexemptstatusenum.rb +2 -3
- data/lib/kintsugi_sdk/models/shared/transactionexemptstatusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rb +8 -7
- data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rb +8 -7
- data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rb +2 -3
- data/lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionitemestimateresponse.rb +3 -4
- data/lib/kintsugi_sdk/models/shared/transactionitemestimateresponse.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionitemread.rb +7 -6
- data/lib/kintsugi_sdk/models/shared/transactionitemread.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rb +21 -17
- data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rbi +3 -3
- data/lib/kintsugi_sdk/models/shared/transactionread.rb +24 -20
- data/lib/kintsugi_sdk/models/shared/transactionread.rbi +3 -3
- data/lib/kintsugi_sdk/models/shared/transactionrefundstatus.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/transactionrefundstatus.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionstatusenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/transactionstatusenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactiontypeenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/transactiontypeenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/transactionupdate.rb +20 -16
- data/lib/kintsugi_sdk/models/shared/transactionupdate.rbi +3 -3
- data/lib/kintsugi_sdk/models/shared/treatmentenum.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/treatmentenum.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/type.rb +0 -3
- data/lib/kintsugi_sdk/models/shared/type.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/validationaddress.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/validationaddress.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared/validationerror.rb +0 -1
- data/lib/kintsugi_sdk/models/shared/validationerror.rbi +1 -1
- data/lib/kintsugi_sdk/models/shared.rb +1 -7
- data/lib/kintsugi_sdk/nexus.rb +13 -8
- data/lib/kintsugi_sdk/openapisdk.rb +15 -16
- data/lib/kintsugi_sdk/products.rb +25 -425
- data/lib/kintsugi_sdk/sdk_hooks/hooks.rb +0 -1
- data/lib/kintsugi_sdk/sdkconfiguration.rb +7 -13
- data/lib/kintsugi_sdk/taxestimation.rb +15 -10
- data/lib/kintsugi_sdk/transactions.rb +65 -45
- data/lib/kintsugi_sdk/utils/forms.rb +1 -1
- data/lib/kintsugi_sdk/utils/query_params.rb +4 -2
- data/lib/kintsugi_sdk/utils/request_bodies.rb +11 -6
- data/lib/kintsugi_sdk/utils/retries.rb +4 -1
- data/lib/kintsugi_sdk/utils/security.rb +32 -11
- data/lib/kintsugi_sdk/utils/url.rb +11 -5
- data/lib/kintsugi_sdk/utils/utils.rb +45 -3
- metadata +73 -41
- data/lib/kintsugi_sdk/models/ops/get_products_v1_products_get_request.rb +0 -61
- data/lib/kintsugi_sdk/models/ops/get_products_v1_products_get_request.rbi +0 -27
- data/lib/kintsugi_sdk/models/shared/page_productread_.rb +0 -49
- data/lib/kintsugi_sdk/models/shared/page_productread_.rbi +0 -21
- data/lib/kintsugi_sdk/models/shared/productcategories.rb +0 -38
- data/lib/kintsugi_sdk/models/shared/productcategories.rbi +0 -15
- data/lib/kintsugi_sdk/models/shared/productcategoryenum.rb +0 -25
- data/lib/kintsugi_sdk/models/shared/productcategoryenum.rbi +0 -11
- data/lib/kintsugi_sdk/models/shared/productcodeenum.rb +0 -82
- data/lib/kintsugi_sdk/models/shared/productcodeenum.rbi +0 -11
- data/lib/kintsugi_sdk/models/shared/productcreatemanual.rb +0 -61
- data/lib/kintsugi_sdk/models/shared/productcreatemanual.rbi +0 -27
- data/lib/kintsugi_sdk/models/shared/productsubcategory.rb +0 -46
- data/lib/kintsugi_sdk/models/shared/productsubcategory.rbi +0 -19
- data/lib/kintsugi_sdk/models/shared/productsubcategoryenum.rb +0 -83
- data/lib/kintsugi_sdk/models/shared/productsubcategoryenum.rbi +0 -11
|
@@ -39,8 +39,10 @@ module KintsugiSDK
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
sig { params(request: Models::Ops::EstimateTaxV1TaxEstimatePostRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::PageTransactionEstimateResponse) }
|
|
45
|
+
def estimate_tax(request:, timeout_ms: nil, http_headers: nil)
|
|
44
46
|
# estimate_tax - Estimate Tax
|
|
45
47
|
# The Estimate Tax API calculates the estimated tax for a specific
|
|
46
48
|
# transaction based on the provided details, including organization nexus,
|
|
@@ -54,7 +56,7 @@ module KintsugiSDK
|
|
|
54
56
|
headers['content-type'] = req_content_type
|
|
55
57
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
56
58
|
|
|
57
|
-
if form
|
|
59
|
+
if form && !form.empty?
|
|
58
60
|
body = Utils.encode_form(form)
|
|
59
61
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
60
62
|
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
@@ -69,14 +71,14 @@ module KintsugiSDK
|
|
|
69
71
|
|
|
70
72
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
71
73
|
timeout ||= @sdk_configuration.timeout
|
|
72
|
-
|
|
74
|
+
|
|
73
75
|
|
|
74
76
|
connection = @sdk_configuration.client
|
|
75
77
|
|
|
76
78
|
hook_ctx = SDKHooks::HookContext.new(
|
|
77
79
|
config: @sdk_configuration,
|
|
78
80
|
base_url: base_url,
|
|
79
|
-
oauth2_scopes:
|
|
81
|
+
oauth2_scopes: nil,
|
|
80
82
|
operation_id: 'estimate_tax_v1_tax_estimate_post',
|
|
81
83
|
security_source: @sdk_configuration.security_source
|
|
82
84
|
)
|
|
@@ -84,7 +86,7 @@ module KintsugiSDK
|
|
|
84
86
|
error = T.let(nil, T.nilable(StandardError))
|
|
85
87
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
86
88
|
|
|
87
|
-
|
|
89
|
+
|
|
88
90
|
begin
|
|
89
91
|
http_response = T.must(connection).post(url) do |req|
|
|
90
92
|
req.body = body
|
|
@@ -92,6 +94,9 @@ module KintsugiSDK
|
|
|
92
94
|
req.options.timeout = timeout unless timeout.nil?
|
|
93
95
|
req.params = query_params
|
|
94
96
|
Utils.configure_request_security(req, security)
|
|
97
|
+
http_headers&.each do |key, value|
|
|
98
|
+
req.headers[key.to_s] = value
|
|
99
|
+
end
|
|
95
100
|
|
|
96
101
|
@sdk_configuration.hooks.before_request(
|
|
97
102
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -119,13 +124,13 @@ module KintsugiSDK
|
|
|
119
124
|
response: http_response
|
|
120
125
|
)
|
|
121
126
|
end
|
|
122
|
-
|
|
127
|
+
|
|
123
128
|
if http_response.nil?
|
|
124
129
|
raise error if !error.nil?
|
|
125
130
|
raise 'no response'
|
|
126
131
|
end
|
|
127
132
|
end
|
|
128
|
-
|
|
133
|
+
|
|
129
134
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
130
135
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
131
136
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -136,7 +141,7 @@ module KintsugiSDK
|
|
|
136
141
|
response: http_response
|
|
137
142
|
)
|
|
138
143
|
response_data = http_response.env.response_body
|
|
139
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::
|
|
144
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::PageTransactionEstimateResponse)
|
|
140
145
|
|
|
141
146
|
return obj
|
|
142
147
|
else
|
|
@@ -193,5 +198,5 @@ module KintsugiSDK
|
|
|
193
198
|
|
|
194
199
|
end
|
|
195
200
|
end
|
|
196
|
-
|
|
201
|
+
end
|
|
197
202
|
end
|
|
@@ -39,8 +39,10 @@ module KintsugiSDK
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
sig { params(request: Models::Ops::GetTransactionsV1TransactionsGetRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::PageTransactionRead) }
|
|
45
|
+
def list(request:, timeout_ms: nil, http_headers: nil)
|
|
44
46
|
# list - Get Transactions
|
|
45
47
|
# The Get Transactions API retrieves a list of transactions with
|
|
46
48
|
# optional filtering, sorting, and pagination.
|
|
@@ -57,14 +59,14 @@ module KintsugiSDK
|
|
|
57
59
|
|
|
58
60
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
59
61
|
timeout ||= @sdk_configuration.timeout
|
|
60
|
-
|
|
62
|
+
|
|
61
63
|
|
|
62
64
|
connection = @sdk_configuration.client
|
|
63
65
|
|
|
64
66
|
hook_ctx = SDKHooks::HookContext.new(
|
|
65
67
|
config: @sdk_configuration,
|
|
66
68
|
base_url: base_url,
|
|
67
|
-
oauth2_scopes:
|
|
69
|
+
oauth2_scopes: nil,
|
|
68
70
|
operation_id: 'get_transactions_v1_transactions_get',
|
|
69
71
|
security_source: @sdk_configuration.security_source
|
|
70
72
|
)
|
|
@@ -72,13 +74,16 @@ module KintsugiSDK
|
|
|
72
74
|
error = T.let(nil, T.nilable(StandardError))
|
|
73
75
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
74
76
|
|
|
75
|
-
|
|
77
|
+
|
|
76
78
|
begin
|
|
77
79
|
http_response = T.must(connection).get(url) do |req|
|
|
78
80
|
req.headers.merge!(headers)
|
|
79
81
|
req.options.timeout = timeout unless timeout.nil?
|
|
80
82
|
req.params = query_params
|
|
81
83
|
Utils.configure_request_security(req, security)
|
|
84
|
+
http_headers&.each do |key, value|
|
|
85
|
+
req.headers[key.to_s] = value
|
|
86
|
+
end
|
|
82
87
|
|
|
83
88
|
@sdk_configuration.hooks.before_request(
|
|
84
89
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -106,13 +111,13 @@ module KintsugiSDK
|
|
|
106
111
|
response: http_response
|
|
107
112
|
)
|
|
108
113
|
end
|
|
109
|
-
|
|
114
|
+
|
|
110
115
|
if http_response.nil?
|
|
111
116
|
raise error if !error.nil?
|
|
112
117
|
raise 'no response'
|
|
113
118
|
end
|
|
114
119
|
end
|
|
115
|
-
|
|
120
|
+
|
|
116
121
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
117
122
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
118
123
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -182,8 +187,8 @@ module KintsugiSDK
|
|
|
182
187
|
end
|
|
183
188
|
|
|
184
189
|
|
|
185
|
-
sig { params(request: Models::Shared::TransactionPublicRequest, timeout_ms: T.nilable(Integer)).returns(Models::Shared::TransactionRead) }
|
|
186
|
-
def create(request:, timeout_ms: nil)
|
|
190
|
+
sig { params(request: Models::Shared::TransactionPublicRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::TransactionRead) }
|
|
191
|
+
def create(request:, timeout_ms: nil, http_headers: nil)
|
|
187
192
|
# create - Create Transaction
|
|
188
193
|
# Create a transaction.
|
|
189
194
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -195,7 +200,7 @@ module KintsugiSDK
|
|
|
195
200
|
headers['content-type'] = req_content_type
|
|
196
201
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
197
202
|
|
|
198
|
-
if form
|
|
203
|
+
if form && !form.empty?
|
|
199
204
|
body = Utils.encode_form(form)
|
|
200
205
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
201
206
|
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
@@ -209,14 +214,14 @@ module KintsugiSDK
|
|
|
209
214
|
|
|
210
215
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
211
216
|
timeout ||= @sdk_configuration.timeout
|
|
212
|
-
|
|
217
|
+
|
|
213
218
|
|
|
214
219
|
connection = @sdk_configuration.client
|
|
215
220
|
|
|
216
221
|
hook_ctx = SDKHooks::HookContext.new(
|
|
217
222
|
config: @sdk_configuration,
|
|
218
223
|
base_url: base_url,
|
|
219
|
-
oauth2_scopes:
|
|
224
|
+
oauth2_scopes: nil,
|
|
220
225
|
operation_id: 'create_transaction_v1_transactions_post',
|
|
221
226
|
security_source: @sdk_configuration.security_source
|
|
222
227
|
)
|
|
@@ -224,13 +229,16 @@ module KintsugiSDK
|
|
|
224
229
|
error = T.let(nil, T.nilable(StandardError))
|
|
225
230
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
226
231
|
|
|
227
|
-
|
|
232
|
+
|
|
228
233
|
begin
|
|
229
234
|
http_response = T.must(connection).post(url) do |req|
|
|
230
235
|
req.body = body
|
|
231
236
|
req.headers.merge!(headers)
|
|
232
237
|
req.options.timeout = timeout unless timeout.nil?
|
|
233
238
|
Utils.configure_request_security(req, security)
|
|
239
|
+
http_headers&.each do |key, value|
|
|
240
|
+
req.headers[key.to_s] = value
|
|
241
|
+
end
|
|
234
242
|
|
|
235
243
|
@sdk_configuration.hooks.before_request(
|
|
236
244
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -258,13 +266,13 @@ module KintsugiSDK
|
|
|
258
266
|
response: http_response
|
|
259
267
|
)
|
|
260
268
|
end
|
|
261
|
-
|
|
269
|
+
|
|
262
270
|
if http_response.nil?
|
|
263
271
|
raise error if !error.nil?
|
|
264
272
|
raise 'no response'
|
|
265
273
|
end
|
|
266
274
|
end
|
|
267
|
-
|
|
275
|
+
|
|
268
276
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
269
277
|
if Utils.match_status_code(http_response.status, ['202'])
|
|
270
278
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -334,8 +342,8 @@ module KintsugiSDK
|
|
|
334
342
|
end
|
|
335
343
|
|
|
336
344
|
|
|
337
|
-
sig { params(request: Models::Ops::GetTransactionByExternalIdRequest, timeout_ms: T.nilable(Integer)).returns(Models::Shared::TransactionRead) }
|
|
338
|
-
def get_by_external_id(request:, timeout_ms: nil)
|
|
345
|
+
sig { params(request: Models::Ops::GetTransactionByExternalIdRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::TransactionRead) }
|
|
346
|
+
def get_by_external_id(request:, timeout_ms: nil, http_headers: nil)
|
|
339
347
|
# get_by_external_id - Get Transaction By External Id
|
|
340
348
|
# Retrieves a specific transaction based on its external ID.
|
|
341
349
|
# This allows users to fetch transaction details using an identifier from an external system.
|
|
@@ -356,14 +364,14 @@ module KintsugiSDK
|
|
|
356
364
|
|
|
357
365
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
358
366
|
timeout ||= @sdk_configuration.timeout
|
|
359
|
-
|
|
367
|
+
|
|
360
368
|
|
|
361
369
|
connection = @sdk_configuration.client
|
|
362
370
|
|
|
363
371
|
hook_ctx = SDKHooks::HookContext.new(
|
|
364
372
|
config: @sdk_configuration,
|
|
365
373
|
base_url: base_url,
|
|
366
|
-
oauth2_scopes:
|
|
374
|
+
oauth2_scopes: nil,
|
|
367
375
|
operation_id: 'getTransactionByExternalId',
|
|
368
376
|
security_source: @sdk_configuration.security_source
|
|
369
377
|
)
|
|
@@ -371,12 +379,15 @@ module KintsugiSDK
|
|
|
371
379
|
error = T.let(nil, T.nilable(StandardError))
|
|
372
380
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
373
381
|
|
|
374
|
-
|
|
382
|
+
|
|
375
383
|
begin
|
|
376
384
|
http_response = T.must(connection).get(url) do |req|
|
|
377
385
|
req.headers.merge!(headers)
|
|
378
386
|
req.options.timeout = timeout unless timeout.nil?
|
|
379
387
|
Utils.configure_request_security(req, security)
|
|
388
|
+
http_headers&.each do |key, value|
|
|
389
|
+
req.headers[key.to_s] = value
|
|
390
|
+
end
|
|
380
391
|
|
|
381
392
|
@sdk_configuration.hooks.before_request(
|
|
382
393
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -404,13 +415,13 @@ module KintsugiSDK
|
|
|
404
415
|
response: http_response
|
|
405
416
|
)
|
|
406
417
|
end
|
|
407
|
-
|
|
418
|
+
|
|
408
419
|
if http_response.nil?
|
|
409
420
|
raise error if !error.nil?
|
|
410
421
|
raise 'no response'
|
|
411
422
|
end
|
|
412
423
|
end
|
|
413
|
-
|
|
424
|
+
|
|
414
425
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
415
426
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
416
427
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -480,8 +491,8 @@ module KintsugiSDK
|
|
|
480
491
|
end
|
|
481
492
|
|
|
482
493
|
|
|
483
|
-
sig { params(request: Models::Ops::UpdateTransactionV1TransactionsTransactionIdPutRequest, timeout_ms: T.nilable(Integer)).returns(Models::Shared::TransactionRead) }
|
|
484
|
-
def update(request:, timeout_ms: nil)
|
|
494
|
+
sig { params(request: Models::Ops::UpdateTransactionV1TransactionsTransactionIdPutRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::TransactionRead) }
|
|
495
|
+
def update(request:, timeout_ms: nil, http_headers: nil)
|
|
485
496
|
# update - Update Transaction
|
|
486
497
|
# Update a specific transaction by its ID.
|
|
487
498
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -498,7 +509,7 @@ module KintsugiSDK
|
|
|
498
509
|
headers['content-type'] = req_content_type
|
|
499
510
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
500
511
|
|
|
501
|
-
if form
|
|
512
|
+
if form && !form.empty?
|
|
502
513
|
body = Utils.encode_form(form)
|
|
503
514
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
504
515
|
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
@@ -512,14 +523,14 @@ module KintsugiSDK
|
|
|
512
523
|
|
|
513
524
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
514
525
|
timeout ||= @sdk_configuration.timeout
|
|
515
|
-
|
|
526
|
+
|
|
516
527
|
|
|
517
528
|
connection = @sdk_configuration.client
|
|
518
529
|
|
|
519
530
|
hook_ctx = SDKHooks::HookContext.new(
|
|
520
531
|
config: @sdk_configuration,
|
|
521
532
|
base_url: base_url,
|
|
522
|
-
oauth2_scopes:
|
|
533
|
+
oauth2_scopes: nil,
|
|
523
534
|
operation_id: 'update_transaction_v1_transactions__transaction_id__put',
|
|
524
535
|
security_source: @sdk_configuration.security_source
|
|
525
536
|
)
|
|
@@ -527,13 +538,16 @@ module KintsugiSDK
|
|
|
527
538
|
error = T.let(nil, T.nilable(StandardError))
|
|
528
539
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
529
540
|
|
|
530
|
-
|
|
541
|
+
|
|
531
542
|
begin
|
|
532
543
|
http_response = T.must(connection).put(url) do |req|
|
|
533
544
|
req.body = body
|
|
534
545
|
req.headers.merge!(headers)
|
|
535
546
|
req.options.timeout = timeout unless timeout.nil?
|
|
536
547
|
Utils.configure_request_security(req, security)
|
|
548
|
+
http_headers&.each do |key, value|
|
|
549
|
+
req.headers[key.to_s] = value
|
|
550
|
+
end
|
|
537
551
|
|
|
538
552
|
@sdk_configuration.hooks.before_request(
|
|
539
553
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -561,13 +575,13 @@ module KintsugiSDK
|
|
|
561
575
|
response: http_response
|
|
562
576
|
)
|
|
563
577
|
end
|
|
564
|
-
|
|
578
|
+
|
|
565
579
|
if http_response.nil?
|
|
566
580
|
raise error if !error.nil?
|
|
567
581
|
raise 'no response'
|
|
568
582
|
end
|
|
569
583
|
end
|
|
570
|
-
|
|
584
|
+
|
|
571
585
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
572
586
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
573
587
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -609,8 +623,8 @@ module KintsugiSDK
|
|
|
609
623
|
end
|
|
610
624
|
|
|
611
625
|
|
|
612
|
-
sig { params(request: Models::Ops::GetTransactionByIdV1TransactionsTransactionIdGetRequest, timeout_ms: T.nilable(Integer)).returns(Models::Shared::TransactionRead) }
|
|
613
|
-
def get_by_id(request:, timeout_ms: nil)
|
|
626
|
+
sig { params(request: Models::Ops::GetTransactionByIdV1TransactionsTransactionIdGetRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::TransactionRead) }
|
|
627
|
+
def get_by_id(request:, timeout_ms: nil, http_headers: nil)
|
|
614
628
|
# get_by_id - Get Transaction By Id
|
|
615
629
|
# The Get Transaction By Id API retrieves detailed information
|
|
616
630
|
# about a specific transaction by providing its unique transaction ID.
|
|
@@ -631,14 +645,14 @@ module KintsugiSDK
|
|
|
631
645
|
|
|
632
646
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
633
647
|
timeout ||= @sdk_configuration.timeout
|
|
634
|
-
|
|
648
|
+
|
|
635
649
|
|
|
636
650
|
connection = @sdk_configuration.client
|
|
637
651
|
|
|
638
652
|
hook_ctx = SDKHooks::HookContext.new(
|
|
639
653
|
config: @sdk_configuration,
|
|
640
654
|
base_url: base_url,
|
|
641
|
-
oauth2_scopes:
|
|
655
|
+
oauth2_scopes: nil,
|
|
642
656
|
operation_id: 'get_transaction_by_id_v1_transactions__transaction_id__get',
|
|
643
657
|
security_source: @sdk_configuration.security_source
|
|
644
658
|
)
|
|
@@ -646,12 +660,15 @@ module KintsugiSDK
|
|
|
646
660
|
error = T.let(nil, T.nilable(StandardError))
|
|
647
661
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
648
662
|
|
|
649
|
-
|
|
663
|
+
|
|
650
664
|
begin
|
|
651
665
|
http_response = T.must(connection).get(url) do |req|
|
|
652
666
|
req.headers.merge!(headers)
|
|
653
667
|
req.options.timeout = timeout unless timeout.nil?
|
|
654
668
|
Utils.configure_request_security(req, security)
|
|
669
|
+
http_headers&.each do |key, value|
|
|
670
|
+
req.headers[key.to_s] = value
|
|
671
|
+
end
|
|
655
672
|
|
|
656
673
|
@sdk_configuration.hooks.before_request(
|
|
657
674
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -679,13 +696,13 @@ module KintsugiSDK
|
|
|
679
696
|
response: http_response
|
|
680
697
|
)
|
|
681
698
|
end
|
|
682
|
-
|
|
699
|
+
|
|
683
700
|
if http_response.nil?
|
|
684
701
|
raise error if !error.nil?
|
|
685
702
|
raise 'no response'
|
|
686
703
|
end
|
|
687
704
|
end
|
|
688
|
-
|
|
705
|
+
|
|
689
706
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
690
707
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
691
708
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -755,8 +772,8 @@ module KintsugiSDK
|
|
|
755
772
|
end
|
|
756
773
|
|
|
757
774
|
|
|
758
|
-
sig { params(request: Models::Ops::GetTransactionsByFilingRequest, timeout_ms: T.nilable(Integer)).returns(T::Array[Models::Shared::TransactionRead]) }
|
|
759
|
-
def get_by_filing_id(request:, timeout_ms: nil)
|
|
775
|
+
sig { params(request: Models::Ops::GetTransactionsByFilingRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(T::Array[Models::Shared::TransactionRead]) }
|
|
776
|
+
def get_by_filing_id(request:, timeout_ms: nil, http_headers: nil)
|
|
760
777
|
# get_by_filing_id - Get Transactions By Filing Id
|
|
761
778
|
# Retrieve transactions by filing ID.
|
|
762
779
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -776,14 +793,14 @@ module KintsugiSDK
|
|
|
776
793
|
|
|
777
794
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
778
795
|
timeout ||= @sdk_configuration.timeout
|
|
779
|
-
|
|
796
|
+
|
|
780
797
|
|
|
781
798
|
connection = @sdk_configuration.client
|
|
782
799
|
|
|
783
800
|
hook_ctx = SDKHooks::HookContext.new(
|
|
784
801
|
config: @sdk_configuration,
|
|
785
802
|
base_url: base_url,
|
|
786
|
-
oauth2_scopes:
|
|
803
|
+
oauth2_scopes: nil,
|
|
787
804
|
operation_id: 'getTransactionsByFiling',
|
|
788
805
|
security_source: @sdk_configuration.security_source
|
|
789
806
|
)
|
|
@@ -791,12 +808,15 @@ module KintsugiSDK
|
|
|
791
808
|
error = T.let(nil, T.nilable(StandardError))
|
|
792
809
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
793
810
|
|
|
794
|
-
|
|
811
|
+
|
|
795
812
|
begin
|
|
796
813
|
http_response = T.must(connection).get(url) do |req|
|
|
797
814
|
req.headers.merge!(headers)
|
|
798
815
|
req.options.timeout = timeout unless timeout.nil?
|
|
799
816
|
Utils.configure_request_security(req, security)
|
|
817
|
+
http_headers&.each do |key, value|
|
|
818
|
+
req.headers[key.to_s] = value
|
|
819
|
+
end
|
|
800
820
|
|
|
801
821
|
@sdk_configuration.hooks.before_request(
|
|
802
822
|
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
@@ -824,13 +844,13 @@ module KintsugiSDK
|
|
|
824
844
|
response: http_response
|
|
825
845
|
)
|
|
826
846
|
end
|
|
827
|
-
|
|
847
|
+
|
|
828
848
|
if http_response.nil?
|
|
829
849
|
raise error if !error.nil?
|
|
830
850
|
raise 'no response'
|
|
831
851
|
end
|
|
832
852
|
end
|
|
833
|
-
|
|
853
|
+
|
|
834
854
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
835
855
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
836
856
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -898,5 +918,5 @@ module KintsugiSDK
|
|
|
898
918
|
|
|
899
919
|
end
|
|
900
920
|
end
|
|
901
|
-
|
|
921
|
+
end
|
|
902
922
|
end
|
|
@@ -104,7 +104,7 @@ module KintsugiSDK
|
|
|
104
104
|
end
|
|
105
105
|
raise StandardError, 'invalid multipart/form-data file' if T.unsafe(file_name) == '' || T.unsafe(content).nil?
|
|
106
106
|
|
|
107
|
-
form.append([field_name, [file_name, content]])
|
|
107
|
+
form.append(["#{field_name}[]", [file_name, content]])
|
|
108
108
|
end
|
|
109
109
|
else
|
|
110
110
|
# Handle single file
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
# typed: true
|
|
4
4
|
# frozen_string_literal: true
|
|
5
5
|
|
|
6
|
-
require 'cgi'
|
|
7
6
|
require 'date'
|
|
8
7
|
require 'base64'
|
|
9
8
|
require 'sorbet-runtime'
|
|
@@ -17,7 +16,10 @@ module KintsugiSDK
|
|
|
17
16
|
parsed_params = T.let({}, T::Hash[T.any(String, Symbol), T::Array[String]])
|
|
18
17
|
if !url_override.nil?
|
|
19
18
|
parsed_url = URI.parse url_override
|
|
20
|
-
|
|
19
|
+
URI.decode_www_form(parsed_url.query.to_s).each do |key, value|
|
|
20
|
+
parsed_params[key] ||= []
|
|
21
|
+
T.must(parsed_params[key]) << value
|
|
22
|
+
end
|
|
21
23
|
end
|
|
22
24
|
params = T.let({}, T::Hash[T.any(String, Symbol), T::Array[String]])
|
|
23
25
|
T.unsafe(clazz).fields.each do |f|
|
|
@@ -29,8 +29,6 @@ module KintsugiSDK
|
|
|
29
29
|
|
|
30
30
|
return serialize_content_type(SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], request) if !request.respond_to?(:fields) || !request.respond_to?(request_field_name)
|
|
31
31
|
|
|
32
|
-
request_val = request.send(request_field_name)
|
|
33
|
-
|
|
34
32
|
request_metadata = T.let(nil, T.nilable(T::Array[T::Array[T.any(T::Array[T.nilable(String)], String)]]))
|
|
35
33
|
T.unsafe(request).fields.each do |f|
|
|
36
34
|
if f.name == request_field_name
|
|
@@ -38,7 +36,14 @@ module KintsugiSDK
|
|
|
38
36
|
break
|
|
39
37
|
end
|
|
40
38
|
end
|
|
41
|
-
|
|
39
|
+
if request_metadata.nil?
|
|
40
|
+
# Field name collision: model has a field matching request_field_name but without :request metadata.
|
|
41
|
+
# Serialize the entire object as the request body.
|
|
42
|
+
return serialize_content_type(SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], request)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
request_val = request.send(request_field_name)
|
|
46
|
+
return ['', nil, nil] if request_val.nil?
|
|
42
47
|
|
|
43
48
|
serialize_content_type(
|
|
44
49
|
request_metadata.fetch(:media_type, 'application/octet-stream'), request_val
|
|
@@ -50,9 +55,9 @@ module KintsugiSDK
|
|
|
50
55
|
.returns([String, Object, T.nilable(T::Array[T::Array[T.any(T::Array[T.nilable(String)], String)]])])
|
|
51
56
|
end
|
|
52
57
|
def self.serialize_content_type(media_type, request)
|
|
53
|
-
return media_type, ::Crystalline.to_json(request), nil if media_type.match('(application|text)
|
|
54
|
-
return serialize_multipart_form(media_type, request) if media_type.match('multipart\/.*')
|
|
55
|
-
return media_type, serialize_form_data(request), nil if media_type.match('application\/x-www-form-urlencoded.*')
|
|
58
|
+
return media_type, ::Crystalline.to_json(request), nil if media_type.match('^(application|text)\/([^+]+\+)*json.*')
|
|
59
|
+
return serialize_multipart_form(media_type, request) if media_type.match('^multipart\/.*')
|
|
60
|
+
return media_type, serialize_form_data(request), nil if media_type.match('^application\/x-www-form-urlencoded.*')
|
|
56
61
|
return media_type, request, nil if request.is_a?(String) || request.is_a?(Array)
|
|
57
62
|
|
|
58
63
|
raise StandardError, "invalid request body type #{request.class} for mediaType #{media_type}"
|
|
@@ -80,12 +80,15 @@ module KintsugiSDK
|
|
|
80
80
|
if @strategy == 'backoff' && @backoff
|
|
81
81
|
retry_options[:backoff_factor] = @backoff.exponent unless @backoff.exponent.nil?
|
|
82
82
|
retry_options[:interval] = (@backoff.initial_interval.to_f / 1000) unless @backoff.initial_interval.nil?
|
|
83
|
-
retry_options[:max_interval] = @backoff.max_interval unless @backoff.max_interval.nil?
|
|
83
|
+
retry_options[:max_interval] = (@backoff.max_interval.to_f / 1000) unless @backoff.max_interval.nil?
|
|
84
84
|
|
|
85
85
|
unless @backoff.max_elapsed_time.nil?
|
|
86
86
|
stop_time = initial_time + (@backoff.max_elapsed_time.to_f / 1000)
|
|
87
87
|
retry_options[:retry_if] = ->(_env, _exc) { Time.now < stop_time }
|
|
88
88
|
end
|
|
89
|
+
|
|
90
|
+
retry_options[:rate_limit_retry_header] = 'retry-after-ms'
|
|
91
|
+
retry_options[:header_parser_block] = ->(value) { value.to_f / 1000 }
|
|
89
92
|
end
|
|
90
93
|
|
|
91
94
|
retry_options
|
|
@@ -12,31 +12,52 @@ module KintsugiSDK
|
|
|
12
12
|
module Utils
|
|
13
13
|
extend T::Sig
|
|
14
14
|
|
|
15
|
-
sig { params(req: Faraday::Request, security: Object).void }
|
|
16
|
-
def self.configure_request_security(req, security)
|
|
15
|
+
sig { params(req: Faraday::Request, security: Object, allowed_fields: T.nilable(T::Array[Symbol])).void }
|
|
16
|
+
def self.configure_request_security(req, security, allowed_fields = nil)
|
|
17
17
|
return if security.nil?
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
sec_fields = if allowed_fields.nil?
|
|
20
|
+
T.unsafe(security).fields
|
|
21
|
+
else
|
|
22
|
+
allowed_fields.filter_map { |name| T.unsafe(security).fields.find { |f| f.name == name } }
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sec_fields.each do |sec_field|
|
|
19
26
|
value = security.send(sec_field.name)
|
|
20
27
|
next if value.nil?
|
|
21
28
|
|
|
22
29
|
metadata = sec_field.metadata[:security]
|
|
23
30
|
next if metadata.nil?
|
|
24
31
|
|
|
25
|
-
|
|
32
|
+
if metadata[:option]
|
|
33
|
+
_parse_security_option(req, value)
|
|
34
|
+
break unless metadata[:composite]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
next unless metadata[:scheme]
|
|
26
38
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
_parse_security_scheme(req, metadata, value)
|
|
33
|
-
end
|
|
39
|
+
# Special case for basic auth which could be a flattened struct
|
|
40
|
+
if metadata[:sub_type] == 'basic' && !value.respond_to?(:fields)
|
|
41
|
+
_parse_security_scheme(req, metadata, security)
|
|
42
|
+
else
|
|
43
|
+
_parse_security_scheme(req, metadata, value)
|
|
34
44
|
end
|
|
45
|
+
break unless metadata[:composite]
|
|
35
46
|
end
|
|
36
47
|
end
|
|
37
48
|
|
|
38
49
|
sig { params(req: Faraday::Request, option: Object).void }
|
|
39
50
|
def self._parse_security_option(req, option)
|
|
51
|
+
# Check if this option uses basic auth (needs the whole object, not individual fields)
|
|
52
|
+
first_field = T.unsafe(option).fields.first
|
|
53
|
+
if first_field
|
|
54
|
+
first_meta = first_field.metadata[:security]
|
|
55
|
+
if first_meta && first_meta[:type] == 'http' && first_meta[:sub_type] == 'basic'
|
|
56
|
+
_parse_security_scheme(req, first_meta, option)
|
|
57
|
+
return
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
40
61
|
T.unsafe(option).fields.each do |opt_field|
|
|
41
62
|
metadata = opt_field.metadata[:security]
|
|
42
63
|
next if metadata.nil? || !metadata.include?(:scheme)
|
|
@@ -24,7 +24,7 @@ module KintsugiSDK
|
|
|
24
24
|
if serialization != ''
|
|
25
25
|
serialized_params = _get_serialized_params(param_metadata, f_name, param)
|
|
26
26
|
serialized_params.each do |k, v|
|
|
27
|
-
path = path.
|
|
27
|
+
path = path.gsub("{#{k}}", v.join(', '))
|
|
28
28
|
end
|
|
29
29
|
else
|
|
30
30
|
if param.is_a? Array
|
|
@@ -32,7 +32,7 @@ module KintsugiSDK
|
|
|
32
32
|
param.each do |pp_val|
|
|
33
33
|
pp_vals.append(pp_val.to_s)
|
|
34
34
|
end
|
|
35
|
-
path = path.
|
|
35
|
+
path = path.gsub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
|
|
36
36
|
elsif param.is_a? Hash
|
|
37
37
|
pp_vals = []
|
|
38
38
|
param.each do |pp_key, pp_val|
|
|
@@ -44,7 +44,7 @@ module KintsugiSDK
|
|
|
44
44
|
pp_vals.append("#{pp_key},#{value}")
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
|
-
path = path.
|
|
47
|
+
path = path.gsub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
|
|
48
48
|
elsif param.class.include?(::Crystalline::MetadataFields)
|
|
49
49
|
pp_vals = []
|
|
50
50
|
attrs = T.unsafe(param).fields.filter { |field| field.name && param.respond_to?(field.name.to_sym) }.map(&:name)
|
|
@@ -72,9 +72,9 @@ module KintsugiSDK
|
|
|
72
72
|
pp_vals.append("#{parm_name},#{param_field_val}")
|
|
73
73
|
end
|
|
74
74
|
end
|
|
75
|
-
path = path.
|
|
75
|
+
path = path.gsub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
|
|
76
76
|
else
|
|
77
|
-
path = path.
|
|
77
|
+
path = path.gsub("{#{param_metadata.fetch(:field_name, f.name)}}", _encode_path_param(val_to_string(param)))
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
end
|
|
@@ -82,6 +82,12 @@ module KintsugiSDK
|
|
|
82
82
|
server_url.delete_suffix('/') + path
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
+
# Percent-encode characters that are invalid in URI path segments
|
|
86
|
+
sig { params(value: String).returns(String) }
|
|
87
|
+
def self._encode_path_param(value)
|
|
88
|
+
value.gsub(/[<>{}\[\]|\\^`\s?#%]/) { |c| format('%%%02X', c.ord) }
|
|
89
|
+
end
|
|
90
|
+
|
|
85
91
|
sig { params(url_with_params: String, params: T::Hash[Symbol, T.any(String, T::Enum)]).returns(String) }
|
|
86
92
|
def self.template_url(url_with_params, params)
|
|
87
93
|
params.each do |key, value|
|