Skip to content

Commit

Permalink
Merge pull request #61 from chargebee/chore/TAXENGG-2952
Browse files Browse the repository at this point in the history
Release items for Release 0.0.12
  • Loading branch information
cb-suryak authored Dec 9, 2024
2 parents 33df993 + 5ad8927 commit 98b81c0
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
uses: chargebee/cb-cicd-pipelines/.github/workflows/[email protected]
secrets: inherit
with:
CI_ROLE: arn:aws:iam::606027973764:role/cb-builds-us-e1-cb_provider_spi-ci-role
GENERATE_OPEN_API: true
CI_ROLE: ${{secrets.CI_ROLE}}
GENERATE_OPEN_API: true
15 changes: 4 additions & 11 deletions spec/spi/openapi_location_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ paths:
'503':
$ref: './schemas/errors.yml#/components/responses/Error503'
components:
securitySchemes:
Authorization:
$ref: './schemas/headers.yml#/components/securitySchemes/Authorization'
schemas:
LocationValidationEvidence:
type: object
Expand Down Expand Up @@ -273,15 +276,5 @@ components:
phone: IN
taxRegistrationNumber: FR
address: US
securitySchemes:
bearerAuth:
type: http
scheme: bearer
apiKey:
type: apiKey
description: Bearer token based authentication.
name: bearer
in: header
security:
- bearerAuth: []
- apiKey: []
- Authorization: []
42 changes: 31 additions & 11 deletions spec/spi/openapi_tax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ paths:
summary: Estimate tax
description: "This endpoint is used to estimate taxes for a set of line items being sold by the Merchant to a Customer."
operationId: estimateTaxes
parameters:
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
requestBody:
content:
application/json:
Expand Down Expand Up @@ -135,6 +138,9 @@ paths:
summary: Create Invoice
description: "This endpoint is used to send an invoice to the Tax Service Provider. Invoices created in Chargebee are statements of amounts owed by the Customer to the Merchant for a specific purchase."
operationId: createInvoice
parameters:
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
requestBody:
content:
application/json:
Expand Down Expand Up @@ -180,6 +186,8 @@ paths:
operationId: fetchInvoice
parameters:
- $ref: '#/components/parameters/InvoiceIdPathParam'
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
responses:
'200':
description: "Invoice retrieved successfully."
Expand Down Expand Up @@ -208,6 +216,8 @@ paths:
operationId: commitInvoice
parameters:
- $ref: '#/components/parameters/InvoiceIdPathParam'
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
responses:
'204':
description: "Invoice committed successfully."
Expand All @@ -232,6 +242,8 @@ paths:
operationId: voidInvoice
parameters:
- $ref: '#/components/parameters/InvoiceIdPathParam'
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
responses:
'204':
description: Invoice voided successfully.
Expand All @@ -254,6 +266,9 @@ paths:
summary: "Create credit note"
description: "This endpoint is used to send a credit note to the Tax Service Adapter. A credit note is used to reduce the amount due on an invoice. If the credit note is issued after payments have been made for the invoice, refunds can be issued to the Customer."
operationId: createCreditNote
parameters:
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
requestBody:
content:
application/json:
Expand Down Expand Up @@ -298,6 +313,8 @@ paths:
parameters:
- $ref: '#/components/parameters/CreditNoteIdPathParam'
- $ref: '#/components/parameters/InvoiceIdQueryParam'
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
responses:
'200':
description: "Credit note retrieved successfully."
Expand Down Expand Up @@ -327,6 +344,8 @@ paths:
parameters:
- $ref: '#/components/parameters/CreditNoteIdPathParam'
- $ref: '#/components/parameters/InvoiceIdQueryParam'
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
responses:
'204':
description: Credit note committed successfully.
Expand All @@ -352,6 +371,8 @@ paths:
parameters:
- $ref: '#/components/parameters/CreditNoteIdPathParam'
- $ref: '#/components/parameters/InvoiceIdQueryParam'
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
responses:
'204':
description: "Credit note voided successfully."
Expand All @@ -374,6 +395,9 @@ paths:
operationId: validateAddress
tags:
- Address
parameters:
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
requestBody:
content:
application/json:
Expand Down Expand Up @@ -424,6 +448,9 @@ paths:
operationId: checkAddressTaxability
tags:
- Address
parameters:
- $ref: './schemas/headers.yml#/components/parameters/MerchantId'
- $ref: './schemas/headers.yml#/components/parameters/TraceId'
requestBody:
content:
application/json:
Expand Down Expand Up @@ -484,6 +511,9 @@ paths:
'503':
$ref: './schemas/errors.yml#/components/responses/Error503'
components:
securitySchemes:
Authorization:
$ref: './schemas/headers.yml#/components/securitySchemes/Authorization'
schemas:
TaxEstimationRequest:
type: object
Expand Down Expand Up @@ -2617,15 +2647,5 @@ components:
code: INVALID_REQUEST
message: Invalid Merchant id.
detail: Please provide a valid merchant id.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
apiKey:
type: apiKey
description: Bearer token based authentication.
name: bearer
in: header
security:
- bearerAuth: []
- apiKey: []
- Authorization: []
16 changes: 4 additions & 12 deletions spec/spi/openapi_trn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ paths:
'503':
$ref: './schemas/errors.yml#/components/responses/Error503'
components:
securitySchemes:
Authorization:
$ref: './schemas/headers.yml#/components/securitySchemes/Authorization'
schemas:
TrnValidateRequest:
type: object
Expand Down Expand Up @@ -527,16 +530,5 @@ components:
value:
batchId: qwerty12345
message: successfully deleted

securitySchemes:
bearerAuth:
type: http
scheme: bearer
apiKey:
type: apiKey
description: Bearer token based authentication.
name: bearer
in: header
security:
- bearerAuth: []
- apiKey: []
- Authorization: []
3 changes: 3 additions & 0 deletions spec/spi/paths/credentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ post:
operationId: validateCredentials
tags:
- Authentication
parameters:
- $ref: '../schemas/headers.yml#/components/parameters/MerchantId'
- $ref: '../schemas/headers.yml#/components/parameters/TraceId'
responses:
'200':
description: Authentication succeeded.
Expand Down
5 changes: 3 additions & 2 deletions spec/spi/paths/health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ get:
tags:
- Health
# NOTE: No security scheme for the health endpoint.
security:
- { }
parameters:
- $ref: '../schemas/headers.yml#/components/parameters/MerchantId'
- $ref: '../schemas/headers.yml#/components/parameters/TraceId'
responses:
'200':
description: Service is healthy.
Expand Down
22 changes: 22 additions & 0 deletions spec/spi/schemas/headers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
components:
parameters:
TraceId:
in: header
name: trace_id
required: false
description: Unique id of the request will be sent by Chargebee
schema:
type: string
MerchantId:
in: header
name: merchant_id
required: false
description: Merchant's domain name will be sent by Chargebee
schema:
type: string
securitySchemes:
Authorization:
type: apiKey
in: header
name: Authorization
description: The json of all the parameters specified in authentication configuration of tax app will be sent by Chargebee.

0 comments on commit 98b81c0

Please sign in to comment.