Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
feat: Add ability to retrieve payment terms using external id
Browse files Browse the repository at this point in the history
  • Loading branch information
warmwaffles committed Aug 23, 2024
1 parent c01d008 commit b837951
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `POST - /v0/purchaseOrders/synchronize` to synchronize Purchase Orders.
- Add `POST - /v0/vatCodes/synchronize` to synchronize Vat Codes.
- Add `POST - /v0/vendors/synchronize` to synchronize Vendors.

- Add `GET - /v0/paymentTerms/{id}` to fetch a payment term using the internal
id or external id if `useSystem=external` is passed.
- Add support for `useSystem=external` for `updatePaymentTerm` and
`deletePaymentTerm`.

## v0.21.0

Expand Down
30 changes: 28 additions & 2 deletions vic.api.v0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1774,14 +1774,37 @@ paths:
'4XX':
$ref: '#/components/responses/ErrorResponse'
/paymentTerms/{id}:
get:
description: |
Get a payment term.
You may use the `externalId` in the, but must pass `useSystem=external`
in order to fetch the payment term.
summary: Get a payment term
operationId: getPaymentTerm
tags: [Payment terms]
parameters:
- $ref: '#/components/parameters/PathId'
- $ref: '#/components/parameters/UseSystem'
responses:
'200':
$ref: '#/components/responses/PaymentTermResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/ResourceNotFoundResponse'
put:
description: |
Update a payment term.
You may use the `externalId` in the, but must pass `useSystem=external`
in order to fetch the payment term. You are permitted to update the
`externalId` as well when updating the payment term. Leaving it
unspecified **WILL** clear the `externalId`.
summary: Update a payment term
operationId: updatePaymentTerm
tags: [Payment terms]
parameters:
- $ref: '#/components/parameters/PaymentTermId'
- $ref: '#/components/parameters/PathId'
- $ref: '#/components/parameters/UseSystem'
requestBody:
$ref: '#/components/requestBodies/UpdatePaymentTermRequest'
responses:
Expand All @@ -1794,11 +1817,14 @@ paths:
delete:
description: |
Delete a payment term.
You may use the `externalId` in the, but must pass `useSystem=external`
in order to fetch the payment term.
summary: Delete a payment term
operationId: deletePaymentTerm
tags: [Payment terms]
parameters:
- $ref: '#/components/parameters/PaymentTermId'
- $ref: '#/components/parameters/PathId'
- $ref: '#/components/parameters/UseSystem'
responses:
'204':
$ref: '#/components/responses/PaymentTermDeletedResponse'
Expand Down

0 comments on commit b837951

Please sign in to comment.