You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* adding list invoices api
* making request params optional
* optional invoice id
* openapi for invoices
* removing unused struct
* billing as its own service
* adding service summary
description: "The search section provides you APIs that can be used to implement powerful apps with search experiences. You can manage storing documents on your own or you can simply integrate it with your database."
74
+
}, {
75
+
name: "Billing"
76
+
description: "The billing section provides APIs for managing invoices and payments infrastructure."
Copy file name to clipboardExpand all lines: server/v1/openapi.yaml
+157Lines changed: 157 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -150,6 +150,67 @@ paths:
150
150
application/json:
151
151
schema:
152
152
$ref: '#/components/schemas/Status'
153
+
/v1/billing/invoices:
154
+
get:
155
+
tags:
156
+
- Billing
157
+
summary: Lists all invoices for the user
158
+
description: ListInvoices fetches past invoices for this user
159
+
operationId: Billing_ListInvoices
160
+
parameters:
161
+
- name: starting_on.seconds
162
+
in: query
163
+
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
164
+
schema:
165
+
type: integer
166
+
format: int64
167
+
- name: starting_on.nanos
168
+
in: query
169
+
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
170
+
schema:
171
+
type: integer
172
+
format: int32
173
+
- name: ending_before.seconds
174
+
in: query
175
+
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
176
+
schema:
177
+
type: integer
178
+
format: int64
179
+
- name: ending_before.nanos
180
+
in: query
181
+
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
182
+
schema:
183
+
type: integer
184
+
format: int32
185
+
- name: invoice_id
186
+
in: query
187
+
description: optionally filter by a specific invoice_id
188
+
schema:
189
+
type: string
190
+
- name: page_size
191
+
in: query
192
+
description: maximum number of items to include in result set
193
+
schema:
194
+
type: integer
195
+
format: int32
196
+
- name: next_page
197
+
in: query
198
+
description: pagination token for fetching a particular result page, first page will be fetched if `null`
199
+
schema:
200
+
type: string
201
+
responses:
202
+
"200":
203
+
description: OK
204
+
content:
205
+
application/json:
206
+
schema:
207
+
$ref: '#/components/schemas/ListInvoicesResponse'
208
+
default:
209
+
description: Default error response
210
+
content:
211
+
application/json:
212
+
schema:
213
+
$ref: '#/components/schemas/Status'
153
214
/v1/health:
154
215
get:
155
216
tags:
@@ -2734,6 +2795,39 @@ components:
2734
2795
properties:
2735
2796
channel:
2736
2797
type: string
2798
+
Charge:
2799
+
type: object
2800
+
properties:
2801
+
name:
2802
+
type: string
2803
+
description: Charge name
2804
+
quantity:
2805
+
type: number
2806
+
format: float
2807
+
subtotal:
2808
+
type: number
2809
+
format: float
2810
+
tiers:
2811
+
type: array
2812
+
items:
2813
+
$ref: '#/components/schemas/ChargeTier'
2814
+
description: Tiered charges, if any
2815
+
ChargeTier:
2816
+
type: object
2817
+
properties:
2818
+
starting_at:
2819
+
type: number
2820
+
description: Starting point where this Tier is applicable. Ex - A charge could be tiered as "Tier 1 (0-5)", "Tier 2 (5-10)"; starting_at will be 0, 5 etc.
2821
+
format: float
2822
+
quantity:
2823
+
type: number
2824
+
format: float
2825
+
price:
2826
+
type: number
2827
+
format: float
2828
+
subtotal:
2829
+
type: number
2830
+
format: float
2737
2831
Collation:
2738
2832
type: object
2739
2833
properties:
@@ -3725,6 +3819,55 @@ components:
3725
3819
invitation_sent_by_name:
3726
3820
type: string
3727
3821
description: Invitation sender name
3822
+
Invoice:
3823
+
type: object
3824
+
properties:
3825
+
id:
3826
+
type: string
3827
+
description: unique identifier for this invoice
3828
+
entries:
3829
+
type: array
3830
+
items:
3831
+
$ref: '#/components/schemas/InvoiceLineItem'
3832
+
description: entries that make up the invoice
3833
+
start_time:
3834
+
type: string
3835
+
description: RFC 3339 starting time for usage period during which items were added to this invoice
3836
+
format: date-time
3837
+
end_time:
3838
+
type: string
3839
+
description: RFC 3339 ending time for usage period during which items were added to this invoice
3840
+
format: date-time
3841
+
subtotal:
3842
+
type: number
3843
+
description: invoice subtotal
3844
+
format: float
3845
+
total:
3846
+
type: number
3847
+
description: total invoice amount
3848
+
format: float
3849
+
plan_name:
3850
+
type: string
3851
+
description: Tigris price plan name
3852
+
InvoiceLineItem:
3853
+
type: object
3854
+
properties:
3855
+
name:
3856
+
type: string
3857
+
description: Product name
3858
+
quantity:
3859
+
type: number
3860
+
description: Quantity
3861
+
format: float
3862
+
total:
3863
+
type: number
3864
+
description: Total amount for the product
3865
+
format: float
3866
+
charges:
3867
+
type: array
3868
+
items:
3869
+
$ref: '#/components/schemas/Charge'
3870
+
description: Broken down charges
3728
3871
KeysResponse:
3729
3872
type: object
3730
3873
properties:
@@ -3784,6 +3927,17 @@ components:
3784
3927
type: array
3785
3928
items:
3786
3929
$ref: '#/components/schemas/Invitation'
3930
+
ListInvoicesResponse:
3931
+
type: object
3932
+
properties:
3933
+
data:
3934
+
type: array
3935
+
items:
3936
+
$ref: '#/components/schemas/Invoice'
3937
+
description: Array of invoices
3938
+
next_page:
3939
+
type: string
3940
+
description: token for next page if it exists, else `null`
3787
3941
ListNamespacesResponse:
3788
3942
type: object
3789
3943
properties:
@@ -4596,6 +4750,9 @@ tags:
4596
4750
description: The application keys section provide APIs that can be used to manage application keys for your project. A single project can have one or more application keys.
4597
4751
- name: Authentication
4598
4752
description: 'The auth section of API provides OAuth 2.0 APIs. Tigris supports pluggable OAuth provider. Pass the token in the headers for authentication, as an example `-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6I"`(replace it with your token). All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.'
4753
+
- name: Billing
4754
+
description: The billing section provides APIs for managing invoices and payments infrastructure.
4755
+
- name: Billing
4599
4756
- name: Cache
4600
4757
description: The cache section provide APIs that can be used to perform cache operations.
0 commit comments