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
|
@@ -16,6 +16,8 @@ module KintsugiSDK
|
|
|
16
16
|
field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': ::KintsugiSDK::Utils.datetime_from_iso_format(false) } }
|
|
17
17
|
# The total amount of the item.
|
|
18
18
|
field :amount, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('amount'), required: true } }
|
|
19
|
+
# List of tax items applied to the transaction item.
|
|
20
|
+
field :tax_items, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::TaxItemEstimate)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_items') } }
|
|
19
21
|
# A unique identifier for the transaction item.
|
|
20
22
|
field :external_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_id') } }
|
|
21
23
|
# A description of the item.
|
|
@@ -35,25 +37,32 @@ module KintsugiSDK
|
|
|
35
37
|
# Category of the product. Required if product_subcategory is used
|
|
36
38
|
# in place of external_product_id.
|
|
37
39
|
field :product_category, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_category') } }
|
|
38
|
-
# This enum is used to determine if a transaction is exempt from tax.
|
|
39
|
-
field :exempt_reason, Crystalline::Nilable.new(Models::Shared::TaxExemptionEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt_reason'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TaxExemptionEnum, true) } }
|
|
40
|
-
# List of tax items applied to the transaction item.
|
|
41
|
-
field :tax_items, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::TaxItemEstimate)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_items') } }
|
|
42
40
|
# Defaults to 1.0. The quantity of the item.
|
|
43
41
|
field :quantity, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('quantity') } }
|
|
44
42
|
# Indicates whether the transaction item is exempt from tax.
|
|
45
43
|
field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
|
|
44
|
+
# **Beta — not yet available in production.** When it is not enabled for your environment the field is accepted but ignored, and the response echoes `false`.
|
|
45
|
+
#
|
|
46
|
+
# Defaults to false. When true, `amount` is the gross (tax-included) price and the tax is backed out of it rather than added on top; for a taxable line, `taxable_amount` in the response is then the net base.
|
|
47
|
+
#
|
|
48
|
+
# When the line is not taxed - exempt, or no tax rule applies in the destination - `taxable_amount` is `0.00` rather than the net base, matching how exempt tax-exclusive lines already behave. Read the net amount as `taxable_amount` when `tax_amount` is non-zero, and as `amount` otherwise.
|
|
49
|
+
#
|
|
50
|
+
# This applies to the estimate in this request only. Transactions imported through a connection carry no such flag, so an order quoted here as gross is treated as net when it later syncs, and its recorded tax will be higher than this estimate. Send net amounts on the connection side, or reconcile the difference, until tax-inclusive import support ships.
|
|
51
|
+
field :is_tax_inclusive, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_tax_inclusive') } }
|
|
46
52
|
# The total tax amount for the transaction item.
|
|
47
53
|
field :tax_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount') } }
|
|
48
54
|
# The taxable amount for the transaction item.
|
|
49
55
|
field :taxable_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
|
|
50
56
|
# The tax rate applied to the transaction item.
|
|
51
57
|
field :tax_rate, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate') } }
|
|
58
|
+
# Reason for exemption, if applicable.
|
|
59
|
+
field :exempt_reason, Crystalline::Nilable.new(Models::Shared::TaxExemptionEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt_reason'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TaxExemptionEnum, true) } }
|
|
52
60
|
|
|
53
|
-
sig { params(date: ::DateTime, amount: ::String, external_id: T.nilable(::String), description: T.nilable(::String), external_product_id: T.nilable(::String), product_name: T.nilable(::String), product_description: T.nilable(::String), product_source: T.nilable(Models::Shared::SourceEnum), product_subcategory: T.nilable(::String), product_category: T.nilable(::String),
|
|
54
|
-
def initialize(date:, amount:, external_id: nil, description: nil, external_product_id: nil, product_name: nil, product_description: nil, product_source: nil, product_subcategory: nil, product_category: nil,
|
|
61
|
+
sig { params(date: ::DateTime, amount: ::String, tax_items: T.nilable(T::Array[Models::Shared::TaxItemEstimate]), external_id: T.nilable(::String), description: T.nilable(::String), external_product_id: T.nilable(::String), product_name: T.nilable(::String), product_description: T.nilable(::String), product_source: T.nilable(Models::Shared::SourceEnum), product_subcategory: T.nilable(::String), product_category: T.nilable(::String), quantity: T.nilable(::String), exempt: T.nilable(T::Boolean), is_tax_inclusive: T.nilable(T::Boolean), tax_amount: T.nilable(::String), taxable_amount: T.nilable(::String), tax_rate: T.nilable(::String), exempt_reason: T.nilable(Models::Shared::TaxExemptionEnum)).void }
|
|
62
|
+
def initialize(date:, amount:, tax_items: nil, external_id: nil, description: nil, external_product_id: nil, product_name: nil, product_description: nil, product_source: nil, product_subcategory: nil, product_category: nil, quantity: '1.0', exempt: false, is_tax_inclusive: false, tax_amount: '0.00', taxable_amount: '0.00', tax_rate: '0.00', exempt_reason: nil)
|
|
55
63
|
@date = date
|
|
56
64
|
@amount = amount
|
|
65
|
+
@tax_items = tax_items
|
|
57
66
|
@external_id = external_id
|
|
58
67
|
@description = description
|
|
59
68
|
@external_product_id = external_product_id
|
|
@@ -62,13 +71,13 @@ module KintsugiSDK
|
|
|
62
71
|
@product_source = product_source
|
|
63
72
|
@product_subcategory = product_subcategory
|
|
64
73
|
@product_category = product_category
|
|
65
|
-
@exempt_reason = exempt_reason
|
|
66
|
-
@tax_items = tax_items
|
|
67
74
|
@quantity = quantity
|
|
68
75
|
@exempt = exempt
|
|
76
|
+
@is_tax_inclusive = is_tax_inclusive
|
|
69
77
|
@tax_amount = tax_amount
|
|
70
78
|
@taxable_amount = taxable_amount
|
|
71
79
|
@tax_rate = tax_rate
|
|
80
|
+
@exempt_reason = exempt_reason
|
|
72
81
|
end
|
|
73
82
|
|
|
74
83
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -76,6 +85,7 @@ module KintsugiSDK
|
|
|
76
85
|
return false unless other.is_a? self.class
|
|
77
86
|
return false unless @date == other.date
|
|
78
87
|
return false unless @amount == other.amount
|
|
88
|
+
return false unless @tax_items == other.tax_items
|
|
79
89
|
return false unless @external_id == other.external_id
|
|
80
90
|
return false unless @description == other.description
|
|
81
91
|
return false unless @external_product_id == other.external_product_id
|
|
@@ -84,13 +94,13 @@ module KintsugiSDK
|
|
|
84
94
|
return false unless @product_source == other.product_source
|
|
85
95
|
return false unless @product_subcategory == other.product_subcategory
|
|
86
96
|
return false unless @product_category == other.product_category
|
|
87
|
-
return false unless @exempt_reason == other.exempt_reason
|
|
88
|
-
return false unless @tax_items == other.tax_items
|
|
89
97
|
return false unless @quantity == other.quantity
|
|
90
98
|
return false unless @exempt == other.exempt
|
|
99
|
+
return false unless @is_tax_inclusive == other.is_tax_inclusive
|
|
91
100
|
return false unless @tax_amount == other.tax_amount
|
|
92
101
|
return false unless @taxable_amount == other.taxable_amount
|
|
93
102
|
return false unless @tax_rate == other.tax_rate
|
|
103
|
+
return false unless @exempt_reason == other.exempt_reason
|
|
94
104
|
true
|
|
95
105
|
end
|
|
96
106
|
end
|
|
@@ -12,6 +12,8 @@ class KintsugiSDK::Models::Shared::TransactionItemEstimateResponse
|
|
|
12
12
|
def date=(str_); end
|
|
13
13
|
def amount(); end
|
|
14
14
|
def amount=(str_); end
|
|
15
|
+
def tax_items(); end
|
|
16
|
+
def tax_items=(str_); end
|
|
15
17
|
def external_id(); end
|
|
16
18
|
def external_id=(str_); end
|
|
17
19
|
def description(); end
|
|
@@ -28,18 +30,18 @@ class KintsugiSDK::Models::Shared::TransactionItemEstimateResponse
|
|
|
28
30
|
def product_subcategory=(str_); end
|
|
29
31
|
def product_category(); end
|
|
30
32
|
def product_category=(str_); end
|
|
31
|
-
def exempt_reason(); end
|
|
32
|
-
def exempt_reason=(str_); end
|
|
33
|
-
def tax_items(); end
|
|
34
|
-
def tax_items=(str_); end
|
|
35
33
|
def quantity(); end
|
|
36
34
|
def quantity=(str_); end
|
|
37
35
|
def exempt(); end
|
|
38
36
|
def exempt=(str_); end
|
|
37
|
+
def is_tax_inclusive(); end
|
|
38
|
+
def is_tax_inclusive=(str_); end
|
|
39
39
|
def tax_amount(); end
|
|
40
40
|
def tax_amount=(str_); end
|
|
41
41
|
def taxable_amount(); end
|
|
42
42
|
def taxable_amount=(str_); end
|
|
43
43
|
def tax_rate(); end
|
|
44
44
|
def tax_rate=(str_); end
|
|
45
|
-
end
|
|
45
|
+
def exempt_reason(); end
|
|
46
|
+
def exempt_reason=(str_); end
|
|
47
|
+
end
|
|
@@ -12,10 +12,6 @@ module KintsugiSDK
|
|
|
12
12
|
extend T::Sig
|
|
13
13
|
include Crystalline::MetadataFields
|
|
14
14
|
|
|
15
|
-
# Unique identifier of the organization. This field is deprecated, and should no longer be used. The value is populated through the 'x-organization-id' header.
|
|
16
|
-
#
|
|
17
|
-
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
18
|
-
field :organization_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('organization_id'), required: true } }
|
|
19
15
|
# Date/time of item.
|
|
20
16
|
field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': ::KintsugiSDK::Utils.datetime_from_iso_format(false) } }
|
|
21
17
|
# External product identifier.
|
|
@@ -24,6 +20,10 @@ module KintsugiSDK
|
|
|
24
20
|
field :id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('id'), required: true } }
|
|
25
21
|
# List of tax items associated with the transaction item.
|
|
26
22
|
field :tax_items, Crystalline::Array.new(Models::Shared::TaxItemRead), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_items'), required: true } }
|
|
23
|
+
# Unique identifier of the organization. This field is deprecated, and should no longer be used. The value is populated through the 'x-organization-id' header.
|
|
24
|
+
#
|
|
25
|
+
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
26
|
+
field :organization_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('organization_id'), required: true } }
|
|
27
27
|
# External item identifier.
|
|
28
28
|
field :external_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_id') } }
|
|
29
29
|
# Item description
|
|
@@ -36,9 +36,21 @@ module KintsugiSDK
|
|
|
36
36
|
field :product_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_name') } }
|
|
37
37
|
# Product description
|
|
38
38
|
field :product_description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_description') } }
|
|
39
|
-
|
|
39
|
+
# Quantity of item.
|
|
40
|
+
field :quantity, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('quantity') } }
|
|
41
|
+
# Item amount.
|
|
42
|
+
field :amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('amount') } }
|
|
43
|
+
# Imported tax amount for the item.
|
|
44
|
+
field :tax_amount_imported, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount_imported') } }
|
|
45
|
+
# Imported tax rate.
|
|
46
|
+
field :tax_rate_imported, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_imported') } }
|
|
47
|
+
# Calculated tax amount for the item.
|
|
48
|
+
field :tax_amount_calculated, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount_calculated') } }
|
|
49
|
+
# Calculated tax rate.
|
|
50
|
+
field :tax_rate_calculated, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_calculated') } }
|
|
51
|
+
# Original currency code.
|
|
40
52
|
field :original_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('original_currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
|
|
41
|
-
|
|
53
|
+
# Destination currency code.
|
|
42
54
|
field :destination_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('destination_currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
|
|
43
55
|
# Converted item amount.
|
|
44
56
|
field :converted_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_amount') } }
|
|
@@ -52,42 +64,40 @@ module KintsugiSDK
|
|
|
52
64
|
field :converted_total_discount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_total_discount') } }
|
|
53
65
|
# Converted subtotal amount.
|
|
54
66
|
field :converted_subtotal, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_subtotal') } }
|
|
55
|
-
#
|
|
67
|
+
# Taxable amount for the item.
|
|
68
|
+
field :taxable_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
|
|
69
|
+
# Tax exemption status.
|
|
56
70
|
field :tax_exemption, Crystalline::Nilable.new(Models::Shared::TaxExemptionEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_exemption'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TaxExemptionEnum, true) } }
|
|
71
|
+
# Indicates if the item is exempt.
|
|
72
|
+
field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
|
|
57
73
|
# Total discount amount applied to this transaction item.
|
|
58
74
|
field :total_discount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_discount') } }
|
|
59
75
|
# Subtotal amount before any discount is applied.
|
|
60
76
|
field :subtotal, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('subtotal') } }
|
|
61
|
-
#
|
|
62
|
-
field :
|
|
63
|
-
#
|
|
64
|
-
field :
|
|
65
|
-
# Imported tax amount for the item.
|
|
66
|
-
field :tax_amount_imported, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount_imported') } }
|
|
67
|
-
# Imported tax rate.
|
|
68
|
-
field :tax_rate_imported, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_imported') } }
|
|
69
|
-
# Calculated tax amount for the item.
|
|
70
|
-
field :tax_amount_calculated, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount_calculated') } }
|
|
71
|
-
# Calculated tax rate.
|
|
72
|
-
field :tax_rate_calculated, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_calculated') } }
|
|
73
|
-
# Taxable amount for the item.
|
|
74
|
-
field :taxable_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
|
|
75
|
-
# Indicates if the item is exempt.
|
|
76
|
-
field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
|
|
77
|
+
# Whether this purchase line is reverse-charged.
|
|
78
|
+
field :is_reverse_charge_self_accounted, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_reverse_charge_self_accounted') } }
|
|
79
|
+
# Input VAT recoverability 0-100. Blank means 100%.
|
|
80
|
+
field :recoverability_percent, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('recoverability_percent') } }
|
|
77
81
|
|
|
78
|
-
sig { params(
|
|
79
|
-
def initialize(
|
|
80
|
-
@organization_id = organization_id
|
|
82
|
+
sig { params(date: ::DateTime, external_product_id: ::String, id: ::String, tax_items: T::Array[Models::Shared::TaxItemRead], organization_id: T.nilable(::String), external_id: T.nilable(::String), description: T.nilable(::String), product: T.nilable(::String), product_id: T.nilable(::String), product_name: T.nilable(::String), product_description: T.nilable(::String), quantity: T.nilable(::String), amount: T.nilable(::String), tax_amount_imported: T.nilable(::String), tax_rate_imported: T.nilable(::String), tax_amount_calculated: T.nilable(::String), tax_rate_calculated: T.nilable(::String), original_currency: T.nilable(Models::Shared::CurrencyEnum), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_amount: T.nilable(::String), converted_taxable_amount: T.nilable(::String), converted_tax_amount_imported: T.nilable(::String), converted_tax_amount_calculated: T.nilable(::String), converted_total_discount: T.nilable(::String), converted_subtotal: T.nilable(::String), taxable_amount: T.nilable(::String), tax_exemption: T.nilable(Models::Shared::TaxExemptionEnum), exempt: T.nilable(T::Boolean), total_discount: T.nilable(::String), subtotal: T.nilable(::String), is_reverse_charge_self_accounted: T.nilable(T::Boolean), recoverability_percent: T.nilable(::String)).void }
|
|
83
|
+
def initialize(date:, external_product_id:, id:, tax_items:, organization_id: nil, external_id: nil, description: nil, product: nil, product_id: nil, product_name: nil, product_description: nil, quantity: '1.0', amount: '0.00', tax_amount_imported: '0.00', tax_rate_imported: '0.00', tax_amount_calculated: '0.00', tax_rate_calculated: '0.00', original_currency: nil, destination_currency: nil, converted_amount: nil, converted_taxable_amount: nil, converted_tax_amount_imported: nil, converted_tax_amount_calculated: nil, converted_total_discount: nil, converted_subtotal: nil, taxable_amount: '0.00', tax_exemption: nil, exempt: false, total_discount: nil, subtotal: nil, is_reverse_charge_self_accounted: false, recoverability_percent: nil)
|
|
81
84
|
@date = date
|
|
82
85
|
@external_product_id = external_product_id
|
|
83
86
|
@id = id
|
|
84
87
|
@tax_items = tax_items
|
|
88
|
+
@organization_id = organization_id
|
|
85
89
|
@external_id = external_id
|
|
86
90
|
@description = description
|
|
87
91
|
@product = product
|
|
88
92
|
@product_id = product_id
|
|
89
93
|
@product_name = product_name
|
|
90
94
|
@product_description = product_description
|
|
95
|
+
@quantity = quantity
|
|
96
|
+
@amount = amount
|
|
97
|
+
@tax_amount_imported = tax_amount_imported
|
|
98
|
+
@tax_rate_imported = tax_rate_imported
|
|
99
|
+
@tax_amount_calculated = tax_amount_calculated
|
|
100
|
+
@tax_rate_calculated = tax_rate_calculated
|
|
91
101
|
@original_currency = original_currency
|
|
92
102
|
@destination_currency = destination_currency
|
|
93
103
|
@converted_amount = converted_amount
|
|
@@ -96,33 +106,35 @@ module KintsugiSDK
|
|
|
96
106
|
@converted_tax_amount_calculated = converted_tax_amount_calculated
|
|
97
107
|
@converted_total_discount = converted_total_discount
|
|
98
108
|
@converted_subtotal = converted_subtotal
|
|
109
|
+
@taxable_amount = taxable_amount
|
|
99
110
|
@tax_exemption = tax_exemption
|
|
111
|
+
@exempt = exempt
|
|
100
112
|
@total_discount = total_discount
|
|
101
113
|
@subtotal = subtotal
|
|
102
|
-
@
|
|
103
|
-
@
|
|
104
|
-
@tax_amount_imported = tax_amount_imported
|
|
105
|
-
@tax_rate_imported = tax_rate_imported
|
|
106
|
-
@tax_amount_calculated = tax_amount_calculated
|
|
107
|
-
@tax_rate_calculated = tax_rate_calculated
|
|
108
|
-
@taxable_amount = taxable_amount
|
|
109
|
-
@exempt = exempt
|
|
114
|
+
@is_reverse_charge_self_accounted = is_reverse_charge_self_accounted
|
|
115
|
+
@recoverability_percent = recoverability_percent
|
|
110
116
|
end
|
|
111
117
|
|
|
112
118
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
113
119
|
def ==(other)
|
|
114
120
|
return false unless other.is_a? self.class
|
|
115
|
-
return false unless @organization_id == other.organization_id
|
|
116
121
|
return false unless @date == other.date
|
|
117
122
|
return false unless @external_product_id == other.external_product_id
|
|
118
123
|
return false unless @id == other.id
|
|
119
124
|
return false unless @tax_items == other.tax_items
|
|
125
|
+
return false unless @organization_id == other.organization_id
|
|
120
126
|
return false unless @external_id == other.external_id
|
|
121
127
|
return false unless @description == other.description
|
|
122
128
|
return false unless @product == other.product
|
|
123
129
|
return false unless @product_id == other.product_id
|
|
124
130
|
return false unless @product_name == other.product_name
|
|
125
131
|
return false unless @product_description == other.product_description
|
|
132
|
+
return false unless @quantity == other.quantity
|
|
133
|
+
return false unless @amount == other.amount
|
|
134
|
+
return false unless @tax_amount_imported == other.tax_amount_imported
|
|
135
|
+
return false unless @tax_rate_imported == other.tax_rate_imported
|
|
136
|
+
return false unless @tax_amount_calculated == other.tax_amount_calculated
|
|
137
|
+
return false unless @tax_rate_calculated == other.tax_rate_calculated
|
|
126
138
|
return false unless @original_currency == other.original_currency
|
|
127
139
|
return false unless @destination_currency == other.destination_currency
|
|
128
140
|
return false unless @converted_amount == other.converted_amount
|
|
@@ -131,17 +143,13 @@ module KintsugiSDK
|
|
|
131
143
|
return false unless @converted_tax_amount_calculated == other.converted_tax_amount_calculated
|
|
132
144
|
return false unless @converted_total_discount == other.converted_total_discount
|
|
133
145
|
return false unless @converted_subtotal == other.converted_subtotal
|
|
146
|
+
return false unless @taxable_amount == other.taxable_amount
|
|
134
147
|
return false unless @tax_exemption == other.tax_exemption
|
|
148
|
+
return false unless @exempt == other.exempt
|
|
135
149
|
return false unless @total_discount == other.total_discount
|
|
136
150
|
return false unless @subtotal == other.subtotal
|
|
137
|
-
return false unless @
|
|
138
|
-
return false unless @
|
|
139
|
-
return false unless @tax_amount_imported == other.tax_amount_imported
|
|
140
|
-
return false unless @tax_rate_imported == other.tax_rate_imported
|
|
141
|
-
return false unless @tax_amount_calculated == other.tax_amount_calculated
|
|
142
|
-
return false unless @tax_rate_calculated == other.tax_rate_calculated
|
|
143
|
-
return false unless @taxable_amount == other.taxable_amount
|
|
144
|
-
return false unless @exempt == other.exempt
|
|
151
|
+
return false unless @is_reverse_charge_self_accounted == other.is_reverse_charge_self_accounted
|
|
152
|
+
return false unless @recoverability_percent == other.recoverability_percent
|
|
145
153
|
true
|
|
146
154
|
end
|
|
147
155
|
end
|
|
@@ -8,8 +8,6 @@ end
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class KintsugiSDK::Models::Shared::TransactionItemRead
|
|
11
|
-
def organization_id(); end
|
|
12
|
-
def organization_id=(str_); end
|
|
13
11
|
def date(); end
|
|
14
12
|
def date=(str_); end
|
|
15
13
|
def external_product_id(); end
|
|
@@ -18,6 +16,8 @@ class KintsugiSDK::Models::Shared::TransactionItemRead
|
|
|
18
16
|
def id=(str_); end
|
|
19
17
|
def tax_items(); end
|
|
20
18
|
def tax_items=(str_); end
|
|
19
|
+
def organization_id(); end
|
|
20
|
+
def organization_id=(str_); end
|
|
21
21
|
def external_id(); end
|
|
22
22
|
def external_id=(str_); end
|
|
23
23
|
def description(); end
|
|
@@ -30,6 +30,18 @@ class KintsugiSDK::Models::Shared::TransactionItemRead
|
|
|
30
30
|
def product_name=(str_); end
|
|
31
31
|
def product_description(); end
|
|
32
32
|
def product_description=(str_); end
|
|
33
|
+
def quantity(); end
|
|
34
|
+
def quantity=(str_); end
|
|
35
|
+
def amount(); end
|
|
36
|
+
def amount=(str_); end
|
|
37
|
+
def tax_amount_imported(); end
|
|
38
|
+
def tax_amount_imported=(str_); end
|
|
39
|
+
def tax_rate_imported(); end
|
|
40
|
+
def tax_rate_imported=(str_); end
|
|
41
|
+
def tax_amount_calculated(); end
|
|
42
|
+
def tax_amount_calculated=(str_); end
|
|
43
|
+
def tax_rate_calculated(); end
|
|
44
|
+
def tax_rate_calculated=(str_); end
|
|
33
45
|
def original_currency(); end
|
|
34
46
|
def original_currency=(str_); end
|
|
35
47
|
def destination_currency(); end
|
|
@@ -46,26 +58,18 @@ class KintsugiSDK::Models::Shared::TransactionItemRead
|
|
|
46
58
|
def converted_total_discount=(str_); end
|
|
47
59
|
def converted_subtotal(); end
|
|
48
60
|
def converted_subtotal=(str_); end
|
|
61
|
+
def taxable_amount(); end
|
|
62
|
+
def taxable_amount=(str_); end
|
|
49
63
|
def tax_exemption(); end
|
|
50
64
|
def tax_exemption=(str_); end
|
|
65
|
+
def exempt(); end
|
|
66
|
+
def exempt=(str_); end
|
|
51
67
|
def total_discount(); end
|
|
52
68
|
def total_discount=(str_); end
|
|
53
69
|
def subtotal(); end
|
|
54
70
|
def subtotal=(str_); end
|
|
55
|
-
def
|
|
56
|
-
def
|
|
57
|
-
def
|
|
58
|
-
def
|
|
59
|
-
|
|
60
|
-
def tax_amount_imported=(str_); end
|
|
61
|
-
def tax_rate_imported(); end
|
|
62
|
-
def tax_rate_imported=(str_); end
|
|
63
|
-
def tax_amount_calculated(); end
|
|
64
|
-
def tax_amount_calculated=(str_); end
|
|
65
|
-
def tax_rate_calculated(); end
|
|
66
|
-
def tax_rate_calculated=(str_); end
|
|
67
|
-
def taxable_amount(); end
|
|
68
|
-
def taxable_amount=(str_); end
|
|
69
|
-
def exempt(); end
|
|
70
|
-
def exempt=(str_); end
|
|
71
|
-
end
|
|
71
|
+
def is_reverse_charge_self_accounted(); end
|
|
72
|
+
def is_reverse_charge_self_accounted=(str_); end
|
|
73
|
+
def recoverability_percent(); end
|
|
74
|
+
def recoverability_percent=(str_); end
|
|
75
|
+
end
|
|
@@ -25,28 +25,44 @@ module KintsugiSDK
|
|
|
25
25
|
|
|
26
26
|
field :transaction_items, Crystalline::Array.new(Models::Shared::TransactionItemBuilder), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('transaction_items'), required: true } }
|
|
27
27
|
|
|
28
|
-
field :customer, Models::Shared::CustomerBaseBase, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('customer'), required: true } }
|
|
28
|
+
field :customer, Crystalline::Union.new(Models::Shared::CustomerBaseBase, Models::Shared::TransactionImportCustomer), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('customer'), required: true } }
|
|
29
29
|
|
|
30
30
|
field :type, Models::Shared::TransactionTypeEnum, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('type'), required: true, 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionTypeEnum, false) } }
|
|
31
|
+
# Total amount of the transaction.
|
|
32
|
+
field :total_amount, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_amount') } }
|
|
33
|
+
# Imported tax amount.
|
|
34
|
+
field :total_tax_amount_imported, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_tax_amount_imported') } }
|
|
35
|
+
# Imported tax rate.
|
|
36
|
+
field :tax_rate_imported, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_imported') } }
|
|
37
|
+
# Calculated tax amount.
|
|
38
|
+
field :total_tax_amount_calculated, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_tax_amount_calculated') } }
|
|
39
|
+
# Calculated tax rate.
|
|
40
|
+
field :tax_rate_calculated, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_calculated') } }
|
|
41
|
+
# Total tax liability amount.
|
|
42
|
+
field :total_tax_liability_amount, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_tax_liability_amount') } }
|
|
43
|
+
# Taxable amount.
|
|
44
|
+
field :taxable_amount, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
|
|
45
|
+
|
|
46
|
+
field :currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
|
|
47
|
+
|
|
48
|
+
field :source, Crystalline::Nilable.new(Models::Shared::SourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('source'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::SourceEnum, true) } }
|
|
31
49
|
|
|
50
|
+
field :status, Crystalline::Nilable.new(Models::Shared::TransactionStatusEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('status'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionStatusEnum, true) } }
|
|
51
|
+
# Indicates if transaction requires tax exemption.
|
|
32
52
|
field :requires_exemption, Crystalline::Nilable.new(Models::Shared::ExemptionRequired), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('requires_exemption') } }
|
|
33
53
|
# Transaction date in the shop's local timezone
|
|
34
|
-
field :shop_date, Crystalline::Nilable.new(::
|
|
54
|
+
field :shop_date, Crystalline::Nilable.new(::Date), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('shop_date'), 'decoder': ::KintsugiSDK::Utils.date_from_iso_format(true) } }
|
|
35
55
|
# Timezone of the shop
|
|
36
56
|
field :shop_date_tz, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('shop_date_tz') } }
|
|
37
57
|
# Description of the transaction.
|
|
38
58
|
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('description') } }
|
|
39
|
-
#
|
|
40
|
-
# If the given order has different status from these 2, we will set the
|
|
41
|
-
# transaction's refund_status to PARTIALLY_REFUNDED by default.
|
|
59
|
+
# Status of refund, if applicable
|
|
42
60
|
field :refund_status, Crystalline::Nilable.new(Models::Shared::TransactionRefundStatus), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('refund_status'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionRefundStatus, true) } }
|
|
43
61
|
# Unique identifier of the customer.
|
|
44
62
|
field :customer_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('customer_id') } }
|
|
45
|
-
#
|
|
46
|
-
|
|
47
|
-
#
|
|
48
|
-
# FULLY_EXEMPT: All items sold in the transaction are EXEMPT
|
|
49
|
-
# ZERO_RATE_NOT_EXEMPT: All items sold in the transaction are zero-rated
|
|
63
|
+
# Indicates if transaction is marketplace-based.
|
|
64
|
+
field :marketplace, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('marketplace') } }
|
|
65
|
+
# Exemption status (e.g., NOT_EXEMPT)
|
|
50
66
|
field :exempt, Crystalline::Nilable.new(Models::Shared::TransactionExemptStatusEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionExemptStatusEnum, true) } }
|
|
51
67
|
# List of exemptions applied (if any).
|
|
52
68
|
field :exemptions, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::Exemption)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exemptions') } }
|
|
@@ -58,12 +74,10 @@ module KintsugiSDK
|
|
|
58
74
|
field :secondary_source, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('secondary_source') } }
|
|
59
75
|
# Friendly identifier of the original item.
|
|
60
76
|
field :external_friendly_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_friendly_id') } }
|
|
61
|
-
|
|
77
|
+
# Source of tax liability.
|
|
62
78
|
field :tax_liability_source, Crystalline::Nilable.new(Models::Shared::TaxLiabilitySourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_liability_source'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TaxLiabilitySourceEnum, true) } }
|
|
63
|
-
|
|
64
|
-
field :
|
|
65
|
-
|
|
66
|
-
field :source, Crystalline::Nilable.new(Models::Shared::SourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('source'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::SourceEnum, true) } }
|
|
79
|
+
# Transaction lock status.
|
|
80
|
+
field :locked, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('locked') } }
|
|
67
81
|
# Connection Identifier
|
|
68
82
|
field :connection_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('connection_id') } }
|
|
69
83
|
# Filing identifier.
|
|
@@ -74,7 +88,7 @@ module KintsugiSDK
|
|
|
74
88
|
field :county, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('county') } }
|
|
75
89
|
# State of the transaction address.
|
|
76
90
|
field :state, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('state') } }
|
|
77
|
-
|
|
91
|
+
# Country code (ISO Alpha-2).
|
|
78
92
|
field :country, Crystalline::Nilable.new(Models::Shared::CountryCodeEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('country'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CountryCodeEnum, true) } }
|
|
79
93
|
# Postal code of the transaction.
|
|
80
94
|
field :postal_code, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('postal_code') } }
|
|
@@ -82,29 +96,13 @@ module KintsugiSDK
|
|
|
82
96
|
#
|
|
83
97
|
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
84
98
|
field :tax_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_id') } }
|
|
99
|
+
# Document type distinguishing invoices from sales orders.
|
|
100
|
+
field :document_type, Crystalline::Nilable.new(Models::Shared::DocumentTypeEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('document_type'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::DocumentTypeEnum, true) } }
|
|
101
|
+
# Identifier of the invoice that created from a sales order.
|
|
102
|
+
field :created_from, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('created_from') } }
|
|
85
103
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
field :total_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_amount') } }
|
|
89
|
-
# Indicates if transaction is marketplace-based.
|
|
90
|
-
field :marketplace, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('marketplace') } }
|
|
91
|
-
# Imported tax amount.
|
|
92
|
-
field :total_tax_amount_imported, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_tax_amount_imported') } }
|
|
93
|
-
# Imported tax rate.
|
|
94
|
-
field :tax_rate_imported, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_imported') } }
|
|
95
|
-
# Calculated tax amount.
|
|
96
|
-
field :total_tax_amount_calculated, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_tax_amount_calculated') } }
|
|
97
|
-
# Calculated tax rate.
|
|
98
|
-
field :tax_rate_calculated, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_calculated') } }
|
|
99
|
-
# Total tax liability amount.
|
|
100
|
-
field :total_tax_liability_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_tax_liability_amount') } }
|
|
101
|
-
# Taxable amount.
|
|
102
|
-
field :taxable_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
|
|
103
|
-
# Transaction lock status.
|
|
104
|
-
field :locked, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('locked') } }
|
|
105
|
-
|
|
106
|
-
sig { params(organization_id: ::String, external_id: ::String, date: ::DateTime, addresses: T::Array[Models::Shared::TransactionAddressPublic], transaction_items: T::Array[Models::Shared::TransactionItemBuilder], customer: Models::Shared::CustomerBaseBase, type: Models::Shared::TransactionTypeEnum, requires_exemption: T.nilable(Models::Shared::ExemptionRequired), shop_date: T.nilable(::String), shop_date_tz: T.nilable(::String), description: T.nilable(::String), refund_status: T.nilable(Models::Shared::TransactionRefundStatus), customer_id: T.nilable(::String), exempt: T.nilable(Models::Shared::TransactionExemptStatusEnum), exemptions: T.nilable(T::Array[Models::Shared::Exemption]), related_to: T.nilable(::String), secondary_external_id: T.nilable(::String), secondary_source: T.nilable(::String), external_friendly_id: T.nilable(::String), tax_liability_source: T.nilable(Models::Shared::TaxLiabilitySourceEnum), currency: T.nilable(Models::Shared::CurrencyEnum), source: T.nilable(Models::Shared::SourceEnum), connection_id: T.nilable(::String), filing_id: T.nilable(::String), city: T.nilable(::String), county: T.nilable(::String), state: T.nilable(::String), country: T.nilable(Models::Shared::CountryCodeEnum), postal_code: T.nilable(::String), tax_id: T.nilable(::String), status: T.nilable(Models::Shared::TransactionStatusEnum), total_amount: T.nilable(::Float), marketplace: T.nilable(T::Boolean), total_tax_amount_imported: T.nilable(::Float), tax_rate_imported: T.nilable(::Float), total_tax_amount_calculated: T.nilable(::Float), tax_rate_calculated: T.nilable(::Float), total_tax_liability_amount: T.nilable(::Float), taxable_amount: T.nilable(::Float), locked: T.nilable(T::Boolean)).void }
|
|
107
|
-
def initialize(organization_id:, external_id:, date:, addresses:, transaction_items:, customer:, type:, requires_exemption: nil, shop_date: nil, shop_date_tz: nil, description: nil, refund_status: nil, customer_id: nil, exempt: nil, exemptions: nil, related_to: nil, secondary_external_id: nil, secondary_source: nil, external_friendly_id: nil, tax_liability_source: nil, currency: nil, source: nil, connection_id: nil, filing_id: nil, city: nil, county: nil, state: nil, country: nil, postal_code: nil, tax_id: nil, status: nil, total_amount: 0.0, marketplace: false, total_tax_amount_imported: 0.0, tax_rate_imported: 0.0, total_tax_amount_calculated: 0.0, tax_rate_calculated: 0.0, total_tax_liability_amount: 0.0, taxable_amount: 0.0, locked: false)
|
|
104
|
+
sig { params(organization_id: ::String, external_id: ::String, date: ::DateTime, addresses: T::Array[Models::Shared::TransactionAddressPublic], transaction_items: T::Array[Models::Shared::TransactionItemBuilder], customer: T.any(Models::Shared::CustomerBaseBase, Models::Shared::TransactionImportCustomer), type: Models::Shared::TransactionTypeEnum, total_amount: T.nilable(T.any(::Float, ::String)), total_tax_amount_imported: T.nilable(T.any(::Float, ::String)), tax_rate_imported: T.nilable(T.any(::Float, ::String)), total_tax_amount_calculated: T.nilable(T.any(::Float, ::String)), tax_rate_calculated: T.nilable(T.any(::Float, ::String)), total_tax_liability_amount: T.nilable(T.any(::Float, ::String)), taxable_amount: T.nilable(T.any(::Float, ::String)), currency: T.nilable(Models::Shared::CurrencyEnum), source: T.nilable(Models::Shared::SourceEnum), status: T.nilable(Models::Shared::TransactionStatusEnum), requires_exemption: T.nilable(Models::Shared::ExemptionRequired), shop_date: T.nilable(::Date), shop_date_tz: T.nilable(::String), description: T.nilable(::String), refund_status: T.nilable(Models::Shared::TransactionRefundStatus), customer_id: T.nilable(::String), marketplace: T.nilable(T::Boolean), exempt: T.nilable(Models::Shared::TransactionExemptStatusEnum), exemptions: T.nilable(T::Array[Models::Shared::Exemption]), related_to: T.nilable(::String), secondary_external_id: T.nilable(::String), secondary_source: T.nilable(::String), external_friendly_id: T.nilable(::String), tax_liability_source: T.nilable(Models::Shared::TaxLiabilitySourceEnum), locked: T.nilable(T::Boolean), connection_id: T.nilable(::String), filing_id: T.nilable(::String), city: T.nilable(::String), county: T.nilable(::String), state: T.nilable(::String), country: T.nilable(Models::Shared::CountryCodeEnum), postal_code: T.nilable(::String), tax_id: T.nilable(::String), document_type: T.nilable(Models::Shared::DocumentTypeEnum), created_from: T.nilable(::String)).void }
|
|
105
|
+
def initialize(organization_id:, external_id:, date:, addresses:, transaction_items:, customer:, type:, total_amount: nil, total_tax_amount_imported: nil, tax_rate_imported: nil, total_tax_amount_calculated: nil, tax_rate_calculated: nil, total_tax_liability_amount: nil, taxable_amount: nil, currency: nil, source: nil, status: nil, requires_exemption: nil, shop_date: nil, shop_date_tz: nil, description: nil, refund_status: nil, customer_id: nil, marketplace: nil, exempt: nil, exemptions: nil, related_to: nil, secondary_external_id: nil, secondary_source: nil, external_friendly_id: nil, tax_liability_source: nil, locked: false, connection_id: nil, filing_id: nil, city: nil, county: nil, state: nil, country: nil, postal_code: nil, tax_id: nil, document_type: nil, created_from: nil)
|
|
108
106
|
@organization_id = organization_id
|
|
109
107
|
@external_id = external_id
|
|
110
108
|
@date = date
|
|
@@ -112,12 +110,23 @@ module KintsugiSDK
|
|
|
112
110
|
@transaction_items = transaction_items
|
|
113
111
|
@customer = customer
|
|
114
112
|
@type = type
|
|
113
|
+
@total_amount = total_amount
|
|
114
|
+
@total_tax_amount_imported = total_tax_amount_imported
|
|
115
|
+
@tax_rate_imported = tax_rate_imported
|
|
116
|
+
@total_tax_amount_calculated = total_tax_amount_calculated
|
|
117
|
+
@tax_rate_calculated = tax_rate_calculated
|
|
118
|
+
@total_tax_liability_amount = total_tax_liability_amount
|
|
119
|
+
@taxable_amount = taxable_amount
|
|
120
|
+
@currency = currency
|
|
121
|
+
@source = source
|
|
122
|
+
@status = status
|
|
115
123
|
@requires_exemption = requires_exemption
|
|
116
124
|
@shop_date = shop_date
|
|
117
125
|
@shop_date_tz = shop_date_tz
|
|
118
126
|
@description = description
|
|
119
127
|
@refund_status = refund_status
|
|
120
128
|
@customer_id = customer_id
|
|
129
|
+
@marketplace = marketplace
|
|
121
130
|
@exempt = exempt
|
|
122
131
|
@exemptions = exemptions
|
|
123
132
|
@related_to = related_to
|
|
@@ -125,8 +134,7 @@ module KintsugiSDK
|
|
|
125
134
|
@secondary_source = secondary_source
|
|
126
135
|
@external_friendly_id = external_friendly_id
|
|
127
136
|
@tax_liability_source = tax_liability_source
|
|
128
|
-
@
|
|
129
|
-
@source = source
|
|
137
|
+
@locked = locked
|
|
130
138
|
@connection_id = connection_id
|
|
131
139
|
@filing_id = filing_id
|
|
132
140
|
@city = city
|
|
@@ -135,16 +143,8 @@ module KintsugiSDK
|
|
|
135
143
|
@country = country
|
|
136
144
|
@postal_code = postal_code
|
|
137
145
|
@tax_id = tax_id
|
|
138
|
-
@
|
|
139
|
-
@
|
|
140
|
-
@marketplace = marketplace
|
|
141
|
-
@total_tax_amount_imported = total_tax_amount_imported
|
|
142
|
-
@tax_rate_imported = tax_rate_imported
|
|
143
|
-
@total_tax_amount_calculated = total_tax_amount_calculated
|
|
144
|
-
@tax_rate_calculated = tax_rate_calculated
|
|
145
|
-
@total_tax_liability_amount = total_tax_liability_amount
|
|
146
|
-
@taxable_amount = taxable_amount
|
|
147
|
-
@locked = locked
|
|
146
|
+
@document_type = document_type
|
|
147
|
+
@created_from = created_from
|
|
148
148
|
end
|
|
149
149
|
|
|
150
150
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -157,12 +157,23 @@ module KintsugiSDK
|
|
|
157
157
|
return false unless @transaction_items == other.transaction_items
|
|
158
158
|
return false unless @customer == other.customer
|
|
159
159
|
return false unless @type == other.type
|
|
160
|
+
return false unless @total_amount == other.total_amount
|
|
161
|
+
return false unless @total_tax_amount_imported == other.total_tax_amount_imported
|
|
162
|
+
return false unless @tax_rate_imported == other.tax_rate_imported
|
|
163
|
+
return false unless @total_tax_amount_calculated == other.total_tax_amount_calculated
|
|
164
|
+
return false unless @tax_rate_calculated == other.tax_rate_calculated
|
|
165
|
+
return false unless @total_tax_liability_amount == other.total_tax_liability_amount
|
|
166
|
+
return false unless @taxable_amount == other.taxable_amount
|
|
167
|
+
return false unless @currency == other.currency
|
|
168
|
+
return false unless @source == other.source
|
|
169
|
+
return false unless @status == other.status
|
|
160
170
|
return false unless @requires_exemption == other.requires_exemption
|
|
161
171
|
return false unless @shop_date == other.shop_date
|
|
162
172
|
return false unless @shop_date_tz == other.shop_date_tz
|
|
163
173
|
return false unless @description == other.description
|
|
164
174
|
return false unless @refund_status == other.refund_status
|
|
165
175
|
return false unless @customer_id == other.customer_id
|
|
176
|
+
return false unless @marketplace == other.marketplace
|
|
166
177
|
return false unless @exempt == other.exempt
|
|
167
178
|
return false unless @exemptions == other.exemptions
|
|
168
179
|
return false unless @related_to == other.related_to
|
|
@@ -170,8 +181,7 @@ module KintsugiSDK
|
|
|
170
181
|
return false unless @secondary_source == other.secondary_source
|
|
171
182
|
return false unless @external_friendly_id == other.external_friendly_id
|
|
172
183
|
return false unless @tax_liability_source == other.tax_liability_source
|
|
173
|
-
return false unless @
|
|
174
|
-
return false unless @source == other.source
|
|
184
|
+
return false unless @locked == other.locked
|
|
175
185
|
return false unless @connection_id == other.connection_id
|
|
176
186
|
return false unless @filing_id == other.filing_id
|
|
177
187
|
return false unless @city == other.city
|
|
@@ -180,16 +190,8 @@ module KintsugiSDK
|
|
|
180
190
|
return false unless @country == other.country
|
|
181
191
|
return false unless @postal_code == other.postal_code
|
|
182
192
|
return false unless @tax_id == other.tax_id
|
|
183
|
-
return false unless @
|
|
184
|
-
return false unless @
|
|
185
|
-
return false unless @marketplace == other.marketplace
|
|
186
|
-
return false unless @total_tax_amount_imported == other.total_tax_amount_imported
|
|
187
|
-
return false unless @tax_rate_imported == other.tax_rate_imported
|
|
188
|
-
return false unless @total_tax_amount_calculated == other.total_tax_amount_calculated
|
|
189
|
-
return false unless @tax_rate_calculated == other.tax_rate_calculated
|
|
190
|
-
return false unless @total_tax_liability_amount == other.total_tax_liability_amount
|
|
191
|
-
return false unless @taxable_amount == other.taxable_amount
|
|
192
|
-
return false unless @locked == other.locked
|
|
193
|
+
return false unless @document_type == other.document_type
|
|
194
|
+
return false unless @created_from == other.created_from
|
|
193
195
|
true
|
|
194
196
|
end
|
|
195
197
|
end
|