@rippling/rippling-sdk 0.2.0-alpha.107 → 0.2.0-alpha.108

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.
Files changed (87) hide show
  1. package/client.d.mts +7 -1
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +7 -1
  4. package/client.d.ts.map +1 -1
  5. package/client.js +7 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +7 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/card-transactions.d.mts +579 -0
  11. package/resources/card-transactions.d.mts.map +1 -0
  12. package/resources/card-transactions.d.ts +579 -0
  13. package/resources/card-transactions.d.ts.map +1 -0
  14. package/resources/card-transactions.js +116 -0
  15. package/resources/card-transactions.js.map +1 -0
  16. package/resources/card-transactions.mjs +112 -0
  17. package/resources/card-transactions.mjs.map +1 -0
  18. package/resources/earning-types.d.mts +50 -10
  19. package/resources/earning-types.d.mts.map +1 -1
  20. package/resources/earning-types.d.ts +50 -10
  21. package/resources/earning-types.d.ts.map +1 -1
  22. package/resources/earning-types.js +21 -2
  23. package/resources/earning-types.js.map +1 -1
  24. package/resources/earning-types.mjs +21 -2
  25. package/resources/earning-types.mjs.map +1 -1
  26. package/resources/index.d.mts +3 -1
  27. package/resources/index.d.mts.map +1 -1
  28. package/resources/index.d.ts +3 -1
  29. package/resources/index.d.ts.map +1 -1
  30. package/resources/index.js +8 -4
  31. package/resources/index.js.map +1 -1
  32. package/resources/index.mjs +3 -1
  33. package/resources/index.mjs.map +1 -1
  34. package/resources/reimbursements.d.mts +954 -0
  35. package/resources/reimbursements.d.mts.map +1 -0
  36. package/resources/reimbursements.d.ts +954 -0
  37. package/resources/reimbursements.d.ts.map +1 -0
  38. package/resources/reimbursements.js +140 -0
  39. package/resources/reimbursements.js.map +1 -0
  40. package/resources/reimbursements.mjs +136 -0
  41. package/resources/reimbursements.mjs.map +1 -0
  42. package/resources/workflows/executions.d.mts +153 -0
  43. package/resources/workflows/executions.d.mts.map +1 -0
  44. package/resources/workflows/executions.d.ts +153 -0
  45. package/resources/workflows/executions.d.ts.map +1 -0
  46. package/resources/workflows/executions.js +74 -0
  47. package/resources/workflows/executions.js.map +1 -0
  48. package/resources/workflows/executions.mjs +70 -0
  49. package/resources/workflows/executions.mjs.map +1 -0
  50. package/resources/workflows/index.d.mts +3 -0
  51. package/resources/workflows/index.d.mts.map +1 -0
  52. package/resources/workflows/index.d.ts +3 -0
  53. package/resources/workflows/index.d.ts.map +1 -0
  54. package/resources/workflows/index.js +9 -0
  55. package/resources/workflows/index.js.map +1 -0
  56. package/resources/workflows/index.mjs +4 -0
  57. package/resources/workflows/index.mjs.map +1 -0
  58. package/resources/workflows/workflows.d.mts +977 -0
  59. package/resources/workflows/workflows.d.mts.map +1 -0
  60. package/resources/workflows/workflows.d.ts +977 -0
  61. package/resources/workflows/workflows.d.ts.map +1 -0
  62. package/resources/workflows/workflows.js +246 -0
  63. package/resources/workflows/workflows.js.map +1 -0
  64. package/resources/workflows/workflows.mjs +241 -0
  65. package/resources/workflows/workflows.mjs.map +1 -0
  66. package/resources/workflows.d.mts +1 -972
  67. package/resources/workflows.d.mts.map +1 -1
  68. package/resources/workflows.d.ts +1 -972
  69. package/resources/workflows.d.ts.map +1 -1
  70. package/resources/workflows.js +2 -234
  71. package/resources/workflows.js.map +1 -1
  72. package/resources/workflows.mjs +1 -232
  73. package/resources/workflows.mjs.map +1 -1
  74. package/src/client.ts +46 -12
  75. package/src/resources/card-transactions.ts +718 -0
  76. package/src/resources/earning-types.ts +52 -10
  77. package/src/resources/index.ts +15 -1
  78. package/src/resources/reimbursements.ts +1157 -0
  79. package/src/resources/workflows/executions.ts +191 -0
  80. package/src/resources/workflows/index.ts +15 -0
  81. package/src/resources/workflows/workflows.ts +1661 -0
  82. package/src/resources/workflows.ts +1 -1647
  83. package/src/version.ts +1 -1
  84. package/version.d.mts +1 -1
  85. package/version.d.ts +1 -1
  86. package/version.js +1 -1
  87. package/version.mjs +1 -1
@@ -0,0 +1,954 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import * as BusinessPartnersAPI from "./business-partners.js";
3
+ import { APIPromise } from "../core/api-promise.js";
4
+ import { PageCursorURL, PagePromise } from "../core/pagination.js";
5
+ import { RequestOptions } from "../internal/request-options.js";
6
+ export declare class Reimbursements extends APIResource {
7
+ /**
8
+ * A list of reimbursements.
9
+ *
10
+ * - Requires: `Internal Testing`
11
+ * - Filterable fields: `worker_id`, `transaction_date`, `entity_id`, `vendor_id`,
12
+ * `category_id`
13
+ * - Sortable fields: `id`, `created_at`, `updated_at`, `transaction_date`
14
+ *
15
+ * @example HTTP
16
+ * Representative request and response shapes.
17
+ * ```
18
+ * GET /reimbursements/?filter=filter&order_by=order_by&limit=50&cursor=cursor HTTP/1.1
19
+ * Host: rest.ripplingapis.com
20
+ * Accept: application/json
21
+ * Rippling-Api-Version: 2024-08-01
22
+ *
23
+ * HTTP/1.1 200 OK
24
+ * Content-Type: application/json
25
+ *
26
+ * {
27
+ * "__meta": {
28
+ * "redacted_fields": [
29
+ * {
30
+ * "name": "date_of_birth",
31
+ * "reason": "Insufficient entitlements"
32
+ * }
33
+ * ]
34
+ * },
35
+ * "results": [
36
+ * {
37
+ * "id": "string",
38
+ * "created_at": "string",
39
+ * "updated_at": "string",
40
+ * "worker_id": "string",
41
+ * "company_amount": {
42
+ * "currency_type": "string",
43
+ * "value": "string"
44
+ * },
45
+ * "merchant_amount": {
46
+ * "currency_type": "string",
47
+ * "value": "string"
48
+ * },
49
+ * "transaction_date": "string",
50
+ * "accounting_date": "string",
51
+ * "gl_sync_state": "NOT_FINALIZED",
52
+ * "approval_status": "DRAFT",
53
+ * "entity_id": "string",
54
+ * "vendor": {
55
+ * "id": "string",
56
+ * "name": "string"
57
+ * },
58
+ * "gl_vendor": {
59
+ * "id": "string",
60
+ * "name": "string",
61
+ * "gl_vendor_id": "string"
62
+ * },
63
+ * "memo": "string",
64
+ * "receipt": "string",
65
+ * "attachments": [
66
+ * "string"
67
+ * ],
68
+ * "line_items": [
69
+ * {}
70
+ * ],
71
+ * "transaction_type": "REIMBURSEMENT",
72
+ * "payout_amount": {
73
+ * "currency_type": "string",
74
+ * "value": "string"
75
+ * },
76
+ * "payout_method": "NOT_SET",
77
+ * "payout_date": "string",
78
+ * "distance": 0,
79
+ * "mileage_rate": {
80
+ * "id": "string",
81
+ * "name": "string",
82
+ * "rate": {},
83
+ * "units": "km"
84
+ * },
85
+ * "start_address": "string",
86
+ * "end_address": "string",
87
+ * "trip_start_date": "string",
88
+ * "trip_end_date": "string",
89
+ * "per_diem_rate": {
90
+ * "id": "string",
91
+ * "destination_name": "string",
92
+ * "country": "string",
93
+ * "currency": "string"
94
+ * },
95
+ * "per_diem_line_items": [
96
+ * {}
97
+ * ]
98
+ * }
99
+ * ],
100
+ * "next_link": "string"
101
+ * }
102
+ * ```
103
+ */
104
+ list(query?: ReimbursementListParams | null | undefined, options?: RequestOptions): PagePromise<ReimbursementListResponsesPageCursorURL, ReimbursementListResponse>;
105
+ /**
106
+ * Retrieve a specific reimbursement
107
+ *
108
+ * @example HTTP
109
+ * Representative request and response shapes.
110
+ * ```
111
+ * GET /reimbursements/{id}/ HTTP/1.1
112
+ * Host: rest.ripplingapis.com
113
+ * Accept: application/json
114
+ * Rippling-Api-Version: 2024-08-01
115
+ *
116
+ * HTTP/1.1 200 OK
117
+ * Content-Type: application/json
118
+ *
119
+ * {
120
+ * "__meta": {
121
+ * "redacted_fields": [
122
+ * {}
123
+ * ]
124
+ * }
125
+ * }
126
+ * ```
127
+ */
128
+ retrieve(id: string, options?: RequestOptions): APIPromise<ReimbursementRetrieveResponse>;
129
+ }
130
+ export type ReimbursementListResponsesPageCursorURL = PageCursorURL<ReimbursementListResponse>;
131
+ /**
132
+ * A Spend reimbursement the caller can see.
133
+ *
134
+ * A reimbursement is an expense the worker paid and the company pays back. Mileage and per diem
135
+ * use the same resource, with transaction_type MILEAGE_REIMBURSEMENT or PER_DIEM_REIMBURSEMENT.
136
+ * Retrieve returns one by ID. A reimbursement the caller cannot see returns 404, the same as one
137
+ * that does not exist.
138
+ */
139
+ export interface ReimbursementListResponse {
140
+ /**
141
+ * Identifier field
142
+ */
143
+ id: string;
144
+ /**
145
+ * Record creation date
146
+ */
147
+ created_at: string;
148
+ /**
149
+ * Record update date
150
+ */
151
+ updated_at: string;
152
+ /**
153
+ * Date the transaction is booked in the accounting system, as an ISO 8601 date
154
+ * (YYYY-MM-DD).
155
+ */
156
+ accounting_date?: string;
157
+ /**
158
+ * Approval status of the transaction. `DRAFT`: not submitted for approval.
159
+ * `PENDING`: awaiting required information or submission before approval.
160
+ * `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`:
161
+ * rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or
162
+ * reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null
163
+ * for card authorizations.
164
+ */
165
+ approval_status?: 'DRAFT' | 'PENDING' | 'REQUESTED' | 'APPROVED' | 'REJECTED' | 'FINALIZED' | 'ACTIONED' | 'CANCELLED' | 'FAILED';
166
+ /**
167
+ * URLs of other attached files.
168
+ */
169
+ attachments?: Array<string>;
170
+ /**
171
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
172
+ */
173
+ company_amount?: ReimbursementListResponse.CompanyAmount;
174
+ /**
175
+ * Trip length in mileage_rate.units. Null except on mileage reimbursements.
176
+ */
177
+ distance?: number;
178
+ /**
179
+ * Mileage end address. Null when the trip has no end address.
180
+ */
181
+ end_address?: string;
182
+ /**
183
+ * ID of the legal entity the transaction belongs to. Use it with
184
+ * `/company-legal-entities/{id}/`.
185
+ */
186
+ entity_id?: string;
187
+ /**
188
+ * State of the sync to the accounting system. `NOT_FINALIZED`: not ready for
189
+ * accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`:
190
+ * sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync
191
+ * failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for
192
+ * accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to
193
+ * be synced automatically. Null when no sync state is set.
194
+ */
195
+ gl_sync_state?: 'NOT_FINALIZED' | 'FOR_REVIEW' | 'PENDING_SYNC' | 'SYNCED' | 'ERROR' | 'DO_NOT_SYNC' | 'EXPORTED' | 'NOT_SYNCABLE' | 'AUTO_SYNC';
196
+ /**
197
+ * Vendor in the connected accounting system.
198
+ */
199
+ gl_vendor?: ReimbursementListResponse.GlVendor;
200
+ /**
201
+ * Category splits of the transaction amount.
202
+ */
203
+ line_items?: Array<ReimbursementListResponse.LineItem>;
204
+ /**
205
+ * Memo entered on the transaction.
206
+ */
207
+ memo?: string;
208
+ /**
209
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
210
+ * decimal string.
211
+ */
212
+ merchant_amount?: ReimbursementListResponse.MerchantAmount;
213
+ /**
214
+ * Company mileage rate. Null except on mileage reimbursements.
215
+ */
216
+ mileage_rate?: ReimbursementListResponse.MileageRate;
217
+ /**
218
+ * Amount credited to the worker. The `value` is a decimal string.
219
+ */
220
+ payout_amount?: ReimbursementListResponse.PayoutAmount;
221
+ /**
222
+ * Date the worker is paid, as an ISO 8601 date (YYYY-MM-DD). Null before a run is
223
+ * assigned.
224
+ */
225
+ payout_date?: string;
226
+ /**
227
+ * How the worker is paid. `NOT_SET`: no payout run is assigned. `US_PAYROLL`:
228
+ * assigned to a US payroll run. `GLOBAL_PAYROLL`: assigned to a global payroll
229
+ * run. `DIRECT_DEPOSIT`: assigned to a direct deposit run. `EOR`: assigned to an
230
+ * employer-of-record payroll run. `MANUAL`: marked paid outside a run. If a payout
231
+ * method override is set, it is returned.
232
+ */
233
+ payout_method?: 'NOT_SET' | 'GLOBAL_PAYROLL' | 'US_PAYROLL' | 'DIRECT_DEPOSIT' | 'EOR' | 'MANUAL';
234
+ /**
235
+ * Per diem sub-rate rows. Null except on per diem reimbursements.
236
+ */
237
+ per_diem_line_items?: Array<ReimbursementListResponse.PerDiemLineItem>;
238
+ /**
239
+ * Per diem rate for the trip. Null except on per diem reimbursements.
240
+ */
241
+ per_diem_rate?: ReimbursementListResponse.PerDiemRate;
242
+ /**
243
+ * URL of the receipt file.
244
+ */
245
+ receipt?: string;
246
+ /**
247
+ * Mileage start address. Null when the trip has no start address.
248
+ */
249
+ start_address?: string;
250
+ /**
251
+ * When the purchase or authorization happened, as an ISO 8601 date-time in UTC.
252
+ */
253
+ transaction_date?: string;
254
+ /**
255
+ * `REIMBURSEMENT`: an expense the worker paid and the company pays back.
256
+ * `MILEAGE_REIMBURSEMENT`: payback for distance driven. `PER_DIEM_REIMBURSEMENT`:
257
+ * payback for a daily travel allowance. This decides which mileage or per diem
258
+ * fields are set.
259
+ */
260
+ transaction_type?: 'REIMBURSEMENT' | 'MILEAGE_REIMBURSEMENT' | 'PER_DIEM_REIMBURSEMENT';
261
+ /**
262
+ * Per diem trip end date, as an ISO 8601 date (YYYY-MM-DD). Null except on per
263
+ * diem reimbursements.
264
+ */
265
+ trip_end_date?: string;
266
+ /**
267
+ * Per diem trip start date, as an ISO 8601 date (YYYY-MM-DD). Null except on per
268
+ * diem reimbursements.
269
+ */
270
+ trip_start_date?: string;
271
+ /**
272
+ * Vendor the purchase was made from.
273
+ */
274
+ vendor?: ReimbursementListResponse.Vendor;
275
+ /**
276
+ * ID of the worker who made the transaction. Use it with `/workers/{id}/`.
277
+ */
278
+ worker_id?: string;
279
+ }
280
+ export declare namespace ReimbursementListResponse {
281
+ /**
282
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
283
+ */
284
+ interface CompanyAmount {
285
+ /**
286
+ * The currency type, ex: USD, EUR, etc.
287
+ */
288
+ currency_type?: string;
289
+ /**
290
+ * The decimal amount for the currency.
291
+ */
292
+ value?: number;
293
+ }
294
+ /**
295
+ * Vendor in the connected accounting system.
296
+ */
297
+ interface GlVendor {
298
+ /**
299
+ * ID of the accounting vendor in Rippling.
300
+ */
301
+ id?: string;
302
+ /**
303
+ * ID of the vendor in the accounting system.
304
+ */
305
+ gl_vendor_id?: string;
306
+ /**
307
+ * Name of the vendor in the accounting system.
308
+ */
309
+ name?: string;
310
+ }
311
+ interface LineItem {
312
+ /**
313
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
314
+ */
315
+ amount?: LineItem.Amount;
316
+ /**
317
+ * ID of the Spend category assigned to this split. No public API is currently
318
+ * available to retrieve this category; its name is in `category_name`.
319
+ */
320
+ category_id?: string;
321
+ /**
322
+ * Name of the spend category.
323
+ */
324
+ category_name?: string;
325
+ /**
326
+ * Selected dimension values, keyed by dimension ID. Includes department and work
327
+ * location.
328
+ */
329
+ dimension_choices?: {
330
+ [key: string]: LineItem.DimensionChoices;
331
+ };
332
+ /**
333
+ * Whether this split is billed to `gl_customer` in the accounting system.
334
+ * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not
335
+ * set.
336
+ */
337
+ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE';
338
+ /**
339
+ * ID of the customer record in the connected accounting integration. No public
340
+ * Rippling API is currently available to retrieve this accounting customer.
341
+ */
342
+ gl_customer?: string;
343
+ /**
344
+ * Memo entered on this split.
345
+ */
346
+ memo?: string;
347
+ }
348
+ namespace LineItem {
349
+ /**
350
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
351
+ */
352
+ interface Amount {
353
+ /**
354
+ * The currency type, ex: USD, EUR, etc.
355
+ */
356
+ currency_type?: string;
357
+ /**
358
+ * The decimal amount for the currency.
359
+ */
360
+ value?: number;
361
+ }
362
+ interface DimensionChoices {
363
+ /**
364
+ * Name of the dimension, such as Department.
365
+ */
366
+ dimension_name?: string;
367
+ /**
368
+ * Display name of the selected dimension value.
369
+ */
370
+ label?: string;
371
+ /**
372
+ * ID of the selected dimension value.
373
+ */
374
+ value?: string;
375
+ }
376
+ }
377
+ /**
378
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
379
+ * decimal string.
380
+ */
381
+ interface MerchantAmount {
382
+ /**
383
+ * The currency type, ex: USD, EUR, etc.
384
+ */
385
+ currency_type?: string;
386
+ /**
387
+ * The decimal amount for the currency.
388
+ */
389
+ value?: number;
390
+ }
391
+ /**
392
+ * Company mileage rate. Null except on mileage reimbursements.
393
+ */
394
+ interface MileageRate {
395
+ /**
396
+ * Company mileage rate ID.
397
+ */
398
+ id?: string;
399
+ /**
400
+ * Company-defined label for this mileage rate, such as the rate used for a country
401
+ * or vehicle type.
402
+ */
403
+ name?: string;
404
+ /**
405
+ * Amount per distance unit. The `value` is a decimal string.
406
+ */
407
+ rate?: MileageRate.Rate;
408
+ /**
409
+ * Distance unit, mi or km.
410
+ */
411
+ units?: 'km' | 'mi';
412
+ }
413
+ namespace MileageRate {
414
+ /**
415
+ * Amount per distance unit. The `value` is a decimal string.
416
+ */
417
+ interface Rate {
418
+ /**
419
+ * The currency type, ex: USD, EUR, etc.
420
+ */
421
+ currency_type?: string;
422
+ /**
423
+ * The decimal amount for the currency.
424
+ */
425
+ value?: number;
426
+ }
427
+ }
428
+ /**
429
+ * Amount credited to the worker. The `value` is a decimal string.
430
+ */
431
+ interface PayoutAmount {
432
+ /**
433
+ * The currency type, ex: USD, EUR, etc.
434
+ */
435
+ currency_type?: string;
436
+ /**
437
+ * The decimal amount for the currency.
438
+ */
439
+ value?: number;
440
+ }
441
+ interface PerDiemLineItem {
442
+ /**
443
+ * Sub-rate amount for one unit. The `value` is a decimal string.
444
+ */
445
+ amount?: PerDiemLineItem.Amount;
446
+ /**
447
+ * amount times count. The `value` is a decimal string. Negative when line_type is
448
+ * EXCLUDE.
449
+ */
450
+ calculated_amount?: PerDiemLineItem.CalculatedAmount;
451
+ /**
452
+ * How many units.
453
+ */
454
+ count?: number;
455
+ /**
456
+ * Sub-rate label.
457
+ */
458
+ label?: string;
459
+ /**
460
+ * `INCLUDE`: this row is added to the reimbursement. `EXCLUDE`: this row is
461
+ * subtracted. `calculated_amount.value` is negative when excluded.
462
+ */
463
+ line_type?: 'INCLUDE' | 'EXCLUDE';
464
+ /**
465
+ * Per diem sub-rate ID.
466
+ */
467
+ sub_rate_id?: string;
468
+ /**
469
+ * `FULL_DAY`: the full daily allowance. `MEALS`: the meals portion of the daily
470
+ * allowance. `OTHERS`: an allowance that is not the full day or meals.
471
+ */
472
+ sub_rate_type?: 'FULL_DAY' | 'MEALS' | 'OTHERS';
473
+ }
474
+ namespace PerDiemLineItem {
475
+ /**
476
+ * Sub-rate amount for one unit. The `value` is a decimal string.
477
+ */
478
+ interface Amount {
479
+ /**
480
+ * The currency type, ex: USD, EUR, etc.
481
+ */
482
+ currency_type?: string;
483
+ /**
484
+ * The decimal amount for the currency.
485
+ */
486
+ value?: number;
487
+ }
488
+ /**
489
+ * amount times count. The `value` is a decimal string. Negative when line_type is
490
+ * EXCLUDE.
491
+ */
492
+ interface CalculatedAmount {
493
+ /**
494
+ * The currency type, ex: USD, EUR, etc.
495
+ */
496
+ currency_type?: string;
497
+ /**
498
+ * The decimal amount for the currency.
499
+ */
500
+ value?: number;
501
+ }
502
+ }
503
+ /**
504
+ * Per diem rate for the trip. Null except on per diem reimbursements.
505
+ */
506
+ interface PerDiemRate {
507
+ /**
508
+ * Per diem rate ID.
509
+ */
510
+ id?: string;
511
+ /**
512
+ * Country this per diem rate applies to, as an ISO 3166-1 alpha-2 code. Example:
513
+ * US.
514
+ */
515
+ country?: string;
516
+ /**
517
+ * Currency of the per diem rate, as an ISO 4217 code. Example: USD.
518
+ */
519
+ currency?: string;
520
+ /**
521
+ * Place this per diem rate applies to, such as a city.
522
+ */
523
+ destination_name?: string;
524
+ }
525
+ /**
526
+ * Vendor the purchase was made from.
527
+ */
528
+ interface Vendor {
529
+ /**
530
+ * ID of the vendor.
531
+ */
532
+ id?: string;
533
+ /**
534
+ * Name of the vendor.
535
+ */
536
+ name?: string;
537
+ }
538
+ }
539
+ /**
540
+ * Meta information for the response.
541
+ */
542
+ export interface ReimbursementRetrieveResponse extends BusinessPartnersAPI.Meta {
543
+ /**
544
+ * Identifier field
545
+ */
546
+ id: string;
547
+ /**
548
+ * Record creation date
549
+ */
550
+ created_at: string;
551
+ /**
552
+ * Record update date
553
+ */
554
+ updated_at: string;
555
+ /**
556
+ * Date the transaction is booked in the accounting system, as an ISO 8601 date
557
+ * (YYYY-MM-DD).
558
+ */
559
+ accounting_date?: string;
560
+ /**
561
+ * Approval status of the transaction. `DRAFT`: not submitted for approval.
562
+ * `PENDING`: awaiting required information or submission before approval.
563
+ * `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`:
564
+ * rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or
565
+ * reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null
566
+ * for card authorizations.
567
+ */
568
+ approval_status?: 'DRAFT' | 'PENDING' | 'REQUESTED' | 'APPROVED' | 'REJECTED' | 'FINALIZED' | 'ACTIONED' | 'CANCELLED' | 'FAILED';
569
+ /**
570
+ * URLs of other attached files.
571
+ */
572
+ attachments?: Array<string>;
573
+ /**
574
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
575
+ */
576
+ company_amount?: ReimbursementRetrieveResponse.CompanyAmount;
577
+ /**
578
+ * Trip length in mileage_rate.units. Null except on mileage reimbursements.
579
+ */
580
+ distance?: number;
581
+ /**
582
+ * Mileage end address. Null when the trip has no end address.
583
+ */
584
+ end_address?: string;
585
+ /**
586
+ * ID of the legal entity the transaction belongs to. Use it with
587
+ * `/company-legal-entities/{id}/`.
588
+ */
589
+ entity_id?: string;
590
+ /**
591
+ * State of the sync to the accounting system. `NOT_FINALIZED`: not ready for
592
+ * accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`:
593
+ * sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync
594
+ * failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for
595
+ * accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to
596
+ * be synced automatically. Null when no sync state is set.
597
+ */
598
+ gl_sync_state?: 'NOT_FINALIZED' | 'FOR_REVIEW' | 'PENDING_SYNC' | 'SYNCED' | 'ERROR' | 'DO_NOT_SYNC' | 'EXPORTED' | 'NOT_SYNCABLE' | 'AUTO_SYNC';
599
+ /**
600
+ * Vendor in the connected accounting system.
601
+ */
602
+ gl_vendor?: ReimbursementRetrieveResponse.GlVendor;
603
+ /**
604
+ * Category splits of the transaction amount.
605
+ */
606
+ line_items?: Array<ReimbursementRetrieveResponse.LineItem>;
607
+ /**
608
+ * Memo entered on the transaction.
609
+ */
610
+ memo?: string;
611
+ /**
612
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
613
+ * decimal string.
614
+ */
615
+ merchant_amount?: ReimbursementRetrieveResponse.MerchantAmount;
616
+ /**
617
+ * Company mileage rate. Null except on mileage reimbursements.
618
+ */
619
+ mileage_rate?: ReimbursementRetrieveResponse.MileageRate;
620
+ /**
621
+ * Amount credited to the worker. The `value` is a decimal string.
622
+ */
623
+ payout_amount?: ReimbursementRetrieveResponse.PayoutAmount;
624
+ /**
625
+ * Date the worker is paid, as an ISO 8601 date (YYYY-MM-DD). Null before a run is
626
+ * assigned.
627
+ */
628
+ payout_date?: string;
629
+ /**
630
+ * How the worker is paid. `NOT_SET`: no payout run is assigned. `US_PAYROLL`:
631
+ * assigned to a US payroll run. `GLOBAL_PAYROLL`: assigned to a global payroll
632
+ * run. `DIRECT_DEPOSIT`: assigned to a direct deposit run. `EOR`: assigned to an
633
+ * employer-of-record payroll run. `MANUAL`: marked paid outside a run. If a payout
634
+ * method override is set, it is returned.
635
+ */
636
+ payout_method?: 'NOT_SET' | 'GLOBAL_PAYROLL' | 'US_PAYROLL' | 'DIRECT_DEPOSIT' | 'EOR' | 'MANUAL';
637
+ /**
638
+ * Per diem sub-rate rows. Null except on per diem reimbursements.
639
+ */
640
+ per_diem_line_items?: Array<ReimbursementRetrieveResponse.PerDiemLineItem>;
641
+ /**
642
+ * Per diem rate for the trip. Null except on per diem reimbursements.
643
+ */
644
+ per_diem_rate?: ReimbursementRetrieveResponse.PerDiemRate;
645
+ /**
646
+ * URL of the receipt file.
647
+ */
648
+ receipt?: string;
649
+ /**
650
+ * Mileage start address. Null when the trip has no start address.
651
+ */
652
+ start_address?: string;
653
+ /**
654
+ * When the purchase or authorization happened, as an ISO 8601 date-time in UTC.
655
+ */
656
+ transaction_date?: string;
657
+ /**
658
+ * `REIMBURSEMENT`: an expense the worker paid and the company pays back.
659
+ * `MILEAGE_REIMBURSEMENT`: payback for distance driven. `PER_DIEM_REIMBURSEMENT`:
660
+ * payback for a daily travel allowance. This decides which mileage or per diem
661
+ * fields are set.
662
+ */
663
+ transaction_type?: 'REIMBURSEMENT' | 'MILEAGE_REIMBURSEMENT' | 'PER_DIEM_REIMBURSEMENT';
664
+ /**
665
+ * Per diem trip end date, as an ISO 8601 date (YYYY-MM-DD). Null except on per
666
+ * diem reimbursements.
667
+ */
668
+ trip_end_date?: string;
669
+ /**
670
+ * Per diem trip start date, as an ISO 8601 date (YYYY-MM-DD). Null except on per
671
+ * diem reimbursements.
672
+ */
673
+ trip_start_date?: string;
674
+ /**
675
+ * Vendor the purchase was made from.
676
+ */
677
+ vendor?: ReimbursementRetrieveResponse.Vendor;
678
+ /**
679
+ * ID of the worker who made the transaction. Use it with `/workers/{id}/`.
680
+ */
681
+ worker_id?: string;
682
+ }
683
+ export declare namespace ReimbursementRetrieveResponse {
684
+ /**
685
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
686
+ */
687
+ interface CompanyAmount {
688
+ /**
689
+ * The currency type, ex: USD, EUR, etc.
690
+ */
691
+ currency_type?: string;
692
+ /**
693
+ * The decimal amount for the currency.
694
+ */
695
+ value?: number;
696
+ }
697
+ /**
698
+ * Vendor in the connected accounting system.
699
+ */
700
+ interface GlVendor {
701
+ /**
702
+ * ID of the accounting vendor in Rippling.
703
+ */
704
+ id?: string;
705
+ /**
706
+ * ID of the vendor in the accounting system.
707
+ */
708
+ gl_vendor_id?: string;
709
+ /**
710
+ * Name of the vendor in the accounting system.
711
+ */
712
+ name?: string;
713
+ }
714
+ interface LineItem {
715
+ /**
716
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
717
+ */
718
+ amount?: LineItem.Amount;
719
+ /**
720
+ * ID of the Spend category assigned to this split. No public API is currently
721
+ * available to retrieve this category; its name is in `category_name`.
722
+ */
723
+ category_id?: string;
724
+ /**
725
+ * Name of the spend category.
726
+ */
727
+ category_name?: string;
728
+ /**
729
+ * Selected dimension values, keyed by dimension ID. Includes department and work
730
+ * location.
731
+ */
732
+ dimension_choices?: {
733
+ [key: string]: LineItem.DimensionChoices;
734
+ };
735
+ /**
736
+ * Whether this split is billed to `gl_customer` in the accounting system.
737
+ * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not
738
+ * set.
739
+ */
740
+ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE';
741
+ /**
742
+ * ID of the customer record in the connected accounting integration. No public
743
+ * Rippling API is currently available to retrieve this accounting customer.
744
+ */
745
+ gl_customer?: string;
746
+ /**
747
+ * Memo entered on this split.
748
+ */
749
+ memo?: string;
750
+ }
751
+ namespace LineItem {
752
+ /**
753
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
754
+ */
755
+ interface Amount {
756
+ /**
757
+ * The currency type, ex: USD, EUR, etc.
758
+ */
759
+ currency_type?: string;
760
+ /**
761
+ * The decimal amount for the currency.
762
+ */
763
+ value?: number;
764
+ }
765
+ interface DimensionChoices {
766
+ /**
767
+ * Name of the dimension, such as Department.
768
+ */
769
+ dimension_name?: string;
770
+ /**
771
+ * Display name of the selected dimension value.
772
+ */
773
+ label?: string;
774
+ /**
775
+ * ID of the selected dimension value.
776
+ */
777
+ value?: string;
778
+ }
779
+ }
780
+ /**
781
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
782
+ * decimal string.
783
+ */
784
+ interface MerchantAmount {
785
+ /**
786
+ * The currency type, ex: USD, EUR, etc.
787
+ */
788
+ currency_type?: string;
789
+ /**
790
+ * The decimal amount for the currency.
791
+ */
792
+ value?: number;
793
+ }
794
+ /**
795
+ * Company mileage rate. Null except on mileage reimbursements.
796
+ */
797
+ interface MileageRate {
798
+ /**
799
+ * Company mileage rate ID.
800
+ */
801
+ id?: string;
802
+ /**
803
+ * Company-defined label for this mileage rate, such as the rate used for a country
804
+ * or vehicle type.
805
+ */
806
+ name?: string;
807
+ /**
808
+ * Amount per distance unit. The `value` is a decimal string.
809
+ */
810
+ rate?: MileageRate.Rate;
811
+ /**
812
+ * Distance unit, mi or km.
813
+ */
814
+ units?: 'km' | 'mi';
815
+ }
816
+ namespace MileageRate {
817
+ /**
818
+ * Amount per distance unit. The `value` is a decimal string.
819
+ */
820
+ interface Rate {
821
+ /**
822
+ * The currency type, ex: USD, EUR, etc.
823
+ */
824
+ currency_type?: string;
825
+ /**
826
+ * The decimal amount for the currency.
827
+ */
828
+ value?: number;
829
+ }
830
+ }
831
+ /**
832
+ * Amount credited to the worker. The `value` is a decimal string.
833
+ */
834
+ interface PayoutAmount {
835
+ /**
836
+ * The currency type, ex: USD, EUR, etc.
837
+ */
838
+ currency_type?: string;
839
+ /**
840
+ * The decimal amount for the currency.
841
+ */
842
+ value?: number;
843
+ }
844
+ interface PerDiemLineItem {
845
+ /**
846
+ * Sub-rate amount for one unit. The `value` is a decimal string.
847
+ */
848
+ amount?: PerDiemLineItem.Amount;
849
+ /**
850
+ * amount times count. The `value` is a decimal string. Negative when line_type is
851
+ * EXCLUDE.
852
+ */
853
+ calculated_amount?: PerDiemLineItem.CalculatedAmount;
854
+ /**
855
+ * How many units.
856
+ */
857
+ count?: number;
858
+ /**
859
+ * Sub-rate label.
860
+ */
861
+ label?: string;
862
+ /**
863
+ * `INCLUDE`: this row is added to the reimbursement. `EXCLUDE`: this row is
864
+ * subtracted. `calculated_amount.value` is negative when excluded.
865
+ */
866
+ line_type?: 'INCLUDE' | 'EXCLUDE';
867
+ /**
868
+ * Per diem sub-rate ID.
869
+ */
870
+ sub_rate_id?: string;
871
+ /**
872
+ * `FULL_DAY`: the full daily allowance. `MEALS`: the meals portion of the daily
873
+ * allowance. `OTHERS`: an allowance that is not the full day or meals.
874
+ */
875
+ sub_rate_type?: 'FULL_DAY' | 'MEALS' | 'OTHERS';
876
+ }
877
+ namespace PerDiemLineItem {
878
+ /**
879
+ * Sub-rate amount for one unit. The `value` is a decimal string.
880
+ */
881
+ interface Amount {
882
+ /**
883
+ * The currency type, ex: USD, EUR, etc.
884
+ */
885
+ currency_type?: string;
886
+ /**
887
+ * The decimal amount for the currency.
888
+ */
889
+ value?: number;
890
+ }
891
+ /**
892
+ * amount times count. The `value` is a decimal string. Negative when line_type is
893
+ * EXCLUDE.
894
+ */
895
+ interface CalculatedAmount {
896
+ /**
897
+ * The currency type, ex: USD, EUR, etc.
898
+ */
899
+ currency_type?: string;
900
+ /**
901
+ * The decimal amount for the currency.
902
+ */
903
+ value?: number;
904
+ }
905
+ }
906
+ /**
907
+ * Per diem rate for the trip. Null except on per diem reimbursements.
908
+ */
909
+ interface PerDiemRate {
910
+ /**
911
+ * Per diem rate ID.
912
+ */
913
+ id?: string;
914
+ /**
915
+ * Country this per diem rate applies to, as an ISO 3166-1 alpha-2 code. Example:
916
+ * US.
917
+ */
918
+ country?: string;
919
+ /**
920
+ * Currency of the per diem rate, as an ISO 4217 code. Example: USD.
921
+ */
922
+ currency?: string;
923
+ /**
924
+ * Place this per diem rate applies to, such as a city.
925
+ */
926
+ destination_name?: string;
927
+ }
928
+ /**
929
+ * Vendor the purchase was made from.
930
+ */
931
+ interface Vendor {
932
+ /**
933
+ * ID of the vendor.
934
+ */
935
+ id?: string;
936
+ /**
937
+ * Name of the vendor.
938
+ */
939
+ name?: string;
940
+ }
941
+ }
942
+ export interface ReimbursementListParams {
943
+ cursor?: string;
944
+ filter?: string;
945
+ /**
946
+ * The maximum number of results to return. Defaults to 50. Maximum is 100.
947
+ */
948
+ limit?: number;
949
+ order_by?: string;
950
+ }
951
+ export declare namespace Reimbursements {
952
+ export { type ReimbursementListResponse as ReimbursementListResponse, type ReimbursementRetrieveResponse as ReimbursementRetrieveResponse, type ReimbursementListResponsesPageCursorURL as ReimbursementListResponsesPageCursorURL, type ReimbursementListParams as ReimbursementListParams, };
953
+ }
954
+ //# sourceMappingURL=reimbursements.d.ts.map