@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,718 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as BusinessPartnersAPI from './business-partners';
5
+ import { APIPromise } from '../core/api-promise';
6
+ import { PageCursorURL, PagePromise } from '../core/pagination';
7
+ import { RequestOptions } from '../internal/request-options';
8
+ import { path } from '../internal/utils/path';
9
+
10
+ export class CardTransactions extends APIResource {
11
+ /**
12
+ * A list of card transactions.
13
+ *
14
+ * - Requires: `Internal Testing`
15
+ * - Filterable fields: `worker_id`, `transaction_date`, `entity_id`, `vendor_id`,
16
+ * `category_id`, `transaction_type`, `card_id`
17
+ * - Sortable fields: `id`, `created_at`, `updated_at`, `transaction_date`
18
+ *
19
+ * @example HTTP
20
+ * Representative request and response shapes.
21
+ * ```
22
+ * GET /card-transactions/?filter=filter&order_by=order_by&limit=50&cursor=cursor HTTP/1.1
23
+ * Host: rest.ripplingapis.com
24
+ * Accept: application/json
25
+ * Rippling-Api-Version: 2024-08-01
26
+ *
27
+ * HTTP/1.1 200 OK
28
+ * Content-Type: application/json
29
+ *
30
+ * {
31
+ * "__meta": {
32
+ * "redacted_fields": [
33
+ * {
34
+ * "name": "date_of_birth",
35
+ * "reason": "Insufficient entitlements"
36
+ * }
37
+ * ]
38
+ * },
39
+ * "results": [
40
+ * {
41
+ * "id": "string",
42
+ * "created_at": "string",
43
+ * "updated_at": "string",
44
+ * "worker_id": "string",
45
+ * "company_amount": {
46
+ * "currency_type": "string",
47
+ * "value": "string"
48
+ * },
49
+ * "merchant_amount": {
50
+ * "currency_type": "string",
51
+ * "value": "string"
52
+ * },
53
+ * "transaction_date": "string",
54
+ * "accounting_date": "string",
55
+ * "gl_sync_state": "NOT_FINALIZED",
56
+ * "approval_status": "DRAFT",
57
+ * "entity_id": "string",
58
+ * "vendor": {
59
+ * "id": "string",
60
+ * "name": "string"
61
+ * },
62
+ * "gl_vendor": {
63
+ * "id": "string",
64
+ * "name": "string",
65
+ * "gl_vendor_id": "string"
66
+ * },
67
+ * "memo": "string",
68
+ * "receipt": "string",
69
+ * "attachments": [
70
+ * "string"
71
+ * ],
72
+ * "line_items": [
73
+ * {}
74
+ * ],
75
+ * "transaction_type": "CARD_TRANSACTION",
76
+ * "authorization_state": "PENDING",
77
+ * "card_id": "string"
78
+ * }
79
+ * ],
80
+ * "next_link": "string"
81
+ * }
82
+ * ```
83
+ */
84
+ list(
85
+ query: CardTransactionListParams | null | undefined = {},
86
+ options?: RequestOptions,
87
+ ): PagePromise<CardTransactionListResponsesPageCursorURL, CardTransactionListResponse> {
88
+ return this._client.getAPIList('/card-transactions/', PageCursorURL<CardTransactionListResponse>, {
89
+ query,
90
+ ...options,
91
+ });
92
+ }
93
+
94
+ /**
95
+ * Retrieve a specific card transaction
96
+ *
97
+ * @example HTTP
98
+ * Representative request and response shapes.
99
+ * ```
100
+ * GET /card-transactions/{id}/ HTTP/1.1
101
+ * Host: rest.ripplingapis.com
102
+ * Accept: application/json
103
+ * Rippling-Api-Version: 2024-08-01
104
+ *
105
+ * HTTP/1.1 200 OK
106
+ * Content-Type: application/json
107
+ *
108
+ * {
109
+ * "__meta": {
110
+ * "redacted_fields": [
111
+ * {}
112
+ * ]
113
+ * }
114
+ * }
115
+ * ```
116
+ */
117
+ retrieve(id: string, options?: RequestOptions): APIPromise<CardTransactionRetrieveResponse> {
118
+ return this._client.get(path`/card-transactions/${id}/`, options);
119
+ }
120
+ }
121
+
122
+ export type CardTransactionListResponsesPageCursorURL = PageCursorURL<CardTransactionListResponse>;
123
+
124
+ /**
125
+ * A Spend card transaction or authorization the caller can see.
126
+ *
127
+ * An authorization is a pending hold the card network places at the time of purchase. A card transaction
128
+ * is the posted charge. List returns both; retrieve returns one by ID. A transaction the
129
+ * caller cannot see returns 404, the same as one that does not exist.
130
+ */
131
+ export interface CardTransactionListResponse {
132
+ /**
133
+ * Identifier field
134
+ */
135
+ id: string;
136
+
137
+ /**
138
+ * Record creation date
139
+ */
140
+ created_at: string;
141
+
142
+ /**
143
+ * Record update date
144
+ */
145
+ updated_at: string;
146
+
147
+ /**
148
+ * Date the transaction is booked in the accounting system, as an ISO 8601 date
149
+ * (YYYY-MM-DD).
150
+ */
151
+ accounting_date?: string;
152
+
153
+ /**
154
+ * Approval status of the transaction. `DRAFT`: not submitted for approval.
155
+ * `PENDING`: awaiting required information or submission before approval.
156
+ * `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`:
157
+ * rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or
158
+ * reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null
159
+ * for card authorizations.
160
+ */
161
+ approval_status?:
162
+ | 'DRAFT'
163
+ | 'PENDING'
164
+ | 'REQUESTED'
165
+ | 'APPROVED'
166
+ | 'REJECTED'
167
+ | 'FINALIZED'
168
+ | 'ACTIONED'
169
+ | 'CANCELLED'
170
+ | 'FAILED';
171
+
172
+ /**
173
+ * URLs of other attached files.
174
+ */
175
+ attachments?: Array<string>;
176
+
177
+ /**
178
+ * State of the card authorization. `PENDING`: an active hold awaiting completion.
179
+ * `CLOSED`: the authorization completed and the charge posted. `REVERSED`: the
180
+ * authorization was reversed and the hold released. `EXPIRED`: the hold expired
181
+ * without completion. Null for posted card transactions.
182
+ */
183
+ authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED';
184
+
185
+ /**
186
+ * ID of the Spend card used. No public API is currently available to retrieve this
187
+ * card.
188
+ */
189
+ card_id?: string;
190
+
191
+ /**
192
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
193
+ */
194
+ company_amount?: CardTransactionListResponse.CompanyAmount;
195
+
196
+ /**
197
+ * ID of the legal entity the transaction belongs to. Use it with
198
+ * `/company-legal-entities/{id}/`.
199
+ */
200
+ entity_id?: string;
201
+
202
+ /**
203
+ * State of the sync to the accounting system. `NOT_FINALIZED`: not ready for
204
+ * accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`:
205
+ * sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync
206
+ * failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for
207
+ * accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to
208
+ * be synced automatically. Null when no sync state is set.
209
+ */
210
+ gl_sync_state?:
211
+ | 'NOT_FINALIZED'
212
+ | 'FOR_REVIEW'
213
+ | 'PENDING_SYNC'
214
+ | 'SYNCED'
215
+ | 'ERROR'
216
+ | 'DO_NOT_SYNC'
217
+ | 'EXPORTED'
218
+ | 'NOT_SYNCABLE'
219
+ | 'AUTO_SYNC';
220
+
221
+ /**
222
+ * Vendor in the connected accounting system.
223
+ */
224
+ gl_vendor?: CardTransactionListResponse.GlVendor;
225
+
226
+ /**
227
+ * Category splits of the transaction amount.
228
+ */
229
+ line_items?: Array<CardTransactionListResponse.LineItem>;
230
+
231
+ /**
232
+ * Memo entered on the transaction.
233
+ */
234
+ memo?: string;
235
+
236
+ /**
237
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
238
+ * decimal string.
239
+ */
240
+ merchant_amount?: CardTransactionListResponse.MerchantAmount;
241
+
242
+ /**
243
+ * URL of the receipt file.
244
+ */
245
+ receipt?: string;
246
+
247
+ /**
248
+ * When the purchase or authorization happened, as an ISO 8601 date-time in UTC.
249
+ */
250
+ transaction_date?: string;
251
+
252
+ /**
253
+ * `CARD_TRANSACTION`: a posted card charge. `CARD_AUTHORIZATION`: a hold placed by
254
+ * the card network before the charge posts.
255
+ */
256
+ transaction_type?: 'CARD_TRANSACTION' | 'CARD_AUTHORIZATION';
257
+
258
+ /**
259
+ * Vendor the purchase was made from.
260
+ */
261
+ vendor?: CardTransactionListResponse.Vendor;
262
+
263
+ /**
264
+ * ID of the worker who made the transaction. Use it with `/workers/{id}/`.
265
+ */
266
+ worker_id?: string;
267
+ }
268
+
269
+ export namespace CardTransactionListResponse {
270
+ /**
271
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
272
+ */
273
+ export interface CompanyAmount {
274
+ /**
275
+ * The currency type, ex: USD, EUR, etc.
276
+ */
277
+ currency_type?: string;
278
+
279
+ /**
280
+ * The decimal amount for the currency.
281
+ */
282
+ value?: number;
283
+ }
284
+
285
+ /**
286
+ * Vendor in the connected accounting system.
287
+ */
288
+ export interface GlVendor {
289
+ /**
290
+ * ID of the accounting vendor in Rippling.
291
+ */
292
+ id?: string;
293
+
294
+ /**
295
+ * ID of the vendor in the accounting system.
296
+ */
297
+ gl_vendor_id?: string;
298
+
299
+ /**
300
+ * Name of the vendor in the accounting system.
301
+ */
302
+ name?: string;
303
+ }
304
+
305
+ export interface LineItem {
306
+ /**
307
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
308
+ */
309
+ amount?: LineItem.Amount;
310
+
311
+ /**
312
+ * ID of the Spend category assigned to this split. No public API is currently
313
+ * available to retrieve this category; its name is in `category_name`.
314
+ */
315
+ category_id?: string;
316
+
317
+ /**
318
+ * Name of the spend category.
319
+ */
320
+ category_name?: string;
321
+
322
+ /**
323
+ * Selected dimension values, keyed by dimension ID. Includes department and work
324
+ * location.
325
+ */
326
+ dimension_choices?: { [key: string]: LineItem.DimensionChoices };
327
+
328
+ /**
329
+ * Whether this split is billed to `gl_customer` in the accounting system.
330
+ * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not
331
+ * set.
332
+ */
333
+ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE';
334
+
335
+ /**
336
+ * ID of the customer record in the connected accounting integration. No public
337
+ * Rippling API is currently available to retrieve this accounting customer.
338
+ */
339
+ gl_customer?: string;
340
+
341
+ /**
342
+ * Memo entered on this split.
343
+ */
344
+ memo?: string;
345
+ }
346
+
347
+ export namespace LineItem {
348
+ /**
349
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
350
+ */
351
+ export interface Amount {
352
+ /**
353
+ * The currency type, ex: USD, EUR, etc.
354
+ */
355
+ currency_type?: string;
356
+
357
+ /**
358
+ * The decimal amount for the currency.
359
+ */
360
+ value?: number;
361
+ }
362
+
363
+ export interface DimensionChoices {
364
+ /**
365
+ * Name of the dimension, such as Department.
366
+ */
367
+ dimension_name?: string;
368
+
369
+ /**
370
+ * Display name of the selected dimension value.
371
+ */
372
+ label?: string;
373
+
374
+ /**
375
+ * ID of the selected dimension value.
376
+ */
377
+ value?: string;
378
+ }
379
+ }
380
+
381
+ /**
382
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
383
+ * decimal string.
384
+ */
385
+ export interface MerchantAmount {
386
+ /**
387
+ * The currency type, ex: USD, EUR, etc.
388
+ */
389
+ currency_type?: string;
390
+
391
+ /**
392
+ * The decimal amount for the currency.
393
+ */
394
+ value?: number;
395
+ }
396
+
397
+ /**
398
+ * Vendor the purchase was made from.
399
+ */
400
+ export interface Vendor {
401
+ /**
402
+ * ID of the vendor.
403
+ */
404
+ id?: string;
405
+
406
+ /**
407
+ * Name of the vendor.
408
+ */
409
+ name?: string;
410
+ }
411
+ }
412
+
413
+ /**
414
+ * Meta information for the response.
415
+ */
416
+ export interface CardTransactionRetrieveResponse extends BusinessPartnersAPI.Meta {
417
+ /**
418
+ * Identifier field
419
+ */
420
+ id: string;
421
+
422
+ /**
423
+ * Record creation date
424
+ */
425
+ created_at: string;
426
+
427
+ /**
428
+ * Record update date
429
+ */
430
+ updated_at: string;
431
+
432
+ /**
433
+ * Date the transaction is booked in the accounting system, as an ISO 8601 date
434
+ * (YYYY-MM-DD).
435
+ */
436
+ accounting_date?: string;
437
+
438
+ /**
439
+ * Approval status of the transaction. `DRAFT`: not submitted for approval.
440
+ * `PENDING`: awaiting required information or submission before approval.
441
+ * `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`:
442
+ * rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or
443
+ * reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null
444
+ * for card authorizations.
445
+ */
446
+ approval_status?:
447
+ | 'DRAFT'
448
+ | 'PENDING'
449
+ | 'REQUESTED'
450
+ | 'APPROVED'
451
+ | 'REJECTED'
452
+ | 'FINALIZED'
453
+ | 'ACTIONED'
454
+ | 'CANCELLED'
455
+ | 'FAILED';
456
+
457
+ /**
458
+ * URLs of other attached files.
459
+ */
460
+ attachments?: Array<string>;
461
+
462
+ /**
463
+ * State of the card authorization. `PENDING`: an active hold awaiting completion.
464
+ * `CLOSED`: the authorization completed and the charge posted. `REVERSED`: the
465
+ * authorization was reversed and the hold released. `EXPIRED`: the hold expired
466
+ * without completion. Null for posted card transactions.
467
+ */
468
+ authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED';
469
+
470
+ /**
471
+ * ID of the Spend card used. No public API is currently available to retrieve this
472
+ * card.
473
+ */
474
+ card_id?: string;
475
+
476
+ /**
477
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
478
+ */
479
+ company_amount?: CardTransactionRetrieveResponse.CompanyAmount;
480
+
481
+ /**
482
+ * ID of the legal entity the transaction belongs to. Use it with
483
+ * `/company-legal-entities/{id}/`.
484
+ */
485
+ entity_id?: string;
486
+
487
+ /**
488
+ * State of the sync to the accounting system. `NOT_FINALIZED`: not ready for
489
+ * accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`:
490
+ * sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync
491
+ * failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for
492
+ * accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to
493
+ * be synced automatically. Null when no sync state is set.
494
+ */
495
+ gl_sync_state?:
496
+ | 'NOT_FINALIZED'
497
+ | 'FOR_REVIEW'
498
+ | 'PENDING_SYNC'
499
+ | 'SYNCED'
500
+ | 'ERROR'
501
+ | 'DO_NOT_SYNC'
502
+ | 'EXPORTED'
503
+ | 'NOT_SYNCABLE'
504
+ | 'AUTO_SYNC';
505
+
506
+ /**
507
+ * Vendor in the connected accounting system.
508
+ */
509
+ gl_vendor?: CardTransactionRetrieveResponse.GlVendor;
510
+
511
+ /**
512
+ * Category splits of the transaction amount.
513
+ */
514
+ line_items?: Array<CardTransactionRetrieveResponse.LineItem>;
515
+
516
+ /**
517
+ * Memo entered on the transaction.
518
+ */
519
+ memo?: string;
520
+
521
+ /**
522
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
523
+ * decimal string.
524
+ */
525
+ merchant_amount?: CardTransactionRetrieveResponse.MerchantAmount;
526
+
527
+ /**
528
+ * URL of the receipt file.
529
+ */
530
+ receipt?: string;
531
+
532
+ /**
533
+ * When the purchase or authorization happened, as an ISO 8601 date-time in UTC.
534
+ */
535
+ transaction_date?: string;
536
+
537
+ /**
538
+ * `CARD_TRANSACTION`: a posted card charge. `CARD_AUTHORIZATION`: a hold placed by
539
+ * the card network before the charge posts.
540
+ */
541
+ transaction_type?: 'CARD_TRANSACTION' | 'CARD_AUTHORIZATION';
542
+
543
+ /**
544
+ * Vendor the purchase was made from.
545
+ */
546
+ vendor?: CardTransactionRetrieveResponse.Vendor;
547
+
548
+ /**
549
+ * ID of the worker who made the transaction. Use it with `/workers/{id}/`.
550
+ */
551
+ worker_id?: string;
552
+ }
553
+
554
+ export namespace CardTransactionRetrieveResponse {
555
+ /**
556
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
557
+ */
558
+ export interface CompanyAmount {
559
+ /**
560
+ * The currency type, ex: USD, EUR, etc.
561
+ */
562
+ currency_type?: string;
563
+
564
+ /**
565
+ * The decimal amount for the currency.
566
+ */
567
+ value?: number;
568
+ }
569
+
570
+ /**
571
+ * Vendor in the connected accounting system.
572
+ */
573
+ export interface GlVendor {
574
+ /**
575
+ * ID of the accounting vendor in Rippling.
576
+ */
577
+ id?: string;
578
+
579
+ /**
580
+ * ID of the vendor in the accounting system.
581
+ */
582
+ gl_vendor_id?: string;
583
+
584
+ /**
585
+ * Name of the vendor in the accounting system.
586
+ */
587
+ name?: string;
588
+ }
589
+
590
+ export interface LineItem {
591
+ /**
592
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
593
+ */
594
+ amount?: LineItem.Amount;
595
+
596
+ /**
597
+ * ID of the Spend category assigned to this split. No public API is currently
598
+ * available to retrieve this category; its name is in `category_name`.
599
+ */
600
+ category_id?: string;
601
+
602
+ /**
603
+ * Name of the spend category.
604
+ */
605
+ category_name?: string;
606
+
607
+ /**
608
+ * Selected dimension values, keyed by dimension ID. Includes department and work
609
+ * location.
610
+ */
611
+ dimension_choices?: { [key: string]: LineItem.DimensionChoices };
612
+
613
+ /**
614
+ * Whether this split is billed to `gl_customer` in the accounting system.
615
+ * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not
616
+ * set.
617
+ */
618
+ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE';
619
+
620
+ /**
621
+ * ID of the customer record in the connected accounting integration. No public
622
+ * Rippling API is currently available to retrieve this accounting customer.
623
+ */
624
+ gl_customer?: string;
625
+
626
+ /**
627
+ * Memo entered on this split.
628
+ */
629
+ memo?: string;
630
+ }
631
+
632
+ export namespace LineItem {
633
+ /**
634
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
635
+ */
636
+ export interface Amount {
637
+ /**
638
+ * The currency type, ex: USD, EUR, etc.
639
+ */
640
+ currency_type?: string;
641
+
642
+ /**
643
+ * The decimal amount for the currency.
644
+ */
645
+ value?: number;
646
+ }
647
+
648
+ export interface DimensionChoices {
649
+ /**
650
+ * Name of the dimension, such as Department.
651
+ */
652
+ dimension_name?: string;
653
+
654
+ /**
655
+ * Display name of the selected dimension value.
656
+ */
657
+ label?: string;
658
+
659
+ /**
660
+ * ID of the selected dimension value.
661
+ */
662
+ value?: string;
663
+ }
664
+ }
665
+
666
+ /**
667
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
668
+ * decimal string.
669
+ */
670
+ export interface MerchantAmount {
671
+ /**
672
+ * The currency type, ex: USD, EUR, etc.
673
+ */
674
+ currency_type?: string;
675
+
676
+ /**
677
+ * The decimal amount for the currency.
678
+ */
679
+ value?: number;
680
+ }
681
+
682
+ /**
683
+ * Vendor the purchase was made from.
684
+ */
685
+ export interface Vendor {
686
+ /**
687
+ * ID of the vendor.
688
+ */
689
+ id?: string;
690
+
691
+ /**
692
+ * Name of the vendor.
693
+ */
694
+ name?: string;
695
+ }
696
+ }
697
+
698
+ export interface CardTransactionListParams {
699
+ cursor?: string;
700
+
701
+ filter?: string;
702
+
703
+ /**
704
+ * The maximum number of results to return. Defaults to 50. Maximum is 100.
705
+ */
706
+ limit?: number;
707
+
708
+ order_by?: string;
709
+ }
710
+
711
+ export declare namespace CardTransactions {
712
+ export {
713
+ type CardTransactionListResponse as CardTransactionListResponse,
714
+ type CardTransactionRetrieveResponse as CardTransactionRetrieveResponse,
715
+ type CardTransactionListResponsesPageCursorURL as CardTransactionListResponsesPageCursorURL,
716
+ type CardTransactionListParams as CardTransactionListParams,
717
+ };
718
+ }