diff --git a/gradle.properties b/gradle.properties index 51023b8..ea2860f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ sonar_project_key=chargebee_cb-provider-spi build_project_name=cb-provider-spi build_group=org.chargebee.spi -build_version=0.0.7 +build_version=0.0.8-SNAPSHOT # Artifactory config to be controlled at build time by CI/CD artifactory_build_url=https://artifactory.url/maven/build artifactory_publish_url=https://artifactory.url/maven/publish diff --git a/spec/spi/openapi_tax.yml b/spec/spi/openapi_tax.yml index 290efbd..e8ec886 100644 --- a/spec/spi/openapi_tax.yml +++ b/spec/spi/openapi_tax.yml @@ -96,6 +96,8 @@ paths: $ref: '#/components/examples/TaxEstimationRequestWithLineItemDiscount' TaxEstimationRequestWithCustomerExemption: $ref: '#/components/examples/TaxEstimationRequestWithCustomerExemption' + TaxEstimationRequestWithLocationEvidence: + $ref: '#/components/examples/TaxEstimationRequestWithLocationEvidence' responses: '200': description: "Tax estimated successfully for given line items." @@ -143,6 +145,8 @@ paths: $ref: '#/components/examples/InvoiceRequestSimple' InvoiceRequestWithTaxInclusive: $ref: '#/components/examples/InvoiceRequestWithTaxInclusive' + InvoiceRequestWithLocationEvidence: + $ref: '#/components/examples/InvoiceRequestWithLocationEvidence' responses: '201': description: "Invoice created successfully." @@ -1100,6 +1104,8 @@ components: hasNexus: type: boolean description: "Determines whether a tax nexus exists between the Seller and the tax authority at the address provided." + locationEvidence: + $ref: '#/components/schemas/CustomerLocationEvidence' CreditNoteType: type: string description: "Whether the credit note was created for the full amount on the invoice or only for a part of the invoice amount." @@ -1249,6 +1255,22 @@ components: type: string description: The country of the address following the ISO 3166-1 alpha-2 standard. maxLength: 2 + CustomerLocationEvidence: + type: object + description: Represent the properties for customer location evidence. + properties: + ip: + type: string + description: The customer's IP to determine which country the customer belongs to. + maxLength: 50 + bin: + type: string + description: The country associated with a card by using the first or last 6 digits of the Bank Identification Number. + maxLength: 15 + paymentCountryCode: + type: string + description: Identifies the country code associated with the payment method. + maxLength: 5 BasicErrorResponse: type: object description: The basic error response containing the error message and the help documentation link. @@ -1705,6 +1727,44 @@ components: taxIdentifiers: - id: taxCode value: PT12312 + TaxEstimationRequestWithLocationEvidence: + description: A sample tax estimation request with location evidences. + value: + seller: + address: + line1: 412 63rd South Avenue + city: Baltimore + state: MD + country: US + postalCode: '21230' + customer: + name: John Doe + customerCode: customer_test + address: + line1: 59, Starlight Avenue + city: Newark + state: NJ + country: US + postalCode: '98712' + taxIdentifiers: + - id: exemptionCode + value: ex_gg1s2149812312 + locationEvidence: + ip: 127.0.0.1 + bin: 457200 + paymentCountryCode: US + estimateDateTime: '2022-11-01T10:42:08.131+05:30' + currency: USD + lineItems: + - number: 1 + itemCode: cbWatch + description: A winding watch. + quantity: 1 + amount: 110 + isTaxInclusive: false + taxIdentifiers: + - id: taxCode + value: PT12312 TaxEstimationResponseWithCustomerExemption: description: A sample response to the tax estimation request for a tax-exempt customer using an exemption code. value: @@ -1981,6 +2041,83 @@ components: rate: 0.375 taxableAmount: 91.85 taxAmount: 0.34 + InvoiceRequestWithLocationEvidence: + description: A request to create a simple invoice in the tax provider system with location evidence. + value: + invoiceCode: inv_12345 + documentDateTime: 2024-06-07T11:42:08.131+05:30 + currency: USD + seller: + address: + line1: 412 63rd South Avenue + city: Baltimore + state: MD + country: US + postalCode: "21230" + customer: + name: John Doe + customerCode: customer_test + address: + line1: "20 W 34th St" + city: New York + state: NY + country: US + postalCode: "10001" + locationEvidence: + ip: 127.0.0.1 + bin: 457200 + paymentCountryCode: US + subtotal: 91.85 + exemptAmount: 0 + discountAmount: 0 + taxableAmount: 91.85 + taxAmount: 8.15 + total: 100 + lineItems: + - number: 1 + itemCode: cbWatch + description: A winding watch. + quantity: 1 + amount: 100 + isTaxInclusive: true + isTaxable: true + taxIdentifiers: + - id: taxCode + value: PT12312 + discountAmount: 0 + subtotal: 100 + exemptAmount: 0 + taxableAmount: 91.85 + taxAmount: 8.15 + total: 100 + taxes: + - number: 1 + jurisdiction: + code: "24354" + type: STATE + name: NEW YORK + name: SELLER_USE + rate: 4 + taxableAmount: 91.85 + taxAmount: 3.67 + - number: 2 + jurisdiction: + code: "25353" + type: CITY + name: NEW YORK + name: SELLER_USE + rate: 4.5 + taxableAmount: 91.85 + taxAmount: 4.14 + - number: 3 + jurisdiction: + code: "79774" + type: OTHER + name: METROPOLITAN COMMUTER TRANSPORTATION DISTRICT + name: SELLER_USE + rate: 0.375 + taxableAmount: 91.85 + taxAmount: 0.34 InvoiceResponseWithTaxInclusive: description: A simple invoice in the tax provider system with tax inclusive. value: