Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(export invoices): extend GET /invoices by amount and metadata #318

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 25 additions & 1 deletion src/resources/invoices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ get:
- $ref: '../parameters/page.yaml'
- $ref: '../parameters/per_page.yaml'
- $ref: '../parameters/external_customer_id.yaml'
- name: amount_from
in: query
description: Filter invoices of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
required: false
explode: true
schema:
type: integer
example: 9000
- name: amount_to
in: query
description: Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
required: false
explode: true
schema:
type: integer
example: 100000
- name: issuing_date_from
in: query
description: Filter invoices starting from a specific date.
Expand Down Expand Up @@ -118,6 +134,14 @@ get:
- credit
- one_off
- advance_charges
- name: metadata[key]
in: query
description: Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. For example, `metadata[color]=blue`.
required: false
explode: true
schema:
type: string
example: "someValue"
responses:
'200':
description: Invoices
Expand All @@ -126,4 +150,4 @@ get:
schema:
$ref: '../schemas/InvoicesPaginated.yaml'
'401':
$ref: '../responses/Unauthorized.yaml'
$ref: '../responses/Unauthorized.yaml'
Loading