increase 0.538.0 → 0.539.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/client.d.mts +0 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +0 -9
- package/client.d.ts.map +1 -1
- package/client.js +0 -9
- package/client.js.map +1 -1
- package/client.mjs +0 -9
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +0 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -8
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -3
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +0 -55
- package/src/resources/index.ts +0 -23
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/bookkeeping-accounts.d.mts +0 -164
- package/resources/bookkeeping-accounts.d.mts.map +0 -1
- package/resources/bookkeeping-accounts.d.ts +0 -164
- package/resources/bookkeeping-accounts.d.ts.map +0 -1
- package/resources/bookkeeping-accounts.js +0 -71
- package/resources/bookkeeping-accounts.js.map +0 -1
- package/resources/bookkeeping-accounts.mjs +0 -67
- package/resources/bookkeeping-accounts.mjs.map +0 -1
- package/resources/bookkeeping-entries.d.mts +0 -74
- package/resources/bookkeeping-entries.d.mts.map +0 -1
- package/resources/bookkeeping-entries.d.ts +0 -74
- package/resources/bookkeeping-entries.d.ts.map +0 -1
- package/resources/bookkeeping-entries.js +0 -39
- package/resources/bookkeeping-entries.js.map +0 -1
- package/resources/bookkeeping-entries.mjs +0 -35
- package/resources/bookkeeping-entries.mjs.map +0 -1
- package/resources/bookkeeping-entry-sets.d.mts +0 -156
- package/resources/bookkeeping-entry-sets.d.mts.map +0 -1
- package/resources/bookkeeping-entry-sets.d.ts +0 -156
- package/resources/bookkeeping-entry-sets.d.ts.map +0 -1
- package/resources/bookkeeping-entry-sets.js +0 -67
- package/resources/bookkeeping-entry-sets.js.map +0 -1
- package/resources/bookkeeping-entry-sets.mjs +0 -63
- package/resources/bookkeeping-entry-sets.mjs.map +0 -1
- package/src/resources/bookkeeping-accounts.ts +0 -220
- package/src/resources/bookkeeping-entries.ts +0 -98
- package/src/resources/bookkeeping-entry-sets.ts +0 -198
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { Page, type PageParams, PagePromise } from '../core/pagination';
|
|
6
|
-
import { RequestOptions } from '../internal/request-options';
|
|
7
|
-
import { path } from '../internal/utils/path';
|
|
8
|
-
|
|
9
|
-
export class BookkeepingEntrySets extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Create a Bookkeeping Entry Set
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* const bookkeepingEntrySet =
|
|
16
|
-
* await client.bookkeepingEntrySets.create({
|
|
17
|
-
* entries: [
|
|
18
|
-
* {
|
|
19
|
-
* account_id:
|
|
20
|
-
* 'bookkeeping_account_9husfpw68pzmve9dvvc7',
|
|
21
|
-
* amount: 100,
|
|
22
|
-
* },
|
|
23
|
-
* {
|
|
24
|
-
* account_id:
|
|
25
|
-
* 'bookkeeping_account_t2obldz1rcu15zr54umg',
|
|
26
|
-
* amount: -100,
|
|
27
|
-
* },
|
|
28
|
-
* ],
|
|
29
|
-
* });
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
create(body: BookkeepingEntrySetCreateParams, options?: RequestOptions): APIPromise<BookkeepingEntrySet> {
|
|
33
|
-
return this._client.post('/bookkeeping_entry_sets', { body, ...options });
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Retrieve a Bookkeeping Entry Set
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const bookkeepingEntrySet =
|
|
42
|
-
* await client.bookkeepingEntrySets.retrieve(
|
|
43
|
-
* 'bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf',
|
|
44
|
-
* );
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
retrieve(bookkeepingEntrySetID: string, options?: RequestOptions): APIPromise<BookkeepingEntrySet> {
|
|
48
|
-
return this._client.get(path`/bookkeeping_entry_sets/${bookkeepingEntrySetID}`, options);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* List Bookkeeping Entry Sets
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* // Automatically fetches more pages as needed.
|
|
57
|
-
* for await (const bookkeepingEntrySet of client.bookkeepingEntrySets.list()) {
|
|
58
|
-
* // ...
|
|
59
|
-
* }
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
list(
|
|
63
|
-
query: BookkeepingEntrySetListParams | null | undefined = {},
|
|
64
|
-
options?: RequestOptions,
|
|
65
|
-
): PagePromise<BookkeepingEntrySetsPage, BookkeepingEntrySet> {
|
|
66
|
-
return this._client.getAPIList('/bookkeeping_entry_sets', Page<BookkeepingEntrySet>, {
|
|
67
|
-
query,
|
|
68
|
-
...options,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export type BookkeepingEntrySetsPage = Page<BookkeepingEntrySet>;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Entry Sets are accounting entries that are transactionally applied. Your
|
|
77
|
-
* compliance setup might require annotating money movements using this API. Learn
|
|
78
|
-
* more in our
|
|
79
|
-
* [guide to Bookkeeping](https://increase.com/documentation/bookkeeping#bookkeeping).
|
|
80
|
-
*/
|
|
81
|
-
export interface BookkeepingEntrySet {
|
|
82
|
-
/**
|
|
83
|
-
* The entry set identifier.
|
|
84
|
-
*/
|
|
85
|
-
id: string;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* When the entry set was created.
|
|
89
|
-
*/
|
|
90
|
-
created_at: string;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* The timestamp of the entry set.
|
|
94
|
-
*/
|
|
95
|
-
date: string;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* The entries.
|
|
99
|
-
*/
|
|
100
|
-
entries: Array<BookkeepingEntrySet.Entry>;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* The idempotency key you chose for this object. This value is unique across
|
|
104
|
-
* Increase and is used to ensure that a request is only processed once. Learn more
|
|
105
|
-
* about [idempotency](https://increase.com/documentation/idempotency-keys).
|
|
106
|
-
*/
|
|
107
|
-
idempotency_key: string | null;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* The transaction identifier, if any.
|
|
111
|
-
*/
|
|
112
|
-
transaction_id: string | null;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* A constant representing the object's type. For this resource it will always be
|
|
116
|
-
* `bookkeeping_entry_set`.
|
|
117
|
-
*/
|
|
118
|
-
type: 'bookkeeping_entry_set';
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export namespace BookkeepingEntrySet {
|
|
122
|
-
export interface Entry {
|
|
123
|
-
/**
|
|
124
|
-
* The entry identifier.
|
|
125
|
-
*/
|
|
126
|
-
id: string;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* The bookkeeping account impacted by the entry.
|
|
130
|
-
*/
|
|
131
|
-
account_id: string;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* The amount of the entry in minor units.
|
|
135
|
-
*/
|
|
136
|
-
amount: number;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export interface BookkeepingEntrySetCreateParams {
|
|
141
|
-
/**
|
|
142
|
-
* The bookkeeping entries.
|
|
143
|
-
*/
|
|
144
|
-
entries: Array<BookkeepingEntrySetCreateParams.Entry>;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* The date of the transaction. Optional if `transaction_id` is provided, in which
|
|
148
|
-
* case we use the `date` of that transaction. Required otherwise.
|
|
149
|
-
*/
|
|
150
|
-
date?: string;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* The identifier of the Transaction related to this entry set, if any.
|
|
154
|
-
*/
|
|
155
|
-
transaction_id?: string;
|
|
156
|
-
|
|
157
|
-
[k: string]: unknown;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export namespace BookkeepingEntrySetCreateParams {
|
|
161
|
-
export interface Entry {
|
|
162
|
-
/**
|
|
163
|
-
* The identifier for the Bookkeeping Account impacted by this entry.
|
|
164
|
-
*/
|
|
165
|
-
account_id: string;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* The entry amount in the minor unit of the account currency. For dollars, for
|
|
169
|
-
* example, this is cents. Debit entries have positive amounts; credit entries have
|
|
170
|
-
* negative amounts.
|
|
171
|
-
*/
|
|
172
|
-
amount: number;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export interface BookkeepingEntrySetListParams extends PageParams {
|
|
177
|
-
/**
|
|
178
|
-
* Filter records to the one with the specified `idempotency_key` you chose for
|
|
179
|
-
* that object. This value is unique across Increase and is used to ensure that a
|
|
180
|
-
* request is only processed once. Learn more about
|
|
181
|
-
* [idempotency](https://increase.com/documentation/idempotency-keys).
|
|
182
|
-
*/
|
|
183
|
-
idempotency_key?: string;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Filter to the Bookkeeping Entry Set that maps to this Transaction.
|
|
187
|
-
*/
|
|
188
|
-
transaction_id?: string;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export declare namespace BookkeepingEntrySets {
|
|
192
|
-
export {
|
|
193
|
-
type BookkeepingEntrySet as BookkeepingEntrySet,
|
|
194
|
-
type BookkeepingEntrySetsPage as BookkeepingEntrySetsPage,
|
|
195
|
-
type BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams,
|
|
196
|
-
type BookkeepingEntrySetListParams as BookkeepingEntrySetListParams,
|
|
197
|
-
};
|
|
198
|
-
}
|