@rippling/rippling-sdk 0.2.0-alpha.113 → 0.2.0-alpha.114
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/client.d.mts +23 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +23 -8
- package/client.d.ts.map +1 -1
- package/client.js +17 -0
- package/client.js.map +1 -1
- package/client.mjs +17 -0
- package/client.mjs.map +1 -1
- package/lib/manifest/app.d.mts +20 -1
- package/lib/manifest/app.d.mts.map +1 -1
- package/lib/manifest/app.d.ts +20 -1
- package/lib/manifest/app.d.ts.map +1 -1
- package/lib/manifest/app.js +50 -0
- package/lib/manifest/app.js.map +1 -1
- package/lib/manifest/app.mjs +51 -1
- package/lib/manifest/app.mjs.map +1 -1
- package/lib/manifest/composition.d.mts +3 -0
- package/lib/manifest/composition.d.mts.map +1 -1
- package/lib/manifest/composition.d.ts +3 -0
- package/lib/manifest/composition.d.ts.map +1 -1
- package/lib/manifest/composition.js.map +1 -1
- package/lib/manifest/composition.mjs.map +1 -1
- package/lib/manifest/definitions/app.js +4 -1
- package/lib/manifest/definitions/app.js.map +1 -1
- package/lib/manifest/definitions/app.mjs +4 -1
- package/lib/manifest/definitions/app.mjs.map +1 -1
- package/lib/manifest/definitions/function.d.mts.map +1 -1
- package/lib/manifest/definitions/function.d.ts.map +1 -1
- package/lib/manifest/definitions/function.js +1 -0
- package/lib/manifest/definitions/function.js.map +1 -1
- package/lib/manifest/definitions/function.mjs +1 -0
- package/lib/manifest/definitions/function.mjs.map +1 -1
- package/lib/manifest/definitions/group.d.mts +64 -0
- package/lib/manifest/definitions/group.d.mts.map +1 -0
- package/lib/manifest/definitions/group.d.ts +64 -0
- package/lib/manifest/definitions/group.d.ts.map +1 -0
- package/lib/manifest/definitions/group.js +57 -0
- package/lib/manifest/definitions/group.js.map +1 -0
- package/lib/manifest/definitions/group.mjs +50 -0
- package/lib/manifest/definitions/group.mjs.map +1 -0
- package/lib/manifest/definitions/index.d.mts +4 -0
- package/lib/manifest/definitions/index.d.mts.map +1 -1
- package/lib/manifest/definitions/index.d.ts +4 -0
- package/lib/manifest/definitions/index.d.ts.map +1 -1
- package/lib/manifest/definitions/index.js +7 -1
- package/lib/manifest/definitions/index.js.map +1 -1
- package/lib/manifest/definitions/index.mjs +2 -0
- package/lib/manifest/definitions/index.mjs.map +1 -1
- package/lib/manifest/definitions/saved-super-group.d.mts +12 -0
- package/lib/manifest/definitions/saved-super-group.d.mts.map +1 -0
- package/lib/manifest/definitions/saved-super-group.d.ts +12 -0
- package/lib/manifest/definitions/saved-super-group.d.ts.map +1 -0
- package/lib/manifest/definitions/saved-super-group.js +26 -0
- package/lib/manifest/definitions/saved-super-group.js.map +1 -0
- package/lib/manifest/definitions/saved-super-group.mjs +21 -0
- package/lib/manifest/definitions/saved-super-group.mjs.map +1 -0
- package/lib/manifest/existing-manifest-context.d.mts +3 -0
- package/lib/manifest/existing-manifest-context.d.mts.map +1 -1
- package/lib/manifest/existing-manifest-context.d.ts +3 -0
- package/lib/manifest/existing-manifest-context.d.ts.map +1 -1
- package/lib/manifest/existing-manifest-context.js +15 -0
- package/lib/manifest/existing-manifest-context.js.map +1 -1
- package/lib/manifest/existing-manifest-context.mjs +15 -0
- package/lib/manifest/existing-manifest-context.mjs.map +1 -1
- package/lib/manifest/group.d.mts +83 -0
- package/lib/manifest/group.d.mts.map +1 -0
- package/lib/manifest/group.d.ts +83 -0
- package/lib/manifest/group.d.ts.map +1 -0
- package/lib/manifest/group.js +207 -0
- package/lib/manifest/group.js.map +1 -0
- package/lib/manifest/group.mjs +203 -0
- package/lib/manifest/group.mjs.map +1 -0
- package/lib/manifest/index.d.mts +2 -0
- package/lib/manifest/index.d.mts.map +1 -1
- package/lib/manifest/index.d.ts +2 -0
- package/lib/manifest/index.d.ts.map +1 -1
- package/lib/manifest/index.js +5 -1
- package/lib/manifest/index.js.map +1 -1
- package/lib/manifest/index.mjs +2 -0
- package/lib/manifest/index.mjs.map +1 -1
- package/lib/manifest/manifest-builder.d.mts +1 -1
- package/lib/manifest/manifest-builder.d.mts.map +1 -1
- package/lib/manifest/manifest-builder.d.ts +1 -1
- package/lib/manifest/manifest-builder.d.ts.map +1 -1
- package/lib/manifest/manifest-builder.js.map +1 -1
- package/lib/manifest/manifest-builder.mjs.map +1 -1
- package/lib/manifest/manifest-function.d.mts +16 -0
- package/lib/manifest/manifest-function.d.mts.map +1 -1
- package/lib/manifest/manifest-function.d.ts +16 -0
- package/lib/manifest/manifest-function.d.ts.map +1 -1
- package/lib/manifest/manifest-function.js +67 -0
- package/lib/manifest/manifest-function.js.map +1 -1
- package/lib/manifest/manifest-function.mjs +68 -1
- package/lib/manifest/manifest-function.mjs.map +1 -1
- package/lib/manifest/saved-super-group.d.mts +43 -0
- package/lib/manifest/saved-super-group.d.mts.map +1 -0
- package/lib/manifest/saved-super-group.d.ts +43 -0
- package/lib/manifest/saved-super-group.d.ts.map +1 -0
- package/lib/manifest/saved-super-group.js +136 -0
- package/lib/manifest/saved-super-group.js.map +1 -0
- package/lib/manifest/saved-super-group.mjs +132 -0
- package/lib/manifest/saved-super-group.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/application-submissions.d.mts +261 -0
- package/resources/application-submissions.d.mts.map +1 -0
- package/resources/application-submissions.d.ts +261 -0
- package/resources/application-submissions.d.ts.map +1 -0
- package/resources/application-submissions.js +112 -0
- package/resources/application-submissions.js.map +1 -0
- package/resources/application-submissions.mjs +108 -0
- package/resources/application-submissions.mjs.map +1 -0
- package/resources/bills.d.mts +913 -12
- package/resources/bills.d.mts.map +1 -1
- package/resources/bills.d.ts +913 -12
- package/resources/bills.d.ts.map +1 -1
- package/resources/bills.js +221 -0
- package/resources/bills.js.map +1 -1
- package/resources/bills.mjs +221 -0
- package/resources/bills.mjs.map +1 -1
- package/resources/candidate-applications.d.mts +247 -9
- package/resources/candidate-applications.d.mts.map +1 -1
- package/resources/candidate-applications.d.ts +247 -9
- package/resources/candidate-applications.d.ts.map +1 -1
- package/resources/candidate-applications.js +37 -5
- package/resources/candidate-applications.js.map +1 -1
- package/resources/candidate-applications.mjs +37 -5
- package/resources/candidate-applications.mjs.map +1 -1
- package/resources/card-transactions.d.mts +1580 -30
- package/resources/card-transactions.d.mts.map +1 -1
- package/resources/card-transactions.d.ts +1580 -30
- package/resources/card-transactions.d.ts.map +1 -1
- package/resources/card-transactions.js +404 -4
- package/resources/card-transactions.js.map +1 -1
- package/resources/card-transactions.mjs +404 -4
- package/resources/card-transactions.mjs.map +1 -1
- package/resources/index.d.mts +6 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/job-posts.d.mts +345 -0
- package/resources/job-posts.d.mts.map +1 -0
- package/resources/job-posts.d.ts +345 -0
- package/resources/job-posts.d.ts.map +1 -0
- package/resources/job-posts.js +110 -0
- package/resources/job-posts.js.map +1 -0
- package/resources/job-posts.mjs +106 -0
- package/resources/job-posts.mjs.map +1 -0
- package/resources/job-requisitions.d.mts +96 -4
- package/resources/job-requisitions.d.mts.map +1 -1
- package/resources/job-requisitions.d.ts +96 -4
- package/resources/job-requisitions.d.ts.map +1 -1
- package/resources/job-requisitions.js +64 -3
- package/resources/job-requisitions.js.map +1 -1
- package/resources/job-requisitions.mjs +64 -3
- package/resources/job-requisitions.mjs.map +1 -1
- package/resources/reimbursements.d.mts +1106 -64
- package/resources/reimbursements.d.mts.map +1 -1
- package/resources/reimbursements.d.ts +1106 -64
- package/resources/reimbursements.d.ts.map +1 -1
- package/resources/reimbursements.js +208 -0
- package/resources/reimbursements.js.map +1 -1
- package/resources/reimbursements.mjs +208 -0
- package/resources/reimbursements.mjs.map +1 -1
- package/resources/scheduled-payouts.d.mts +0 -2
- package/resources/scheduled-payouts.d.mts.map +1 -1
- package/resources/scheduled-payouts.d.ts +0 -2
- package/resources/scheduled-payouts.d.ts.map +1 -1
- package/resources/scheduled-payouts.js +0 -2
- package/resources/scheduled-payouts.js.map +1 -1
- package/resources/scheduled-payouts.mjs +0 -2
- package/resources/scheduled-payouts.mjs.map +1 -1
- package/src/client.ts +66 -0
- package/src/lib/manifest/app.ts +72 -2
- package/src/lib/manifest/composition.ts +8 -2
- package/src/lib/manifest/definitions/app.ts +4 -1
- package/src/lib/manifest/definitions/function.ts +1 -0
- package/src/lib/manifest/definitions/group.ts +159 -0
- package/src/lib/manifest/definitions/index.ts +25 -0
- package/src/lib/manifest/definitions/saved-super-group.ts +28 -0
- package/src/lib/manifest/existing-manifest-context.ts +24 -0
- package/src/lib/manifest/group.ts +282 -0
- package/src/lib/manifest/index.ts +16 -0
- package/src/lib/manifest/manifest-builder.ts +1 -0
- package/src/lib/manifest/manifest-function.ts +91 -1
- package/src/lib/manifest/saved-super-group.ts +171 -0
- package/src/resources/application-submissions.ts +315 -0
- package/src/resources/bills.ts +1085 -12
- package/src/resources/candidate-applications.ts +282 -9
- package/src/resources/card-transactions.ts +1874 -32
- package/src/resources/index.ts +24 -0
- package/src/resources/job-posts.ts +415 -0
- package/src/resources/job-requisitions.ts +110 -3
- package/src/resources/reimbursements.ts +1299 -63
- package/src/resources/scheduled-payouts.ts +0 -2
- 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
|
@@ -5,7 +5,9 @@ import * as BusinessPartnersAPI from './business-partners';
|
|
|
5
5
|
import * as WorkersAPI from './workers';
|
|
6
6
|
import { APIPromise } from '../core/api-promise';
|
|
7
7
|
import { PageCursorURL, PagePromise } from '../core/pagination';
|
|
8
|
+
import { type Uploadable } from '../core/uploads';
|
|
8
9
|
import { RequestOptions } from '../internal/request-options';
|
|
10
|
+
import { multipartFormRequestOptions } from '../internal/uploads';
|
|
9
11
|
import { path } from '../internal/utils/path';
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -130,10 +132,9 @@ export class CardTransactions extends APIResource {
|
|
|
130
132
|
* ],
|
|
131
133
|
* "vendor_id": "string",
|
|
132
134
|
* "transaction_date": "string",
|
|
133
|
-
* "
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* },
|
|
135
|
+
* "receipts": [
|
|
136
|
+
* {}
|
|
137
|
+
* ],
|
|
137
138
|
* "transaction_type": "CARD_TRANSACTION",
|
|
138
139
|
* "authorization_state": "PENDING",
|
|
139
140
|
* "card_id": "string"
|
|
@@ -183,6 +184,419 @@ export class CardTransactions extends APIResource {
|
|
|
183
184
|
): APIPromise<CardTransactionRetrieveResponse> {
|
|
184
185
|
return this._client.get(path`/card-transactions/${id}/`, { query, ...options });
|
|
185
186
|
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Replace a card transaction's line items. Supplying `line_items` replaces the
|
|
190
|
+
* entire list: unlisted lines are deleted, omitted or null optional fields on
|
|
191
|
+
* supplied lines are cleared. `amount` and `tax_amount` are decimal strings in the
|
|
192
|
+
* merchant currency; GET responses return them as Currency objects. Line item
|
|
193
|
+
* `amount` values must sum to the transaction's merchant amount.
|
|
194
|
+
*
|
|
195
|
+
* @example HTTP
|
|
196
|
+
* Representative request and response shapes.
|
|
197
|
+
* ```
|
|
198
|
+
* PATCH /card-transactions/{id}/ HTTP/1.1
|
|
199
|
+
* Host: rest.ripplingapis.com
|
|
200
|
+
* Content-Type: application/json
|
|
201
|
+
* Accept: application/json
|
|
202
|
+
* Rippling-Api-Version: 2024-08-01
|
|
203
|
+
*
|
|
204
|
+
* {}
|
|
205
|
+
*
|
|
206
|
+
* HTTP/1.1 200 OK
|
|
207
|
+
* Content-Type: application/json
|
|
208
|
+
*
|
|
209
|
+
* {
|
|
210
|
+
* "id": "string",
|
|
211
|
+
* "created_at": "string",
|
|
212
|
+
* "updated_at": "string",
|
|
213
|
+
* "worker_id": "string",
|
|
214
|
+
* "worker": {
|
|
215
|
+
* "id": "string",
|
|
216
|
+
* "created_at": "string",
|
|
217
|
+
* "updated_at": "string",
|
|
218
|
+
* "user_id": "string",
|
|
219
|
+
* "user": {
|
|
220
|
+
* "id": "string",
|
|
221
|
+
* "created_at": "string",
|
|
222
|
+
* "updated_at": "string"
|
|
223
|
+
* },
|
|
224
|
+
* "is_manager": false,
|
|
225
|
+
* "manager_id": "string",
|
|
226
|
+
* "manager": {
|
|
227
|
+
* "id": "string",
|
|
228
|
+
* "created_at": "string",
|
|
229
|
+
* "updated_at": "string"
|
|
230
|
+
* },
|
|
231
|
+
* "legal_entity_id": "string",
|
|
232
|
+
* "legal_entity": {
|
|
233
|
+
* "id": "string",
|
|
234
|
+
* "created_at": "string",
|
|
235
|
+
* "updated_at": "string"
|
|
236
|
+
* },
|
|
237
|
+
* "country": "AF",
|
|
238
|
+
* "start_date": "string",
|
|
239
|
+
* "end_date": "string",
|
|
240
|
+
* "number": 0,
|
|
241
|
+
* "work_email": "string",
|
|
242
|
+
* "personal_email": "string",
|
|
243
|
+
* "status": "INIT",
|
|
244
|
+
* "location": {
|
|
245
|
+
* "type": "REMOTE",
|
|
246
|
+
* "work_location_id": "string"
|
|
247
|
+
* },
|
|
248
|
+
* "employment_type_id": "string",
|
|
249
|
+
* "employment_type": {
|
|
250
|
+
* "id": "string",
|
|
251
|
+
* "created_at": "string",
|
|
252
|
+
* "updated_at": "string",
|
|
253
|
+
* "label": "string"
|
|
254
|
+
* },
|
|
255
|
+
* "gender": "MALE",
|
|
256
|
+
* "date_of_birth": "string",
|
|
257
|
+
* "race": "BLACK",
|
|
258
|
+
* "ethnicity": "HISPANIC_OR_LATINO",
|
|
259
|
+
* "citizenship": "AF",
|
|
260
|
+
* "compensation_id": "string",
|
|
261
|
+
* "compensation": {
|
|
262
|
+
* "id": "string",
|
|
263
|
+
* "created_at": "string",
|
|
264
|
+
* "updated_at": "string"
|
|
265
|
+
* },
|
|
266
|
+
* "overtime_exemption": "EXEMPT",
|
|
267
|
+
* "department_id": "string",
|
|
268
|
+
* "department": {
|
|
269
|
+
* "id": "string",
|
|
270
|
+
* "created_at": "string",
|
|
271
|
+
* "updated_at": "string",
|
|
272
|
+
* "name": "string"
|
|
273
|
+
* },
|
|
274
|
+
* "teams_id": [
|
|
275
|
+
* "string"
|
|
276
|
+
* ]
|
|
277
|
+
* },
|
|
278
|
+
* "company_amount": {
|
|
279
|
+
* "currency_type": "string",
|
|
280
|
+
* "value": 0
|
|
281
|
+
* },
|
|
282
|
+
* "merchant_amount": {
|
|
283
|
+
* "currency_type": "string",
|
|
284
|
+
* "value": 0
|
|
285
|
+
* },
|
|
286
|
+
* "accounting_date": "string",
|
|
287
|
+
* "gl_sync_state": "NOT_FINALIZED",
|
|
288
|
+
* "approval_status": "DRAFT",
|
|
289
|
+
* "entity_id": "string",
|
|
290
|
+
* "vendor": {
|
|
291
|
+
* "id": "string",
|
|
292
|
+
* "created_at": "string",
|
|
293
|
+
* "updated_at": "string",
|
|
294
|
+
* "name": "string",
|
|
295
|
+
* "logo": "string",
|
|
296
|
+
* "is_archived": false
|
|
297
|
+
* },
|
|
298
|
+
* "gl_vendor": {
|
|
299
|
+
* "id": "string",
|
|
300
|
+
* "name": "string",
|
|
301
|
+
* "gl_vendor_id": "string"
|
|
302
|
+
* },
|
|
303
|
+
* "memo": "string",
|
|
304
|
+
* "attachments": [
|
|
305
|
+
* {
|
|
306
|
+
* "url": "string",
|
|
307
|
+
* "file_name": "string",
|
|
308
|
+
* "uploaded_at": "string",
|
|
309
|
+
* "uploaded_by_id": "string"
|
|
310
|
+
* }
|
|
311
|
+
* ],
|
|
312
|
+
* "line_items": [
|
|
313
|
+
* {
|
|
314
|
+
* "gl_customer": "string",
|
|
315
|
+
* "gl_billable": "BILLABLE",
|
|
316
|
+
* "dimension_choices": {},
|
|
317
|
+
* "memo": "string",
|
|
318
|
+
* "gl_amortization_template": {
|
|
319
|
+
* "gl_object_id": "string",
|
|
320
|
+
* "accounting_integration_id": "string",
|
|
321
|
+
* "name": "string",
|
|
322
|
+
* "gl_object_type": "GL_AMORTIZATION_TEMPLATE"
|
|
323
|
+
* },
|
|
324
|
+
* "amortized": false,
|
|
325
|
+
* "start_date": "string",
|
|
326
|
+
* "end_date": "string",
|
|
327
|
+
* "prepaid_account": {
|
|
328
|
+
* "account_id": "string",
|
|
329
|
+
* "name": "string",
|
|
330
|
+
* "code": "string",
|
|
331
|
+
* "type": "RECEIVABLE",
|
|
332
|
+
* "required_custom_dimensions": [],
|
|
333
|
+
* "requires_department": "string",
|
|
334
|
+
* "requires_work_location": "string"
|
|
335
|
+
* },
|
|
336
|
+
* "gl_amortization_schedule": {
|
|
337
|
+
* "gl_object_id": "string",
|
|
338
|
+
* "accounting_integration_id": "string",
|
|
339
|
+
* "name": "string",
|
|
340
|
+
* "gl_object_type": "GL_AMORTIZATION_TEMPLATE",
|
|
341
|
+
* "start_date": "string",
|
|
342
|
+
* "end_date": "string",
|
|
343
|
+
* "total_amount": "string",
|
|
344
|
+
* "total_amortized_amount": "string",
|
|
345
|
+
* "amortization_period": "string",
|
|
346
|
+
* "status": "NOT_STARTED"
|
|
347
|
+
* },
|
|
348
|
+
* "gl_tax_code": "string",
|
|
349
|
+
* "id": "string",
|
|
350
|
+
* "category_id": "string",
|
|
351
|
+
* "category_name": "string",
|
|
352
|
+
* "amount": {
|
|
353
|
+
* "currency_type": "string",
|
|
354
|
+
* "value": "string"
|
|
355
|
+
* },
|
|
356
|
+
* "tax_amount": {
|
|
357
|
+
* "currency_type": "string",
|
|
358
|
+
* "value": "string"
|
|
359
|
+
* }
|
|
360
|
+
* }
|
|
361
|
+
* ],
|
|
362
|
+
* "vendor_id": "string",
|
|
363
|
+
* "transaction_date": "string",
|
|
364
|
+
* "receipts": [
|
|
365
|
+
* {
|
|
366
|
+
* "url": "string",
|
|
367
|
+
* "preview_url": "string",
|
|
368
|
+
* "file_name": "string",
|
|
369
|
+
* "content_type": "string"
|
|
370
|
+
* }
|
|
371
|
+
* ],
|
|
372
|
+
* "transaction_type": "CARD_TRANSACTION",
|
|
373
|
+
* "authorization_state": "PENDING",
|
|
374
|
+
* "card_id": "string"
|
|
375
|
+
* }
|
|
376
|
+
* ```
|
|
377
|
+
*/
|
|
378
|
+
update(
|
|
379
|
+
id: string,
|
|
380
|
+
body: CardTransactionUpdateParams | null | undefined = {},
|
|
381
|
+
options?: RequestOptions,
|
|
382
|
+
): APIPromise<CardTransactionUpdateResponse> {
|
|
383
|
+
return this._client.patch(path`/card-transactions/${id}/`, { body, ...options });
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Send the receipt file as `multipart/form-data` in a `file` field. It is stored
|
|
388
|
+
* and attached in a single request.
|
|
389
|
+
*
|
|
390
|
+
* When the company has multiple receipts per transaction enabled, the file is
|
|
391
|
+
* appended to the existing receipts, up to 5 per transaction. Otherwise it
|
|
392
|
+
* replaces the existing receipt. Declined authorizations cannot be changed. Once a
|
|
393
|
+
* charge posts, its authorization is replaced by a card transaction and returns
|
|
394
|
+
* 404, so upload to the card transaction instead.
|
|
395
|
+
*
|
|
396
|
+
* With multiple receipts enabled, uploading identical file contents again returns
|
|
397
|
+
* the current transaction without storing another file or using another receipt
|
|
398
|
+
* slot, even at the limit. This applies to files previously attached by this API;
|
|
399
|
+
* older receipts without a content hash are not deduplicated. Otherwise, uploading
|
|
400
|
+
* a file replaces the existing receipt.
|
|
401
|
+
*
|
|
402
|
+
* The receipt is attached without scanning or populating transaction fields from
|
|
403
|
+
* its contents. As with an in-app upload, Rippling stops marking the transaction
|
|
404
|
+
* as missing a receipt. Returns the updated card transaction in the same shape as
|
|
405
|
+
* `GET /card-transactions/{id}/`, with the new receipt in `receipts`.
|
|
406
|
+
*
|
|
407
|
+
* @example HTTP
|
|
408
|
+
* Representative request and response shapes.
|
|
409
|
+
* ```
|
|
410
|
+
* POST /card-transactions/{id}/receipts/ HTTP/1.1
|
|
411
|
+
* Host: rest.ripplingapis.com
|
|
412
|
+
* Content-Type: multipart/form-data
|
|
413
|
+
* Accept: application/json
|
|
414
|
+
* Rippling-Api-Version: 2024-08-01
|
|
415
|
+
*
|
|
416
|
+
* <multipart form data>
|
|
417
|
+
*
|
|
418
|
+
* HTTP/1.1 200 OK
|
|
419
|
+
* Content-Type: application/json
|
|
420
|
+
*
|
|
421
|
+
* {
|
|
422
|
+
* "id": "string",
|
|
423
|
+
* "created_at": "string",
|
|
424
|
+
* "updated_at": "string",
|
|
425
|
+
* "worker_id": "string",
|
|
426
|
+
* "worker": {
|
|
427
|
+
* "id": "string",
|
|
428
|
+
* "created_at": "string",
|
|
429
|
+
* "updated_at": "string",
|
|
430
|
+
* "user_id": "string",
|
|
431
|
+
* "user": {
|
|
432
|
+
* "id": "string",
|
|
433
|
+
* "created_at": "string",
|
|
434
|
+
* "updated_at": "string"
|
|
435
|
+
* },
|
|
436
|
+
* "is_manager": false,
|
|
437
|
+
* "manager_id": "string",
|
|
438
|
+
* "manager": {
|
|
439
|
+
* "id": "string",
|
|
440
|
+
* "created_at": "string",
|
|
441
|
+
* "updated_at": "string"
|
|
442
|
+
* },
|
|
443
|
+
* "legal_entity_id": "string",
|
|
444
|
+
* "legal_entity": {
|
|
445
|
+
* "id": "string",
|
|
446
|
+
* "created_at": "string",
|
|
447
|
+
* "updated_at": "string"
|
|
448
|
+
* },
|
|
449
|
+
* "country": "AF",
|
|
450
|
+
* "start_date": "string",
|
|
451
|
+
* "end_date": "string",
|
|
452
|
+
* "number": 0,
|
|
453
|
+
* "work_email": "string",
|
|
454
|
+
* "personal_email": "string",
|
|
455
|
+
* "status": "INIT",
|
|
456
|
+
* "location": {
|
|
457
|
+
* "type": "REMOTE",
|
|
458
|
+
* "work_location_id": "string"
|
|
459
|
+
* },
|
|
460
|
+
* "employment_type_id": "string",
|
|
461
|
+
* "employment_type": {
|
|
462
|
+
* "id": "string",
|
|
463
|
+
* "created_at": "string",
|
|
464
|
+
* "updated_at": "string",
|
|
465
|
+
* "label": "string"
|
|
466
|
+
* },
|
|
467
|
+
* "gender": "MALE",
|
|
468
|
+
* "date_of_birth": "string",
|
|
469
|
+
* "race": "BLACK",
|
|
470
|
+
* "ethnicity": "HISPANIC_OR_LATINO",
|
|
471
|
+
* "citizenship": "AF",
|
|
472
|
+
* "compensation_id": "string",
|
|
473
|
+
* "compensation": {
|
|
474
|
+
* "id": "string",
|
|
475
|
+
* "created_at": "string",
|
|
476
|
+
* "updated_at": "string"
|
|
477
|
+
* },
|
|
478
|
+
* "overtime_exemption": "EXEMPT",
|
|
479
|
+
* "department_id": "string",
|
|
480
|
+
* "department": {
|
|
481
|
+
* "id": "string",
|
|
482
|
+
* "created_at": "string",
|
|
483
|
+
* "updated_at": "string",
|
|
484
|
+
* "name": "string"
|
|
485
|
+
* },
|
|
486
|
+
* "teams_id": [
|
|
487
|
+
* "string"
|
|
488
|
+
* ]
|
|
489
|
+
* },
|
|
490
|
+
* "company_amount": {
|
|
491
|
+
* "currency_type": "string",
|
|
492
|
+
* "value": 0
|
|
493
|
+
* },
|
|
494
|
+
* "merchant_amount": {
|
|
495
|
+
* "currency_type": "string",
|
|
496
|
+
* "value": 0
|
|
497
|
+
* },
|
|
498
|
+
* "accounting_date": "string",
|
|
499
|
+
* "gl_sync_state": "NOT_FINALIZED",
|
|
500
|
+
* "approval_status": "DRAFT",
|
|
501
|
+
* "entity_id": "string",
|
|
502
|
+
* "vendor": {
|
|
503
|
+
* "id": "string",
|
|
504
|
+
* "created_at": "string",
|
|
505
|
+
* "updated_at": "string",
|
|
506
|
+
* "name": "string",
|
|
507
|
+
* "logo": "string",
|
|
508
|
+
* "is_archived": false
|
|
509
|
+
* },
|
|
510
|
+
* "gl_vendor": {
|
|
511
|
+
* "id": "string",
|
|
512
|
+
* "name": "string",
|
|
513
|
+
* "gl_vendor_id": "string"
|
|
514
|
+
* },
|
|
515
|
+
* "memo": "string",
|
|
516
|
+
* "attachments": [
|
|
517
|
+
* {
|
|
518
|
+
* "url": "string",
|
|
519
|
+
* "file_name": "string",
|
|
520
|
+
* "uploaded_at": "string",
|
|
521
|
+
* "uploaded_by_id": "string"
|
|
522
|
+
* }
|
|
523
|
+
* ],
|
|
524
|
+
* "line_items": [
|
|
525
|
+
* {
|
|
526
|
+
* "gl_customer": "string",
|
|
527
|
+
* "gl_billable": "BILLABLE",
|
|
528
|
+
* "dimension_choices": {},
|
|
529
|
+
* "memo": "string",
|
|
530
|
+
* "gl_amortization_template": {
|
|
531
|
+
* "gl_object_id": "string",
|
|
532
|
+
* "accounting_integration_id": "string",
|
|
533
|
+
* "name": "string",
|
|
534
|
+
* "gl_object_type": "GL_AMORTIZATION_TEMPLATE"
|
|
535
|
+
* },
|
|
536
|
+
* "amortized": false,
|
|
537
|
+
* "start_date": "string",
|
|
538
|
+
* "end_date": "string",
|
|
539
|
+
* "prepaid_account": {
|
|
540
|
+
* "account_id": "string",
|
|
541
|
+
* "name": "string",
|
|
542
|
+
* "code": "string",
|
|
543
|
+
* "type": "RECEIVABLE",
|
|
544
|
+
* "required_custom_dimensions": [],
|
|
545
|
+
* "requires_department": "string",
|
|
546
|
+
* "requires_work_location": "string"
|
|
547
|
+
* },
|
|
548
|
+
* "gl_amortization_schedule": {
|
|
549
|
+
* "gl_object_id": "string",
|
|
550
|
+
* "accounting_integration_id": "string",
|
|
551
|
+
* "name": "string",
|
|
552
|
+
* "gl_object_type": "GL_AMORTIZATION_TEMPLATE",
|
|
553
|
+
* "start_date": "string",
|
|
554
|
+
* "end_date": "string",
|
|
555
|
+
* "total_amount": "string",
|
|
556
|
+
* "total_amortized_amount": "string",
|
|
557
|
+
* "amortization_period": "string",
|
|
558
|
+
* "status": "NOT_STARTED"
|
|
559
|
+
* },
|
|
560
|
+
* "gl_tax_code": "string",
|
|
561
|
+
* "id": "string",
|
|
562
|
+
* "category_id": "string",
|
|
563
|
+
* "category_name": "string",
|
|
564
|
+
* "amount": {
|
|
565
|
+
* "currency_type": "string",
|
|
566
|
+
* "value": "string"
|
|
567
|
+
* },
|
|
568
|
+
* "tax_amount": {
|
|
569
|
+
* "currency_type": "string",
|
|
570
|
+
* "value": "string"
|
|
571
|
+
* }
|
|
572
|
+
* }
|
|
573
|
+
* ],
|
|
574
|
+
* "vendor_id": "string",
|
|
575
|
+
* "transaction_date": "string",
|
|
576
|
+
* "receipts": [
|
|
577
|
+
* {
|
|
578
|
+
* "url": "string",
|
|
579
|
+
* "preview_url": "string",
|
|
580
|
+
* "file_name": "string",
|
|
581
|
+
* "content_type": "string"
|
|
582
|
+
* }
|
|
583
|
+
* ],
|
|
584
|
+
* "transaction_type": "CARD_TRANSACTION",
|
|
585
|
+
* "authorization_state": "PENDING",
|
|
586
|
+
* "card_id": "string"
|
|
587
|
+
* }
|
|
588
|
+
* ```
|
|
589
|
+
*/
|
|
590
|
+
uploadReceipt(
|
|
591
|
+
id: string,
|
|
592
|
+
body: CardTransactionUploadReceiptParams,
|
|
593
|
+
options?: RequestOptions,
|
|
594
|
+
): APIPromise<CardTransactionUploadReceiptResponse> {
|
|
595
|
+
return this._client.post(
|
|
596
|
+
path`/card-transactions/${id}/receipts/`,
|
|
597
|
+
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
598
|
+
);
|
|
599
|
+
}
|
|
186
600
|
}
|
|
187
601
|
|
|
188
602
|
export type CardTransactionListResponsesPageCursorURL = PageCursorURL<CardTransactionListResponse>;
|
|
@@ -193,6 +607,10 @@ export type CardTransactionListResponsesPageCursorURL = PageCursorURL<CardTransa
|
|
|
193
607
|
* An authorization is a pending hold the card network places at the time of purchase. A card transaction
|
|
194
608
|
* is the posted charge. List returns both; retrieve returns one by ID. A transaction the
|
|
195
609
|
* caller cannot see returns 404, the same as one that does not exist.
|
|
610
|
+
* PATCH `/card-transactions/{id}/` accepts only `line_items` and replaces the entire list.
|
|
611
|
+
* Request `amount` and `tax_amount` are decimal strings (for example `"75.00"`), not Currency
|
|
612
|
+
* objects. GET responses return those fields as Currency objects (`currency_type` + `value`).
|
|
613
|
+
* The sum of request `amount` values must equal the transaction's merchant amount.
|
|
196
614
|
*/
|
|
197
615
|
export interface CardTransactionListResponse {
|
|
198
616
|
/**
|
|
@@ -242,9 +660,10 @@ export interface CardTransactionListResponse {
|
|
|
242
660
|
|
|
243
661
|
/**
|
|
244
662
|
* State of the card authorization. `PENDING`: an active hold awaiting completion.
|
|
245
|
-
* `CLOSED`: the authorization completed and
|
|
246
|
-
*
|
|
247
|
-
* without completion. Null for posted card
|
|
663
|
+
* `CLOSED`: the authorization was declined, or it completed and was replaced by a
|
|
664
|
+
* posted card transaction. `REVERSED`: the authorization was reversed and the hold
|
|
665
|
+
* released. `EXPIRED`: the hold expired without completion. Null for posted card
|
|
666
|
+
* transactions.
|
|
248
667
|
*/
|
|
249
668
|
authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED';
|
|
250
669
|
|
|
@@ -306,9 +725,10 @@ export interface CardTransactionListResponse {
|
|
|
306
725
|
merchant_amount?: CardTransactionListResponse.MerchantAmount;
|
|
307
726
|
|
|
308
727
|
/**
|
|
309
|
-
* Receipt
|
|
728
|
+
* Receipt files attached to the transaction, in display order, up to 5. Empty when
|
|
729
|
+
* there are none. Null when the caller cannot read the transaction's receipts.
|
|
310
730
|
*/
|
|
311
|
-
|
|
731
|
+
receipts?: Array<CardTransactionListResponse.Receipt> | null;
|
|
312
732
|
|
|
313
733
|
/**
|
|
314
734
|
* When the purchase or authorization happened, as an ISO 8601 date-time in UTC.
|
|
@@ -732,18 +1152,32 @@ export namespace CardTransactionListResponse {
|
|
|
732
1152
|
}
|
|
733
1153
|
|
|
734
1154
|
/**
|
|
735
|
-
*
|
|
1155
|
+
* A receipt file attached to a card transaction.
|
|
736
1156
|
*/
|
|
737
1157
|
export interface Receipt {
|
|
738
1158
|
/**
|
|
739
|
-
* URL
|
|
1159
|
+
* URL of the original receipt file, such as the uploaded PDF. The link is signed
|
|
1160
|
+
* and expires, so fetch the transaction again for a current link instead of
|
|
1161
|
+
* storing it.
|
|
740
1162
|
*/
|
|
741
1163
|
url: string;
|
|
742
1164
|
|
|
743
1165
|
/**
|
|
744
|
-
*
|
|
1166
|
+
* MIME type of the receipt file, such as `application/pdf`. Null when it cannot be
|
|
1167
|
+
* determined.
|
|
745
1168
|
*/
|
|
746
|
-
|
|
1169
|
+
content_type?: string | null;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Name of the receipt file. Null when it was not recorded.
|
|
1173
|
+
*/
|
|
1174
|
+
file_name?: string | null;
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* URL of an image preview of the receipt. Null when the receipt is itself an image
|
|
1178
|
+
* or no preview is available. Like `url`, the link is signed and expires.
|
|
1179
|
+
*/
|
|
1180
|
+
preview_url?: string | null;
|
|
747
1181
|
}
|
|
748
1182
|
|
|
749
1183
|
/**
|
|
@@ -837,9 +1271,10 @@ export interface CardTransactionRetrieveResponse extends BusinessPartnersAPI.Met
|
|
|
837
1271
|
|
|
838
1272
|
/**
|
|
839
1273
|
* State of the card authorization. `PENDING`: an active hold awaiting completion.
|
|
840
|
-
* `CLOSED`: the authorization completed and
|
|
841
|
-
*
|
|
842
|
-
* without completion. Null for posted card
|
|
1274
|
+
* `CLOSED`: the authorization was declined, or it completed and was replaced by a
|
|
1275
|
+
* posted card transaction. `REVERSED`: the authorization was reversed and the hold
|
|
1276
|
+
* released. `EXPIRED`: the hold expired without completion. Null for posted card
|
|
1277
|
+
* transactions.
|
|
843
1278
|
*/
|
|
844
1279
|
authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED';
|
|
845
1280
|
|
|
@@ -901,9 +1336,10 @@ export interface CardTransactionRetrieveResponse extends BusinessPartnersAPI.Met
|
|
|
901
1336
|
merchant_amount?: CardTransactionRetrieveResponse.MerchantAmount;
|
|
902
1337
|
|
|
903
1338
|
/**
|
|
904
|
-
* Receipt
|
|
1339
|
+
* Receipt files attached to the transaction, in display order, up to 5. Empty when
|
|
1340
|
+
* there are none. Null when the caller cannot read the transaction's receipts.
|
|
905
1341
|
*/
|
|
906
|
-
|
|
1342
|
+
receipts?: Array<CardTransactionRetrieveResponse.Receipt> | null;
|
|
907
1343
|
|
|
908
1344
|
/**
|
|
909
1345
|
* When the purchase or authorization happened, as an ISO 8601 date-time in UTC.
|
|
@@ -1327,18 +1763,32 @@ export namespace CardTransactionRetrieveResponse {
|
|
|
1327
1763
|
}
|
|
1328
1764
|
|
|
1329
1765
|
/**
|
|
1330
|
-
*
|
|
1766
|
+
* A receipt file attached to a card transaction.
|
|
1331
1767
|
*/
|
|
1332
1768
|
export interface Receipt {
|
|
1333
1769
|
/**
|
|
1334
|
-
* URL
|
|
1770
|
+
* URL of the original receipt file, such as the uploaded PDF. The link is signed
|
|
1771
|
+
* and expires, so fetch the transaction again for a current link instead of
|
|
1772
|
+
* storing it.
|
|
1335
1773
|
*/
|
|
1336
1774
|
url: string;
|
|
1337
1775
|
|
|
1338
1776
|
/**
|
|
1339
|
-
*
|
|
1777
|
+
* MIME type of the receipt file, such as `application/pdf`. Null when it cannot be
|
|
1778
|
+
* determined.
|
|
1340
1779
|
*/
|
|
1341
|
-
|
|
1780
|
+
content_type?: string | null;
|
|
1781
|
+
|
|
1782
|
+
/**
|
|
1783
|
+
* Name of the receipt file. Null when it was not recorded.
|
|
1784
|
+
*/
|
|
1785
|
+
file_name?: string | null;
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* URL of an image preview of the receipt. Null when the receipt is itself an image
|
|
1789
|
+
* or no preview is available. Like `url`, the link is signed and expires.
|
|
1790
|
+
*/
|
|
1791
|
+
preview_url?: string | null;
|
|
1342
1792
|
}
|
|
1343
1793
|
|
|
1344
1794
|
/**
|
|
@@ -1381,31 +1831,1423 @@ export namespace CardTransactionRetrieveResponse {
|
|
|
1381
1831
|
}
|
|
1382
1832
|
}
|
|
1383
1833
|
|
|
1384
|
-
|
|
1385
|
-
|
|
1834
|
+
/**
|
|
1835
|
+
* A Finance card transaction or authorization the caller can see.
|
|
1836
|
+
*
|
|
1837
|
+
* An authorization is a pending hold the card network places at the time of purchase. A card transaction
|
|
1838
|
+
* is the posted charge. List returns both; retrieve returns one by ID. A transaction the
|
|
1839
|
+
* caller cannot see returns 404, the same as one that does not exist.
|
|
1840
|
+
* PATCH `/card-transactions/{id}/` accepts only `line_items` and replaces the entire list.
|
|
1841
|
+
* Request `amount` and `tax_amount` are decimal strings (for example `"75.00"`), not Currency
|
|
1842
|
+
* objects. GET responses return those fields as Currency objects (`currency_type` + `value`).
|
|
1843
|
+
* The sum of request `amount` values must equal the transaction's merchant amount.
|
|
1844
|
+
*/
|
|
1845
|
+
export interface CardTransactionUpdateResponse {
|
|
1846
|
+
/**
|
|
1847
|
+
* Identifier field
|
|
1848
|
+
*/
|
|
1849
|
+
id: string;
|
|
1386
1850
|
|
|
1387
|
-
|
|
1851
|
+
/**
|
|
1852
|
+
* Record creation date
|
|
1853
|
+
*/
|
|
1854
|
+
created_at: string;
|
|
1388
1855
|
|
|
1389
|
-
|
|
1856
|
+
/**
|
|
1857
|
+
* Record update date
|
|
1858
|
+
*/
|
|
1859
|
+
updated_at: string;
|
|
1390
1860
|
|
|
1391
1861
|
/**
|
|
1392
|
-
*
|
|
1862
|
+
* Date the transaction is booked in the accounting system, as an ISO 8601 date
|
|
1863
|
+
* (YYYY-MM-DD).
|
|
1393
1864
|
*/
|
|
1394
|
-
|
|
1865
|
+
accounting_date?: string;
|
|
1395
1866
|
|
|
1396
|
-
|
|
1397
|
-
|
|
1867
|
+
/**
|
|
1868
|
+
* Approval status of the transaction. `DRAFT`: not submitted for approval.
|
|
1869
|
+
* `PENDING`: awaiting required information or submission before approval.
|
|
1870
|
+
* `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`:
|
|
1871
|
+
* rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or
|
|
1872
|
+
* reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null
|
|
1873
|
+
* for card authorizations.
|
|
1874
|
+
*/
|
|
1875
|
+
approval_status?:
|
|
1876
|
+
| 'DRAFT'
|
|
1877
|
+
| 'PENDING'
|
|
1878
|
+
| 'REQUESTED'
|
|
1879
|
+
| 'APPROVED'
|
|
1880
|
+
| 'REJECTED'
|
|
1881
|
+
| 'FINALIZED'
|
|
1882
|
+
| 'ACTIONED'
|
|
1883
|
+
| 'CANCELLED'
|
|
1884
|
+
| 'FAILED';
|
|
1398
1885
|
|
|
1399
|
-
|
|
1400
|
-
|
|
1886
|
+
/**
|
|
1887
|
+
* Other attached files, including filenames and recorded upload metadata.
|
|
1888
|
+
*/
|
|
1889
|
+
attachments?: Array<CardTransactionUpdateResponse.Attachment>;
|
|
1890
|
+
|
|
1891
|
+
/**
|
|
1892
|
+
* State of the card authorization. `PENDING`: an active hold awaiting completion.
|
|
1893
|
+
* `CLOSED`: the authorization was declined, or it completed and was replaced by a
|
|
1894
|
+
* posted card transaction. `REVERSED`: the authorization was reversed and the hold
|
|
1895
|
+
* released. `EXPIRED`: the hold expired without completion. Null for posted card
|
|
1896
|
+
* transactions.
|
|
1897
|
+
*/
|
|
1898
|
+
authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED';
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* ID of the Finance card used. No public API is currently available to retrieve
|
|
1902
|
+
* this card.
|
|
1903
|
+
*/
|
|
1904
|
+
card_id?: string;
|
|
1905
|
+
|
|
1906
|
+
/**
|
|
1907
|
+
* Amount in the company's headquarters currency. The `value` is a decimal string.
|
|
1908
|
+
*/
|
|
1909
|
+
company_amount?: CardTransactionUpdateResponse.CompanyAmount;
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* ID of the legal entity the transaction belongs to. Use it with
|
|
1913
|
+
* `/company-legal-entities/{id}/`.
|
|
1914
|
+
*/
|
|
1915
|
+
entity_id?: string;
|
|
1916
|
+
|
|
1917
|
+
/**
|
|
1918
|
+
* State of the sync to the accounting system. `NOT_FINALIZED`: not ready for
|
|
1919
|
+
* accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`:
|
|
1920
|
+
* sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync
|
|
1921
|
+
* failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for
|
|
1922
|
+
* accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to
|
|
1923
|
+
* be synced automatically. Null when no sync state is set.
|
|
1924
|
+
*/
|
|
1925
|
+
gl_sync_state?:
|
|
1926
|
+
| 'NOT_FINALIZED'
|
|
1927
|
+
| 'FOR_REVIEW'
|
|
1928
|
+
| 'PENDING_SYNC'
|
|
1929
|
+
| 'SYNCED'
|
|
1930
|
+
| 'ERROR'
|
|
1931
|
+
| 'DO_NOT_SYNC'
|
|
1932
|
+
| 'EXPORTED'
|
|
1933
|
+
| 'NOT_SYNCABLE'
|
|
1934
|
+
| 'AUTO_SYNC';
|
|
1935
|
+
|
|
1936
|
+
/**
|
|
1937
|
+
* Vendor in the connected accounting system.
|
|
1938
|
+
*/
|
|
1939
|
+
gl_vendor?: CardTransactionUpdateResponse.GlVendor;
|
|
1940
|
+
|
|
1941
|
+
/**
|
|
1942
|
+
* Category splits of the transaction amount. Updates replace the entire list.
|
|
1943
|
+
*/
|
|
1944
|
+
line_items?: Array<CardTransactionUpdateResponse.LineItem>;
|
|
1945
|
+
|
|
1946
|
+
/**
|
|
1947
|
+
* Memo entered on the transaction.
|
|
1948
|
+
*/
|
|
1949
|
+
memo?: string;
|
|
1950
|
+
|
|
1951
|
+
/**
|
|
1952
|
+
* Amount charged by the merchant, in the merchant currency. The `value` is a
|
|
1953
|
+
* decimal string.
|
|
1954
|
+
*/
|
|
1955
|
+
merchant_amount?: CardTransactionUpdateResponse.MerchantAmount;
|
|
1956
|
+
|
|
1957
|
+
/**
|
|
1958
|
+
* Receipt files attached to the transaction, in display order, up to 5. Empty when
|
|
1959
|
+
* there are none. Null when the caller cannot read the transaction's receipts.
|
|
1960
|
+
*/
|
|
1961
|
+
receipts?: Array<CardTransactionUpdateResponse.Receipt> | null;
|
|
1962
|
+
|
|
1963
|
+
/**
|
|
1964
|
+
* When the purchase or authorization happened, as an ISO 8601 date-time in UTC.
|
|
1965
|
+
*/
|
|
1966
|
+
transaction_date?: string;
|
|
1967
|
+
|
|
1968
|
+
/**
|
|
1969
|
+
* `CARD_TRANSACTION`: a posted card charge. `CARD_AUTHORIZATION`: a hold placed by
|
|
1970
|
+
* the card network before the charge posts.
|
|
1971
|
+
*/
|
|
1972
|
+
transaction_type?: 'CARD_TRANSACTION' | 'CARD_AUTHORIZATION';
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`.
|
|
1976
|
+
*
|
|
1977
|
+
* Expandable field
|
|
1978
|
+
*/
|
|
1979
|
+
vendor?: CardTransactionUpdateResponse.Vendor;
|
|
1980
|
+
|
|
1981
|
+
/**
|
|
1982
|
+
* ID of the Finance vendor. Use it with `/finance-vendors/{id}/`.
|
|
1983
|
+
*/
|
|
1984
|
+
vendor_id?: string;
|
|
1985
|
+
|
|
1986
|
+
/**
|
|
1987
|
+
* Worker details. Expand with `card-transactions.read` and `workers.read`.
|
|
1988
|
+
*
|
|
1989
|
+
* Expandable field
|
|
1990
|
+
*/
|
|
1991
|
+
worker?: WorkersAPI.Worker;
|
|
1992
|
+
|
|
1993
|
+
/**
|
|
1994
|
+
* ID of the worker who made the transaction. Use it with `/workers/{id}/`.
|
|
1995
|
+
*/
|
|
1996
|
+
worker_id?: string;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
export namespace CardTransactionUpdateResponse {
|
|
2000
|
+
/**
|
|
2001
|
+
* A Finance transaction attachment with recorded upload details.
|
|
2002
|
+
*/
|
|
2003
|
+
export interface Attachment {
|
|
2004
|
+
/**
|
|
2005
|
+
* URL for accessing the file.
|
|
2006
|
+
*/
|
|
2007
|
+
url: string;
|
|
2008
|
+
|
|
2009
|
+
/**
|
|
2010
|
+
* Original file name, when recorded.
|
|
2011
|
+
*/
|
|
2012
|
+
file_name?: string;
|
|
2013
|
+
|
|
2014
|
+
/**
|
|
2015
|
+
* When the attachment was uploaded, as an ISO 8601 date-time in UTC, when
|
|
2016
|
+
* recorded.
|
|
2017
|
+
*/
|
|
2018
|
+
uploaded_at?: string;
|
|
2019
|
+
|
|
2020
|
+
/**
|
|
2021
|
+
* ID of the worker who uploaded the attachment. Use it with `/workers/{id}/`.
|
|
2022
|
+
*/
|
|
2023
|
+
uploaded_by_id?: string;
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
/**
|
|
2027
|
+
* Amount in the company's headquarters currency. The `value` is a decimal string.
|
|
2028
|
+
*/
|
|
2029
|
+
export interface CompanyAmount {
|
|
2030
|
+
/**
|
|
2031
|
+
* The currency type, ex: USD, EUR, etc.
|
|
2032
|
+
*/
|
|
2033
|
+
currency_type?: string;
|
|
2034
|
+
|
|
2035
|
+
/**
|
|
2036
|
+
* The decimal amount for the currency.
|
|
2037
|
+
*/
|
|
2038
|
+
value?: number;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
/**
|
|
2042
|
+
* Vendor in the connected accounting system.
|
|
2043
|
+
*/
|
|
2044
|
+
export interface GlVendor {
|
|
2045
|
+
/**
|
|
2046
|
+
* ID of the accounting vendor in Rippling.
|
|
2047
|
+
*/
|
|
2048
|
+
id?: string;
|
|
2049
|
+
|
|
2050
|
+
/**
|
|
2051
|
+
* ID of the vendor in the accounting system.
|
|
2052
|
+
*/
|
|
2053
|
+
gl_vendor_id?: string;
|
|
2054
|
+
|
|
2055
|
+
/**
|
|
2056
|
+
* Name of the vendor in the accounting system.
|
|
2057
|
+
*/
|
|
2058
|
+
name?: string;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
export interface LineItem {
|
|
2062
|
+
/**
|
|
2063
|
+
* Unique identifier of this line item. Null for older line items that have not
|
|
2064
|
+
* been assigned one yet.
|
|
2065
|
+
*/
|
|
2066
|
+
id?: string;
|
|
2067
|
+
|
|
2068
|
+
/**
|
|
2069
|
+
* Whether this line is amortized.
|
|
2070
|
+
*/
|
|
2071
|
+
amortized?: boolean;
|
|
2072
|
+
|
|
2073
|
+
/**
|
|
2074
|
+
* Amount of this split, in the merchant currency. The `value` is a decimal string.
|
|
2075
|
+
*/
|
|
2076
|
+
amount?: LineItem.Amount;
|
|
2077
|
+
|
|
2078
|
+
/**
|
|
2079
|
+
* ID of the Finance category assigned to this split. Use it with
|
|
2080
|
+
* `/finance-categories/{id}/`. The category name is in `category_name`.
|
|
2081
|
+
*/
|
|
2082
|
+
category_id?: string;
|
|
2083
|
+
|
|
2084
|
+
/**
|
|
2085
|
+
* Name of the finance category.
|
|
2086
|
+
*/
|
|
2087
|
+
category_name?: string;
|
|
2088
|
+
|
|
2089
|
+
/**
|
|
2090
|
+
* Selected dimension values, keyed by dimension ID. `DEPARTMENT` and
|
|
2091
|
+
* `WORK_LOCATION` are the built-in keys. Get custom dimension IDs from
|
|
2092
|
+
* `/job-dimensions/` and `/job-dimensions/{id}/`. Each choice `value` is a job
|
|
2093
|
+
* code ID from `/job-codes/` and `/job-codes/{id}/`.
|
|
2094
|
+
*/
|
|
2095
|
+
dimension_choices?: { [key: string]: LineItem.DimensionChoices };
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* End of the amortization period (YYYY-MM-DD).
|
|
2099
|
+
*/
|
|
2100
|
+
end_date?: string;
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* ERP amortization schedule associated with this line.
|
|
2104
|
+
*/
|
|
2105
|
+
gl_amortization_schedule?: LineItem.GlAmortizationSchedule;
|
|
2106
|
+
|
|
2107
|
+
/**
|
|
2108
|
+
* ERP amortization template for this line.
|
|
2109
|
+
*/
|
|
2110
|
+
gl_amortization_template?: LineItem.GlAmortizationTemplate;
|
|
2111
|
+
|
|
2112
|
+
/**
|
|
2113
|
+
* Whether this split is billed to `gl_customer` in the accounting system.
|
|
2114
|
+
* `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not
|
|
2115
|
+
* set.
|
|
2116
|
+
*/
|
|
2117
|
+
gl_billable?: 'BILLABLE' | 'NOT_BILLABLE';
|
|
2118
|
+
|
|
2119
|
+
/**
|
|
2120
|
+
* ID of the customer record in the connected accounting integration. No public
|
|
2121
|
+
* Rippling API is currently available to retrieve this accounting customer.
|
|
2122
|
+
*/
|
|
2123
|
+
gl_customer?: string;
|
|
2124
|
+
|
|
2125
|
+
/**
|
|
2126
|
+
* Rippling ID of the accounting tax code. No public Rippling API is currently
|
|
2127
|
+
* available to retrieve this accounting tax code.
|
|
2128
|
+
*/
|
|
2129
|
+
gl_tax_code?: string;
|
|
2130
|
+
|
|
2131
|
+
/**
|
|
2132
|
+
* Memo entered on this split.
|
|
2133
|
+
*/
|
|
2134
|
+
memo?: string;
|
|
2135
|
+
|
|
2136
|
+
/**
|
|
2137
|
+
* Prepaid asset account for Rippling-managed amortization.
|
|
2138
|
+
*/
|
|
2139
|
+
prepaid_account?: LineItem.PrepaidAccount;
|
|
2140
|
+
|
|
2141
|
+
/**
|
|
2142
|
+
* Start of the amortization period (YYYY-MM-DD).
|
|
2143
|
+
*/
|
|
2144
|
+
start_date?: string;
|
|
2145
|
+
|
|
2146
|
+
/**
|
|
2147
|
+
* Total tax amount for this line in the merchant currency.
|
|
2148
|
+
*/
|
|
2149
|
+
tax_amount?: LineItem.TaxAmount;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
export namespace LineItem {
|
|
2153
|
+
/**
|
|
2154
|
+
* Amount of this split, in the merchant currency. The `value` is a decimal string.
|
|
2155
|
+
*/
|
|
2156
|
+
export interface Amount {
|
|
2157
|
+
/**
|
|
2158
|
+
* The currency type, ex: USD, EUR, etc.
|
|
2159
|
+
*/
|
|
2160
|
+
currency_type?: string;
|
|
2161
|
+
|
|
2162
|
+
/**
|
|
2163
|
+
* The decimal amount for the currency.
|
|
2164
|
+
*/
|
|
2165
|
+
value?: number;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
export interface DimensionChoices {
|
|
2169
|
+
/**
|
|
2170
|
+
* Name of the dimension, such as Department.
|
|
2171
|
+
*/
|
|
2172
|
+
dimension_name?: string;
|
|
2173
|
+
|
|
2174
|
+
/**
|
|
2175
|
+
* Display name of the selected dimension value.
|
|
2176
|
+
*/
|
|
2177
|
+
label?: string;
|
|
2178
|
+
|
|
2179
|
+
/**
|
|
2180
|
+
* ID of the selected value. For `DEPARTMENT` use `/departments/{id}/`, for
|
|
2181
|
+
* `WORK_LOCATION` use `/work-locations/{id}/`, and for a custom job dimension use
|
|
2182
|
+
* `/job-codes/{id}/`.
|
|
2183
|
+
*/
|
|
2184
|
+
value?: string;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
/**
|
|
2188
|
+
* ERP amortization schedule associated with this line.
|
|
2189
|
+
*/
|
|
2190
|
+
export interface GlAmortizationSchedule {
|
|
2191
|
+
/**
|
|
2192
|
+
* Rippling ID of the accounting integration that owns this object. No public
|
|
2193
|
+
* Rippling API is currently available to retrieve this accounting integration.
|
|
2194
|
+
*/
|
|
2195
|
+
accounting_integration_id?: string;
|
|
2196
|
+
|
|
2197
|
+
/**
|
|
2198
|
+
* Number of amortization periods.
|
|
2199
|
+
*/
|
|
2200
|
+
amortization_period?: number;
|
|
2201
|
+
|
|
2202
|
+
/**
|
|
2203
|
+
* End of the ERP amortization schedule as an ISO 8601 timestamp (for example,
|
|
2204
|
+
* 2026-12-31T00:00:00). May omit a timezone offset; an omitted offset does not
|
|
2205
|
+
* indicate UTC. Null when not set.
|
|
2206
|
+
*/
|
|
2207
|
+
end_date?: string;
|
|
2208
|
+
|
|
2209
|
+
/**
|
|
2210
|
+
* Object ID in the connected accounting system.
|
|
2211
|
+
*/
|
|
2212
|
+
gl_object_id?: string;
|
|
2213
|
+
|
|
2214
|
+
/**
|
|
2215
|
+
* Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE
|
|
2216
|
+
* defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization;
|
|
2217
|
+
* GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general
|
|
2218
|
+
* ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an
|
|
2219
|
+
* accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor,
|
|
2220
|
+
* customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null
|
|
2221
|
+
* when not set.
|
|
2222
|
+
*/
|
|
2223
|
+
gl_object_type?:
|
|
2224
|
+
| 'GL_AMORTIZATION_TEMPLATE'
|
|
2225
|
+
| 'GL_AMORTIZATION_SCHEDULE'
|
|
2226
|
+
| 'GL_AMORTIZATION_SCHEDULE_RECURRENCE'
|
|
2227
|
+
| 'GL_ACCOUNT'
|
|
2228
|
+
| 'GL_JOURNAL_ENTRY'
|
|
2229
|
+
| 'GL_POSTING_PERIOD'
|
|
2230
|
+
| 'GL_VENDOR'
|
|
2231
|
+
| 'GL_CUSTOMER'
|
|
2232
|
+
| 'GL_EMPLOYEE'
|
|
2233
|
+
| 'GL_SUBSIDIARY';
|
|
2234
|
+
|
|
2235
|
+
/**
|
|
2236
|
+
* Accounting object name.
|
|
2237
|
+
*/
|
|
2238
|
+
name?: string;
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* Start of the ERP amortization schedule as an ISO 8601 timestamp (for example,
|
|
2242
|
+
* 2026-01-01T00:00:00). May omit a timezone offset; an omitted offset does not
|
|
2243
|
+
* indicate UTC. Null when not set.
|
|
2244
|
+
*/
|
|
2245
|
+
start_date?: string;
|
|
2246
|
+
|
|
2247
|
+
/**
|
|
2248
|
+
* ERP amortization schedule status: NOT_STARTED means amortization has not begun;
|
|
2249
|
+
* IN_PROGRESS means amortization is underway; COMPLETED means amortization is
|
|
2250
|
+
* complete; ON_HOLD means amortization is paused. Null when not set.
|
|
2251
|
+
*/
|
|
2252
|
+
status?: 'NOT_STARTED' | 'IN_PROGRESS' | 'COMPLETED' | 'ON_HOLD';
|
|
2253
|
+
|
|
2254
|
+
/**
|
|
2255
|
+
* Amount already amortized as reported by the ERP, in the same currency as
|
|
2256
|
+
* total_amount. No currency conversion is applied; the schedule currency code is
|
|
2257
|
+
* not available in this response.
|
|
2258
|
+
*/
|
|
2259
|
+
total_amortized_amount?: number;
|
|
2260
|
+
|
|
2261
|
+
/**
|
|
2262
|
+
* Total schedule amount as reported by the ERP, without currency conversion. The
|
|
2263
|
+
* schedule currency code is not available in this response.
|
|
2264
|
+
*/
|
|
2265
|
+
total_amount?: number;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
/**
|
|
2269
|
+
* ERP amortization template for this line.
|
|
2270
|
+
*/
|
|
2271
|
+
export interface GlAmortizationTemplate {
|
|
2272
|
+
/**
|
|
2273
|
+
* Rippling ID of the accounting integration that owns this object. No public
|
|
2274
|
+
* Rippling API is currently available to retrieve this accounting integration.
|
|
2275
|
+
*/
|
|
2276
|
+
accounting_integration_id?: string;
|
|
2277
|
+
|
|
2278
|
+
/**
|
|
2279
|
+
* Object ID in the connected accounting system.
|
|
2280
|
+
*/
|
|
2281
|
+
gl_object_id?: string;
|
|
2282
|
+
|
|
2283
|
+
/**
|
|
2284
|
+
* Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE
|
|
2285
|
+
* defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization;
|
|
2286
|
+
* GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general
|
|
2287
|
+
* ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an
|
|
2288
|
+
* accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor,
|
|
2289
|
+
* customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null
|
|
2290
|
+
* when not set.
|
|
2291
|
+
*/
|
|
2292
|
+
gl_object_type?:
|
|
2293
|
+
| 'GL_AMORTIZATION_TEMPLATE'
|
|
2294
|
+
| 'GL_AMORTIZATION_SCHEDULE'
|
|
2295
|
+
| 'GL_AMORTIZATION_SCHEDULE_RECURRENCE'
|
|
2296
|
+
| 'GL_ACCOUNT'
|
|
2297
|
+
| 'GL_JOURNAL_ENTRY'
|
|
2298
|
+
| 'GL_POSTING_PERIOD'
|
|
2299
|
+
| 'GL_VENDOR'
|
|
2300
|
+
| 'GL_CUSTOMER'
|
|
2301
|
+
| 'GL_EMPLOYEE'
|
|
2302
|
+
| 'GL_SUBSIDIARY';
|
|
2303
|
+
|
|
2304
|
+
/**
|
|
2305
|
+
* Accounting object name.
|
|
2306
|
+
*/
|
|
2307
|
+
name?: string;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
/**
|
|
2311
|
+
* Prepaid asset account for Rippling-managed amortization.
|
|
2312
|
+
*/
|
|
2313
|
+
export interface PrepaidAccount {
|
|
2314
|
+
/**
|
|
2315
|
+
* Account ID in the connected accounting system.
|
|
2316
|
+
*/
|
|
2317
|
+
account_id?: string;
|
|
2318
|
+
|
|
2319
|
+
/**
|
|
2320
|
+
* Account code.
|
|
2321
|
+
*/
|
|
2322
|
+
code?: string;
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* Account name.
|
|
2326
|
+
*/
|
|
2327
|
+
name?: string;
|
|
2328
|
+
|
|
2329
|
+
/**
|
|
2330
|
+
* IDs of custom dimensions required by this account.
|
|
2331
|
+
*/
|
|
2332
|
+
required_custom_dimensions?: Array<string>;
|
|
2333
|
+
|
|
2334
|
+
/**
|
|
2335
|
+
* Whether this account requires a department.
|
|
2336
|
+
*/
|
|
2337
|
+
requires_department?: boolean;
|
|
2338
|
+
|
|
2339
|
+
/**
|
|
2340
|
+
* Whether this account requires a work location.
|
|
2341
|
+
*/
|
|
2342
|
+
requires_work_location?: boolean;
|
|
2343
|
+
|
|
2344
|
+
/**
|
|
2345
|
+
* Accounting account type: RECEIVABLE for accounts receivable, PAYABLE for
|
|
2346
|
+
* accounts payable, EXPENSE for expense accounts, or BANK for bank accounts. Null
|
|
2347
|
+
* when not set.
|
|
2348
|
+
*/
|
|
2349
|
+
type?: 'RECEIVABLE' | 'PAYABLE' | 'EXPENSE' | 'BANK';
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* Total tax amount for this line in the merchant currency.
|
|
2354
|
+
*/
|
|
2355
|
+
export interface TaxAmount {
|
|
2356
|
+
/**
|
|
2357
|
+
* The currency type, ex: USD, EUR, etc.
|
|
2358
|
+
*/
|
|
2359
|
+
currency_type?: string;
|
|
2360
|
+
|
|
2361
|
+
/**
|
|
2362
|
+
* The decimal amount for the currency.
|
|
2363
|
+
*/
|
|
2364
|
+
value?: number;
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* Amount charged by the merchant, in the merchant currency. The `value` is a
|
|
2370
|
+
* decimal string.
|
|
2371
|
+
*/
|
|
2372
|
+
export interface MerchantAmount {
|
|
2373
|
+
/**
|
|
2374
|
+
* The currency type, ex: USD, EUR, etc.
|
|
2375
|
+
*/
|
|
2376
|
+
currency_type?: string;
|
|
2377
|
+
|
|
2378
|
+
/**
|
|
2379
|
+
* The decimal amount for the currency.
|
|
2380
|
+
*/
|
|
2381
|
+
value?: number;
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
/**
|
|
2385
|
+
* A receipt file attached to a card transaction.
|
|
2386
|
+
*/
|
|
2387
|
+
export interface Receipt {
|
|
2388
|
+
/**
|
|
2389
|
+
* URL of the original receipt file, such as the uploaded PDF. The link is signed
|
|
2390
|
+
* and expires, so fetch the transaction again for a current link instead of
|
|
2391
|
+
* storing it.
|
|
2392
|
+
*/
|
|
2393
|
+
url: string;
|
|
2394
|
+
|
|
2395
|
+
/**
|
|
2396
|
+
* MIME type of the receipt file, such as `application/pdf`. Null when it cannot be
|
|
2397
|
+
* determined.
|
|
2398
|
+
*/
|
|
2399
|
+
content_type?: string | null;
|
|
2400
|
+
|
|
2401
|
+
/**
|
|
2402
|
+
* Name of the receipt file. Null when it was not recorded.
|
|
2403
|
+
*/
|
|
2404
|
+
file_name?: string | null;
|
|
2405
|
+
|
|
2406
|
+
/**
|
|
2407
|
+
* URL of an image preview of the receipt. Null when the receipt is itself an image
|
|
2408
|
+
* or no preview is available. Like `url`, the link is signed and expires.
|
|
2409
|
+
*/
|
|
2410
|
+
preview_url?: string | null;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
/**
|
|
2414
|
+
* Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`.
|
|
2415
|
+
*
|
|
2416
|
+
* Expandable field
|
|
2417
|
+
*/
|
|
2418
|
+
export interface Vendor {
|
|
2419
|
+
/**
|
|
2420
|
+
* Identifier field
|
|
2421
|
+
*/
|
|
2422
|
+
id: string;
|
|
2423
|
+
|
|
2424
|
+
/**
|
|
2425
|
+
* Record creation date
|
|
2426
|
+
*/
|
|
2427
|
+
created_at: string;
|
|
2428
|
+
|
|
2429
|
+
/**
|
|
2430
|
+
* Record update date
|
|
2431
|
+
*/
|
|
2432
|
+
updated_at: string;
|
|
2433
|
+
|
|
2434
|
+
/**
|
|
2435
|
+
* Whether the vendor is archived. Archived vendors remain available for historical
|
|
2436
|
+
* references.
|
|
2437
|
+
*/
|
|
2438
|
+
is_archived?: boolean;
|
|
2439
|
+
|
|
2440
|
+
/**
|
|
2441
|
+
* URL of the vendor's logo. Null when no logo is available.
|
|
2442
|
+
*/
|
|
2443
|
+
logo?: string;
|
|
2444
|
+
|
|
2445
|
+
/**
|
|
2446
|
+
* Canonical name of the Finance vendor. Name eq, ne, and in filters also match
|
|
2447
|
+
* alternate names.
|
|
2448
|
+
*/
|
|
2449
|
+
name?: string;
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
/**
|
|
2454
|
+
* A Finance card transaction or authorization the caller can see.
|
|
2455
|
+
*
|
|
2456
|
+
* An authorization is a pending hold the card network places at the time of purchase. A card transaction
|
|
2457
|
+
* is the posted charge. List returns both; retrieve returns one by ID. A transaction the
|
|
2458
|
+
* caller cannot see returns 404, the same as one that does not exist.
|
|
2459
|
+
* PATCH `/card-transactions/{id}/` accepts only `line_items` and replaces the entire list.
|
|
2460
|
+
* Request `amount` and `tax_amount` are decimal strings (for example `"75.00"`), not Currency
|
|
2461
|
+
* objects. GET responses return those fields as Currency objects (`currency_type` + `value`).
|
|
2462
|
+
* The sum of request `amount` values must equal the transaction's merchant amount.
|
|
2463
|
+
*/
|
|
2464
|
+
export interface CardTransactionUploadReceiptResponse {
|
|
2465
|
+
/**
|
|
2466
|
+
* Identifier field
|
|
2467
|
+
*/
|
|
2468
|
+
id: string;
|
|
2469
|
+
|
|
2470
|
+
/**
|
|
2471
|
+
* Record creation date
|
|
2472
|
+
*/
|
|
2473
|
+
created_at: string;
|
|
2474
|
+
|
|
2475
|
+
/**
|
|
2476
|
+
* Record update date
|
|
2477
|
+
*/
|
|
2478
|
+
updated_at: string;
|
|
2479
|
+
|
|
2480
|
+
/**
|
|
2481
|
+
* Date the transaction is booked in the accounting system, as an ISO 8601 date
|
|
2482
|
+
* (YYYY-MM-DD).
|
|
2483
|
+
*/
|
|
2484
|
+
accounting_date?: string;
|
|
2485
|
+
|
|
2486
|
+
/**
|
|
2487
|
+
* Approval status of the transaction. `DRAFT`: not submitted for approval.
|
|
2488
|
+
* `PENDING`: awaiting required information or submission before approval.
|
|
2489
|
+
* `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`:
|
|
2490
|
+
* rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or
|
|
2491
|
+
* reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null
|
|
2492
|
+
* for card authorizations.
|
|
2493
|
+
*/
|
|
2494
|
+
approval_status?:
|
|
2495
|
+
| 'DRAFT'
|
|
2496
|
+
| 'PENDING'
|
|
2497
|
+
| 'REQUESTED'
|
|
2498
|
+
| 'APPROVED'
|
|
2499
|
+
| 'REJECTED'
|
|
2500
|
+
| 'FINALIZED'
|
|
2501
|
+
| 'ACTIONED'
|
|
2502
|
+
| 'CANCELLED'
|
|
2503
|
+
| 'FAILED';
|
|
2504
|
+
|
|
2505
|
+
/**
|
|
2506
|
+
* Other attached files, including filenames and recorded upload metadata.
|
|
2507
|
+
*/
|
|
2508
|
+
attachments?: Array<CardTransactionUploadReceiptResponse.Attachment>;
|
|
2509
|
+
|
|
2510
|
+
/**
|
|
2511
|
+
* State of the card authorization. `PENDING`: an active hold awaiting completion.
|
|
2512
|
+
* `CLOSED`: the authorization was declined, or it completed and was replaced by a
|
|
2513
|
+
* posted card transaction. `REVERSED`: the authorization was reversed and the hold
|
|
2514
|
+
* released. `EXPIRED`: the hold expired without completion. Null for posted card
|
|
2515
|
+
* transactions.
|
|
2516
|
+
*/
|
|
2517
|
+
authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED';
|
|
2518
|
+
|
|
2519
|
+
/**
|
|
2520
|
+
* ID of the Finance card used. No public API is currently available to retrieve
|
|
2521
|
+
* this card.
|
|
2522
|
+
*/
|
|
2523
|
+
card_id?: string;
|
|
2524
|
+
|
|
2525
|
+
/**
|
|
2526
|
+
* Amount in the company's headquarters currency. The `value` is a decimal string.
|
|
2527
|
+
*/
|
|
2528
|
+
company_amount?: CardTransactionUploadReceiptResponse.CompanyAmount;
|
|
2529
|
+
|
|
2530
|
+
/**
|
|
2531
|
+
* ID of the legal entity the transaction belongs to. Use it with
|
|
2532
|
+
* `/company-legal-entities/{id}/`.
|
|
2533
|
+
*/
|
|
2534
|
+
entity_id?: string;
|
|
2535
|
+
|
|
2536
|
+
/**
|
|
2537
|
+
* State of the sync to the accounting system. `NOT_FINALIZED`: not ready for
|
|
2538
|
+
* accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`:
|
|
2539
|
+
* sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync
|
|
2540
|
+
* failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for
|
|
2541
|
+
* accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to
|
|
2542
|
+
* be synced automatically. Null when no sync state is set.
|
|
2543
|
+
*/
|
|
2544
|
+
gl_sync_state?:
|
|
2545
|
+
| 'NOT_FINALIZED'
|
|
2546
|
+
| 'FOR_REVIEW'
|
|
2547
|
+
| 'PENDING_SYNC'
|
|
2548
|
+
| 'SYNCED'
|
|
2549
|
+
| 'ERROR'
|
|
2550
|
+
| 'DO_NOT_SYNC'
|
|
2551
|
+
| 'EXPORTED'
|
|
2552
|
+
| 'NOT_SYNCABLE'
|
|
2553
|
+
| 'AUTO_SYNC';
|
|
2554
|
+
|
|
2555
|
+
/**
|
|
2556
|
+
* Vendor in the connected accounting system.
|
|
2557
|
+
*/
|
|
2558
|
+
gl_vendor?: CardTransactionUploadReceiptResponse.GlVendor;
|
|
2559
|
+
|
|
2560
|
+
/**
|
|
2561
|
+
* Category splits of the transaction amount. Updates replace the entire list.
|
|
2562
|
+
*/
|
|
2563
|
+
line_items?: Array<CardTransactionUploadReceiptResponse.LineItem>;
|
|
2564
|
+
|
|
2565
|
+
/**
|
|
2566
|
+
* Memo entered on the transaction.
|
|
2567
|
+
*/
|
|
2568
|
+
memo?: string;
|
|
2569
|
+
|
|
2570
|
+
/**
|
|
2571
|
+
* Amount charged by the merchant, in the merchant currency. The `value` is a
|
|
2572
|
+
* decimal string.
|
|
2573
|
+
*/
|
|
2574
|
+
merchant_amount?: CardTransactionUploadReceiptResponse.MerchantAmount;
|
|
2575
|
+
|
|
2576
|
+
/**
|
|
2577
|
+
* Receipt files attached to the transaction, in display order, up to 5. Empty when
|
|
2578
|
+
* there are none. Null when the caller cannot read the transaction's receipts.
|
|
2579
|
+
*/
|
|
2580
|
+
receipts?: Array<CardTransactionUploadReceiptResponse.Receipt> | null;
|
|
2581
|
+
|
|
2582
|
+
/**
|
|
2583
|
+
* When the purchase or authorization happened, as an ISO 8601 date-time in UTC.
|
|
2584
|
+
*/
|
|
2585
|
+
transaction_date?: string;
|
|
2586
|
+
|
|
2587
|
+
/**
|
|
2588
|
+
* `CARD_TRANSACTION`: a posted card charge. `CARD_AUTHORIZATION`: a hold placed by
|
|
2589
|
+
* the card network before the charge posts.
|
|
2590
|
+
*/
|
|
2591
|
+
transaction_type?: 'CARD_TRANSACTION' | 'CARD_AUTHORIZATION';
|
|
2592
|
+
|
|
2593
|
+
/**
|
|
2594
|
+
* Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`.
|
|
2595
|
+
*
|
|
2596
|
+
* Expandable field
|
|
2597
|
+
*/
|
|
2598
|
+
vendor?: CardTransactionUploadReceiptResponse.Vendor;
|
|
2599
|
+
|
|
2600
|
+
/**
|
|
2601
|
+
* ID of the Finance vendor. Use it with `/finance-vendors/{id}/`.
|
|
2602
|
+
*/
|
|
2603
|
+
vendor_id?: string;
|
|
2604
|
+
|
|
2605
|
+
/**
|
|
2606
|
+
* Worker details. Expand with `card-transactions.read` and `workers.read`.
|
|
2607
|
+
*
|
|
2608
|
+
* Expandable field
|
|
2609
|
+
*/
|
|
2610
|
+
worker?: WorkersAPI.Worker;
|
|
2611
|
+
|
|
2612
|
+
/**
|
|
2613
|
+
* ID of the worker who made the transaction. Use it with `/workers/{id}/`.
|
|
2614
|
+
*/
|
|
2615
|
+
worker_id?: string;
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
export namespace CardTransactionUploadReceiptResponse {
|
|
2619
|
+
/**
|
|
2620
|
+
* A Finance transaction attachment with recorded upload details.
|
|
2621
|
+
*/
|
|
2622
|
+
export interface Attachment {
|
|
2623
|
+
/**
|
|
2624
|
+
* URL for accessing the file.
|
|
2625
|
+
*/
|
|
2626
|
+
url: string;
|
|
2627
|
+
|
|
2628
|
+
/**
|
|
2629
|
+
* Original file name, when recorded.
|
|
2630
|
+
*/
|
|
2631
|
+
file_name?: string;
|
|
2632
|
+
|
|
2633
|
+
/**
|
|
2634
|
+
* When the attachment was uploaded, as an ISO 8601 date-time in UTC, when
|
|
2635
|
+
* recorded.
|
|
2636
|
+
*/
|
|
2637
|
+
uploaded_at?: string;
|
|
2638
|
+
|
|
2639
|
+
/**
|
|
2640
|
+
* ID of the worker who uploaded the attachment. Use it with `/workers/{id}/`.
|
|
2641
|
+
*/
|
|
2642
|
+
uploaded_by_id?: string;
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2645
|
+
/**
|
|
2646
|
+
* Amount in the company's headquarters currency. The `value` is a decimal string.
|
|
2647
|
+
*/
|
|
2648
|
+
export interface CompanyAmount {
|
|
2649
|
+
/**
|
|
2650
|
+
* The currency type, ex: USD, EUR, etc.
|
|
2651
|
+
*/
|
|
2652
|
+
currency_type?: string;
|
|
2653
|
+
|
|
2654
|
+
/**
|
|
2655
|
+
* The decimal amount for the currency.
|
|
2656
|
+
*/
|
|
2657
|
+
value?: number;
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* Vendor in the connected accounting system.
|
|
2662
|
+
*/
|
|
2663
|
+
export interface GlVendor {
|
|
2664
|
+
/**
|
|
2665
|
+
* ID of the accounting vendor in Rippling.
|
|
2666
|
+
*/
|
|
2667
|
+
id?: string;
|
|
2668
|
+
|
|
2669
|
+
/**
|
|
2670
|
+
* ID of the vendor in the accounting system.
|
|
2671
|
+
*/
|
|
2672
|
+
gl_vendor_id?: string;
|
|
2673
|
+
|
|
2674
|
+
/**
|
|
2675
|
+
* Name of the vendor in the accounting system.
|
|
2676
|
+
*/
|
|
2677
|
+
name?: string;
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
export interface LineItem {
|
|
2681
|
+
/**
|
|
2682
|
+
* Unique identifier of this line item. Null for older line items that have not
|
|
2683
|
+
* been assigned one yet.
|
|
2684
|
+
*/
|
|
2685
|
+
id?: string;
|
|
2686
|
+
|
|
2687
|
+
/**
|
|
2688
|
+
* Whether this line is amortized.
|
|
2689
|
+
*/
|
|
2690
|
+
amortized?: boolean;
|
|
2691
|
+
|
|
2692
|
+
/**
|
|
2693
|
+
* Amount of this split, in the merchant currency. The `value` is a decimal string.
|
|
2694
|
+
*/
|
|
2695
|
+
amount?: LineItem.Amount;
|
|
2696
|
+
|
|
2697
|
+
/**
|
|
2698
|
+
* ID of the Finance category assigned to this split. Use it with
|
|
2699
|
+
* `/finance-categories/{id}/`. The category name is in `category_name`.
|
|
2700
|
+
*/
|
|
2701
|
+
category_id?: string;
|
|
2702
|
+
|
|
2703
|
+
/**
|
|
2704
|
+
* Name of the finance category.
|
|
2705
|
+
*/
|
|
2706
|
+
category_name?: string;
|
|
2707
|
+
|
|
2708
|
+
/**
|
|
2709
|
+
* Selected dimension values, keyed by dimension ID. `DEPARTMENT` and
|
|
2710
|
+
* `WORK_LOCATION` are the built-in keys. Get custom dimension IDs from
|
|
2711
|
+
* `/job-dimensions/` and `/job-dimensions/{id}/`. Each choice `value` is a job
|
|
2712
|
+
* code ID from `/job-codes/` and `/job-codes/{id}/`.
|
|
2713
|
+
*/
|
|
2714
|
+
dimension_choices?: { [key: string]: LineItem.DimensionChoices };
|
|
2715
|
+
|
|
2716
|
+
/**
|
|
2717
|
+
* End of the amortization period (YYYY-MM-DD).
|
|
2718
|
+
*/
|
|
2719
|
+
end_date?: string;
|
|
2720
|
+
|
|
2721
|
+
/**
|
|
2722
|
+
* ERP amortization schedule associated with this line.
|
|
2723
|
+
*/
|
|
2724
|
+
gl_amortization_schedule?: LineItem.GlAmortizationSchedule;
|
|
2725
|
+
|
|
2726
|
+
/**
|
|
2727
|
+
* ERP amortization template for this line.
|
|
2728
|
+
*/
|
|
2729
|
+
gl_amortization_template?: LineItem.GlAmortizationTemplate;
|
|
2730
|
+
|
|
2731
|
+
/**
|
|
2732
|
+
* Whether this split is billed to `gl_customer` in the accounting system.
|
|
2733
|
+
* `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not
|
|
2734
|
+
* set.
|
|
2735
|
+
*/
|
|
2736
|
+
gl_billable?: 'BILLABLE' | 'NOT_BILLABLE';
|
|
2737
|
+
|
|
2738
|
+
/**
|
|
2739
|
+
* ID of the customer record in the connected accounting integration. No public
|
|
2740
|
+
* Rippling API is currently available to retrieve this accounting customer.
|
|
2741
|
+
*/
|
|
2742
|
+
gl_customer?: string;
|
|
2743
|
+
|
|
2744
|
+
/**
|
|
2745
|
+
* Rippling ID of the accounting tax code. No public Rippling API is currently
|
|
2746
|
+
* available to retrieve this accounting tax code.
|
|
2747
|
+
*/
|
|
2748
|
+
gl_tax_code?: string;
|
|
2749
|
+
|
|
2750
|
+
/**
|
|
2751
|
+
* Memo entered on this split.
|
|
2752
|
+
*/
|
|
2753
|
+
memo?: string;
|
|
2754
|
+
|
|
2755
|
+
/**
|
|
2756
|
+
* Prepaid asset account for Rippling-managed amortization.
|
|
2757
|
+
*/
|
|
2758
|
+
prepaid_account?: LineItem.PrepaidAccount;
|
|
2759
|
+
|
|
2760
|
+
/**
|
|
2761
|
+
* Start of the amortization period (YYYY-MM-DD).
|
|
2762
|
+
*/
|
|
2763
|
+
start_date?: string;
|
|
2764
|
+
|
|
2765
|
+
/**
|
|
2766
|
+
* Total tax amount for this line in the merchant currency.
|
|
2767
|
+
*/
|
|
2768
|
+
tax_amount?: LineItem.TaxAmount;
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
export namespace LineItem {
|
|
2772
|
+
/**
|
|
2773
|
+
* Amount of this split, in the merchant currency. The `value` is a decimal string.
|
|
2774
|
+
*/
|
|
2775
|
+
export interface Amount {
|
|
2776
|
+
/**
|
|
2777
|
+
* The currency type, ex: USD, EUR, etc.
|
|
2778
|
+
*/
|
|
2779
|
+
currency_type?: string;
|
|
2780
|
+
|
|
2781
|
+
/**
|
|
2782
|
+
* The decimal amount for the currency.
|
|
2783
|
+
*/
|
|
2784
|
+
value?: number;
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2787
|
+
export interface DimensionChoices {
|
|
2788
|
+
/**
|
|
2789
|
+
* Name of the dimension, such as Department.
|
|
2790
|
+
*/
|
|
2791
|
+
dimension_name?: string;
|
|
2792
|
+
|
|
2793
|
+
/**
|
|
2794
|
+
* Display name of the selected dimension value.
|
|
2795
|
+
*/
|
|
2796
|
+
label?: string;
|
|
2797
|
+
|
|
2798
|
+
/**
|
|
2799
|
+
* ID of the selected value. For `DEPARTMENT` use `/departments/{id}/`, for
|
|
2800
|
+
* `WORK_LOCATION` use `/work-locations/{id}/`, and for a custom job dimension use
|
|
2801
|
+
* `/job-codes/{id}/`.
|
|
2802
|
+
*/
|
|
2803
|
+
value?: string;
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2806
|
+
/**
|
|
2807
|
+
* ERP amortization schedule associated with this line.
|
|
2808
|
+
*/
|
|
2809
|
+
export interface GlAmortizationSchedule {
|
|
2810
|
+
/**
|
|
2811
|
+
* Rippling ID of the accounting integration that owns this object. No public
|
|
2812
|
+
* Rippling API is currently available to retrieve this accounting integration.
|
|
2813
|
+
*/
|
|
2814
|
+
accounting_integration_id?: string;
|
|
2815
|
+
|
|
2816
|
+
/**
|
|
2817
|
+
* Number of amortization periods.
|
|
2818
|
+
*/
|
|
2819
|
+
amortization_period?: number;
|
|
2820
|
+
|
|
2821
|
+
/**
|
|
2822
|
+
* End of the ERP amortization schedule as an ISO 8601 timestamp (for example,
|
|
2823
|
+
* 2026-12-31T00:00:00). May omit a timezone offset; an omitted offset does not
|
|
2824
|
+
* indicate UTC. Null when not set.
|
|
2825
|
+
*/
|
|
2826
|
+
end_date?: string;
|
|
2827
|
+
|
|
2828
|
+
/**
|
|
2829
|
+
* Object ID in the connected accounting system.
|
|
2830
|
+
*/
|
|
2831
|
+
gl_object_id?: string;
|
|
2832
|
+
|
|
2833
|
+
/**
|
|
2834
|
+
* Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE
|
|
2835
|
+
* defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization;
|
|
2836
|
+
* GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general
|
|
2837
|
+
* ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an
|
|
2838
|
+
* accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor,
|
|
2839
|
+
* customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null
|
|
2840
|
+
* when not set.
|
|
2841
|
+
*/
|
|
2842
|
+
gl_object_type?:
|
|
2843
|
+
| 'GL_AMORTIZATION_TEMPLATE'
|
|
2844
|
+
| 'GL_AMORTIZATION_SCHEDULE'
|
|
2845
|
+
| 'GL_AMORTIZATION_SCHEDULE_RECURRENCE'
|
|
2846
|
+
| 'GL_ACCOUNT'
|
|
2847
|
+
| 'GL_JOURNAL_ENTRY'
|
|
2848
|
+
| 'GL_POSTING_PERIOD'
|
|
2849
|
+
| 'GL_VENDOR'
|
|
2850
|
+
| 'GL_CUSTOMER'
|
|
2851
|
+
| 'GL_EMPLOYEE'
|
|
2852
|
+
| 'GL_SUBSIDIARY';
|
|
2853
|
+
|
|
2854
|
+
/**
|
|
2855
|
+
* Accounting object name.
|
|
2856
|
+
*/
|
|
2857
|
+
name?: string;
|
|
2858
|
+
|
|
2859
|
+
/**
|
|
2860
|
+
* Start of the ERP amortization schedule as an ISO 8601 timestamp (for example,
|
|
2861
|
+
* 2026-01-01T00:00:00). May omit a timezone offset; an omitted offset does not
|
|
2862
|
+
* indicate UTC. Null when not set.
|
|
2863
|
+
*/
|
|
2864
|
+
start_date?: string;
|
|
2865
|
+
|
|
2866
|
+
/**
|
|
2867
|
+
* ERP amortization schedule status: NOT_STARTED means amortization has not begun;
|
|
2868
|
+
* IN_PROGRESS means amortization is underway; COMPLETED means amortization is
|
|
2869
|
+
* complete; ON_HOLD means amortization is paused. Null when not set.
|
|
2870
|
+
*/
|
|
2871
|
+
status?: 'NOT_STARTED' | 'IN_PROGRESS' | 'COMPLETED' | 'ON_HOLD';
|
|
2872
|
+
|
|
2873
|
+
/**
|
|
2874
|
+
* Amount already amortized as reported by the ERP, in the same currency as
|
|
2875
|
+
* total_amount. No currency conversion is applied; the schedule currency code is
|
|
2876
|
+
* not available in this response.
|
|
2877
|
+
*/
|
|
2878
|
+
total_amortized_amount?: number;
|
|
2879
|
+
|
|
2880
|
+
/**
|
|
2881
|
+
* Total schedule amount as reported by the ERP, without currency conversion. The
|
|
2882
|
+
* schedule currency code is not available in this response.
|
|
2883
|
+
*/
|
|
2884
|
+
total_amount?: number;
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
/**
|
|
2888
|
+
* ERP amortization template for this line.
|
|
2889
|
+
*/
|
|
2890
|
+
export interface GlAmortizationTemplate {
|
|
2891
|
+
/**
|
|
2892
|
+
* Rippling ID of the accounting integration that owns this object. No public
|
|
2893
|
+
* Rippling API is currently available to retrieve this accounting integration.
|
|
2894
|
+
*/
|
|
2895
|
+
accounting_integration_id?: string;
|
|
2896
|
+
|
|
2897
|
+
/**
|
|
2898
|
+
* Object ID in the connected accounting system.
|
|
2899
|
+
*/
|
|
2900
|
+
gl_object_id?: string;
|
|
2901
|
+
|
|
2902
|
+
/**
|
|
2903
|
+
* Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE
|
|
2904
|
+
* defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization;
|
|
2905
|
+
* GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general
|
|
2906
|
+
* ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an
|
|
2907
|
+
* accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor,
|
|
2908
|
+
* customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null
|
|
2909
|
+
* when not set.
|
|
2910
|
+
*/
|
|
2911
|
+
gl_object_type?:
|
|
2912
|
+
| 'GL_AMORTIZATION_TEMPLATE'
|
|
2913
|
+
| 'GL_AMORTIZATION_SCHEDULE'
|
|
2914
|
+
| 'GL_AMORTIZATION_SCHEDULE_RECURRENCE'
|
|
2915
|
+
| 'GL_ACCOUNT'
|
|
2916
|
+
| 'GL_JOURNAL_ENTRY'
|
|
2917
|
+
| 'GL_POSTING_PERIOD'
|
|
2918
|
+
| 'GL_VENDOR'
|
|
2919
|
+
| 'GL_CUSTOMER'
|
|
2920
|
+
| 'GL_EMPLOYEE'
|
|
2921
|
+
| 'GL_SUBSIDIARY';
|
|
2922
|
+
|
|
2923
|
+
/**
|
|
2924
|
+
* Accounting object name.
|
|
2925
|
+
*/
|
|
2926
|
+
name?: string;
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
/**
|
|
2930
|
+
* Prepaid asset account for Rippling-managed amortization.
|
|
2931
|
+
*/
|
|
2932
|
+
export interface PrepaidAccount {
|
|
2933
|
+
/**
|
|
2934
|
+
* Account ID in the connected accounting system.
|
|
2935
|
+
*/
|
|
2936
|
+
account_id?: string;
|
|
2937
|
+
|
|
2938
|
+
/**
|
|
2939
|
+
* Account code.
|
|
2940
|
+
*/
|
|
2941
|
+
code?: string;
|
|
2942
|
+
|
|
2943
|
+
/**
|
|
2944
|
+
* Account name.
|
|
2945
|
+
*/
|
|
2946
|
+
name?: string;
|
|
2947
|
+
|
|
2948
|
+
/**
|
|
2949
|
+
* IDs of custom dimensions required by this account.
|
|
2950
|
+
*/
|
|
2951
|
+
required_custom_dimensions?: Array<string>;
|
|
2952
|
+
|
|
2953
|
+
/**
|
|
2954
|
+
* Whether this account requires a department.
|
|
2955
|
+
*/
|
|
2956
|
+
requires_department?: boolean;
|
|
2957
|
+
|
|
2958
|
+
/**
|
|
2959
|
+
* Whether this account requires a work location.
|
|
2960
|
+
*/
|
|
2961
|
+
requires_work_location?: boolean;
|
|
2962
|
+
|
|
2963
|
+
/**
|
|
2964
|
+
* Accounting account type: RECEIVABLE for accounts receivable, PAYABLE for
|
|
2965
|
+
* accounts payable, EXPENSE for expense accounts, or BANK for bank accounts. Null
|
|
2966
|
+
* when not set.
|
|
2967
|
+
*/
|
|
2968
|
+
type?: 'RECEIVABLE' | 'PAYABLE' | 'EXPENSE' | 'BANK';
|
|
2969
|
+
}
|
|
2970
|
+
|
|
2971
|
+
/**
|
|
2972
|
+
* Total tax amount for this line in the merchant currency.
|
|
2973
|
+
*/
|
|
2974
|
+
export interface TaxAmount {
|
|
2975
|
+
/**
|
|
2976
|
+
* The currency type, ex: USD, EUR, etc.
|
|
2977
|
+
*/
|
|
2978
|
+
currency_type?: string;
|
|
2979
|
+
|
|
2980
|
+
/**
|
|
2981
|
+
* The decimal amount for the currency.
|
|
2982
|
+
*/
|
|
2983
|
+
value?: number;
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2986
|
+
|
|
2987
|
+
/**
|
|
2988
|
+
* Amount charged by the merchant, in the merchant currency. The `value` is a
|
|
2989
|
+
* decimal string.
|
|
2990
|
+
*/
|
|
2991
|
+
export interface MerchantAmount {
|
|
2992
|
+
/**
|
|
2993
|
+
* The currency type, ex: USD, EUR, etc.
|
|
2994
|
+
*/
|
|
2995
|
+
currency_type?: string;
|
|
2996
|
+
|
|
2997
|
+
/**
|
|
2998
|
+
* The decimal amount for the currency.
|
|
2999
|
+
*/
|
|
3000
|
+
value?: number;
|
|
3001
|
+
}
|
|
3002
|
+
|
|
3003
|
+
/**
|
|
3004
|
+
* A receipt file attached to a card transaction.
|
|
3005
|
+
*/
|
|
3006
|
+
export interface Receipt {
|
|
3007
|
+
/**
|
|
3008
|
+
* URL of the original receipt file, such as the uploaded PDF. The link is signed
|
|
3009
|
+
* and expires, so fetch the transaction again for a current link instead of
|
|
3010
|
+
* storing it.
|
|
3011
|
+
*/
|
|
3012
|
+
url: string;
|
|
3013
|
+
|
|
3014
|
+
/**
|
|
3015
|
+
* MIME type of the receipt file, such as `application/pdf`. Null when it cannot be
|
|
3016
|
+
* determined.
|
|
3017
|
+
*/
|
|
3018
|
+
content_type?: string | null;
|
|
3019
|
+
|
|
3020
|
+
/**
|
|
3021
|
+
* Name of the receipt file. Null when it was not recorded.
|
|
3022
|
+
*/
|
|
3023
|
+
file_name?: string | null;
|
|
3024
|
+
|
|
3025
|
+
/**
|
|
3026
|
+
* URL of an image preview of the receipt. Null when the receipt is itself an image
|
|
3027
|
+
* or no preview is available. Like `url`, the link is signed and expires.
|
|
3028
|
+
*/
|
|
3029
|
+
preview_url?: string | null;
|
|
3030
|
+
}
|
|
3031
|
+
|
|
3032
|
+
/**
|
|
3033
|
+
* Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`.
|
|
3034
|
+
*
|
|
3035
|
+
* Expandable field
|
|
3036
|
+
*/
|
|
3037
|
+
export interface Vendor {
|
|
3038
|
+
/**
|
|
3039
|
+
* Identifier field
|
|
3040
|
+
*/
|
|
3041
|
+
id: string;
|
|
3042
|
+
|
|
3043
|
+
/**
|
|
3044
|
+
* Record creation date
|
|
3045
|
+
*/
|
|
3046
|
+
created_at: string;
|
|
3047
|
+
|
|
3048
|
+
/**
|
|
3049
|
+
* Record update date
|
|
3050
|
+
*/
|
|
3051
|
+
updated_at: string;
|
|
3052
|
+
|
|
3053
|
+
/**
|
|
3054
|
+
* Whether the vendor is archived. Archived vendors remain available for historical
|
|
3055
|
+
* references.
|
|
3056
|
+
*/
|
|
3057
|
+
is_archived?: boolean;
|
|
3058
|
+
|
|
3059
|
+
/**
|
|
3060
|
+
* URL of the vendor's logo. Null when no logo is available.
|
|
3061
|
+
*/
|
|
3062
|
+
logo?: string;
|
|
3063
|
+
|
|
3064
|
+
/**
|
|
3065
|
+
* Canonical name of the Finance vendor. Name eq, ne, and in filters also match
|
|
3066
|
+
* alternate names.
|
|
3067
|
+
*/
|
|
3068
|
+
name?: string;
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
|
|
3072
|
+
export interface CardTransactionListParams {
|
|
3073
|
+
cursor?: string;
|
|
3074
|
+
|
|
3075
|
+
expand?: string;
|
|
3076
|
+
|
|
3077
|
+
filter?: string;
|
|
3078
|
+
|
|
3079
|
+
/**
|
|
3080
|
+
* The maximum number of results to return. Defaults to 50. Maximum is 100.
|
|
3081
|
+
*/
|
|
3082
|
+
limit?: number;
|
|
3083
|
+
|
|
3084
|
+
order_by?: string;
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3087
|
+
export interface CardTransactionRetrieveParams {
|
|
3088
|
+
expand?: string;
|
|
3089
|
+
}
|
|
3090
|
+
|
|
3091
|
+
export interface CardTransactionUpdateParams {
|
|
3092
|
+
/**
|
|
3093
|
+
* Category splits of the transaction amount. Updates replace the entire list.
|
|
3094
|
+
* `amount` and `tax_amount` are decimal strings in the merchant currency. The sum
|
|
3095
|
+
* of `amount` values must match the transaction's merchant amount.
|
|
3096
|
+
*/
|
|
3097
|
+
line_items?: Array<CardTransactionUpdateParams.LineItem>;
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
export namespace CardTransactionUpdateParams {
|
|
3101
|
+
/**
|
|
3102
|
+
* PATCH body for a line item. `amount` and `tax_amount` are decimal strings, not
|
|
3103
|
+
* Currency objects.
|
|
3104
|
+
*/
|
|
3105
|
+
export interface LineItem {
|
|
3106
|
+
/**
|
|
3107
|
+
* Amount of this split, in the merchant currency, as a decimal string.
|
|
3108
|
+
*/
|
|
3109
|
+
amount: string;
|
|
3110
|
+
|
|
3111
|
+
/**
|
|
3112
|
+
* ID of the Finance category assigned to this split. Use it with
|
|
3113
|
+
* `/finance-categories/{id}/`.
|
|
3114
|
+
*/
|
|
3115
|
+
category_id: string;
|
|
3116
|
+
|
|
3117
|
+
/**
|
|
3118
|
+
* Optional. Omit to create a new line. Replacing `line_items` assigns new IDs; a
|
|
3119
|
+
* supplied `id` is not preserved.
|
|
3120
|
+
*/
|
|
3121
|
+
id?: string;
|
|
3122
|
+
|
|
3123
|
+
/**
|
|
3124
|
+
* Whether this line is amortized.
|
|
3125
|
+
*/
|
|
3126
|
+
amortized?: boolean;
|
|
3127
|
+
|
|
3128
|
+
/**
|
|
3129
|
+
* Selected dimension values, keyed by dimension ID. `DEPARTMENT` and
|
|
3130
|
+
* `WORK_LOCATION` are the built-in keys. Get custom dimension IDs from
|
|
3131
|
+
* `/job-dimensions/` and `/job-dimensions/{id}/`. Each value is an ID:
|
|
3132
|
+
* `/departments/{id}/` for `DEPARTMENT`, `/work-locations/{id}/` for
|
|
3133
|
+
* `WORK_LOCATION`, and `/job-codes/{id}/` for a custom job dimension.
|
|
3134
|
+
*/
|
|
3135
|
+
dimension_choices?: { [key: string]: string };
|
|
3136
|
+
|
|
3137
|
+
/**
|
|
3138
|
+
* End of the amortization period (YYYY-MM-DD).
|
|
3139
|
+
*/
|
|
3140
|
+
end_date?: string;
|
|
3141
|
+
|
|
3142
|
+
/**
|
|
3143
|
+
* ERP amortization template for this line.
|
|
3144
|
+
*/
|
|
3145
|
+
gl_amortization_template?: LineItem.GlAmortizationTemplate;
|
|
3146
|
+
|
|
3147
|
+
/**
|
|
3148
|
+
* Whether this split is billed to `gl_customer` in the accounting system.
|
|
3149
|
+
* `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not
|
|
3150
|
+
* set.
|
|
3151
|
+
*/
|
|
3152
|
+
gl_billable?: 'BILLABLE' | 'NOT_BILLABLE';
|
|
3153
|
+
|
|
3154
|
+
/**
|
|
3155
|
+
* ID of the customer record in the connected accounting integration. No public
|
|
3156
|
+
* Rippling API is currently available to retrieve this accounting customer.
|
|
3157
|
+
*/
|
|
3158
|
+
gl_customer?: string;
|
|
3159
|
+
|
|
3160
|
+
/**
|
|
3161
|
+
* Rippling ID of the accounting tax code. No public Rippling API is currently
|
|
3162
|
+
* available to retrieve this accounting tax code.
|
|
3163
|
+
*/
|
|
3164
|
+
gl_tax_code?: string;
|
|
3165
|
+
|
|
3166
|
+
/**
|
|
3167
|
+
* Memo entered on this split.
|
|
3168
|
+
*/
|
|
3169
|
+
memo?: string;
|
|
3170
|
+
|
|
3171
|
+
/**
|
|
3172
|
+
* Prepaid asset account for Rippling-managed amortization.
|
|
3173
|
+
*/
|
|
3174
|
+
prepaid_account?: LineItem.PrepaidAccount;
|
|
3175
|
+
|
|
3176
|
+
/**
|
|
3177
|
+
* Start of the amortization period (YYYY-MM-DD).
|
|
3178
|
+
*/
|
|
3179
|
+
start_date?: string;
|
|
3180
|
+
|
|
3181
|
+
/**
|
|
3182
|
+
* Total tax amount for this line in the merchant currency, as a decimal string.
|
|
3183
|
+
*/
|
|
3184
|
+
tax_amount?: string;
|
|
3185
|
+
}
|
|
3186
|
+
|
|
3187
|
+
export namespace LineItem {
|
|
3188
|
+
/**
|
|
3189
|
+
* ERP amortization template for this line.
|
|
3190
|
+
*/
|
|
3191
|
+
export interface GlAmortizationTemplate {
|
|
3192
|
+
/**
|
|
3193
|
+
* Rippling ID of the accounting integration that owns this template. No public
|
|
3194
|
+
* Rippling API is currently available to retrieve this accounting integration.
|
|
3195
|
+
*/
|
|
3196
|
+
accounting_integration_id?: string;
|
|
3197
|
+
|
|
3198
|
+
/**
|
|
3199
|
+
* Object ID of the amortization template in the connected accounting system.
|
|
3200
|
+
*/
|
|
3201
|
+
gl_object_id?: string;
|
|
3202
|
+
|
|
3203
|
+
/**
|
|
3204
|
+
* Amortization template name.
|
|
3205
|
+
*/
|
|
3206
|
+
name?: string;
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
/**
|
|
3210
|
+
* Prepaid asset account for Rippling-managed amortization.
|
|
3211
|
+
*/
|
|
3212
|
+
export interface PrepaidAccount {
|
|
3213
|
+
/**
|
|
3214
|
+
* Account ID in the connected accounting system.
|
|
3215
|
+
*/
|
|
3216
|
+
account_id?: string;
|
|
3217
|
+
|
|
3218
|
+
/**
|
|
3219
|
+
* Account name.
|
|
3220
|
+
*/
|
|
3221
|
+
name?: string;
|
|
3222
|
+
|
|
3223
|
+
/**
|
|
3224
|
+
* Accounting account type: RECEIVABLE for accounts receivable, PAYABLE for
|
|
3225
|
+
* accounts payable, EXPENSE for expense accounts, or BANK for bank accounts. Null
|
|
3226
|
+
* when not set.
|
|
3227
|
+
*/
|
|
3228
|
+
type?: 'RECEIVABLE' | 'PAYABLE' | 'EXPENSE' | 'BANK';
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
export interface CardTransactionUploadReceiptParams {
|
|
3234
|
+
/**
|
|
3235
|
+
* The receipt file: PDF, JPEG, PNG, or BMP, up to 10 MB. The type is detected from
|
|
3236
|
+
* the file's contents.
|
|
3237
|
+
*/
|
|
3238
|
+
file: Uploadable;
|
|
1401
3239
|
}
|
|
1402
3240
|
|
|
1403
3241
|
export declare namespace CardTransactions {
|
|
1404
3242
|
export {
|
|
1405
3243
|
type CardTransactionListResponse as CardTransactionListResponse,
|
|
1406
3244
|
type CardTransactionRetrieveResponse as CardTransactionRetrieveResponse,
|
|
3245
|
+
type CardTransactionUpdateResponse as CardTransactionUpdateResponse,
|
|
3246
|
+
type CardTransactionUploadReceiptResponse as CardTransactionUploadReceiptResponse,
|
|
1407
3247
|
type CardTransactionListResponsesPageCursorURL as CardTransactionListResponsesPageCursorURL,
|
|
1408
3248
|
type CardTransactionListParams as CardTransactionListParams,
|
|
1409
3249
|
type CardTransactionRetrieveParams as CardTransactionRetrieveParams,
|
|
3250
|
+
type CardTransactionUpdateParams as CardTransactionUpdateParams,
|
|
3251
|
+
type CardTransactionUploadReceiptParams as CardTransactionUploadReceiptParams,
|
|
1410
3252
|
};
|
|
1411
3253
|
}
|