@spritz-finance/api-client 0.2.2 → 0.2.3

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/README.md CHANGED
@@ -40,6 +40,7 @@ A Typescript library for interacting with the Spritz Finance API
40
40
  - [Bank Accounts](#bank-accounts)
41
41
  - [List user bank accounts](#list-user-bank-accounts)
42
42
  - [Add US bank account](#add-us-bank-account)
43
+ - [Add Canadian bank account](#add-canadian-bank-account)
43
44
  - [Bills](#bills)
44
45
  - [List user bills](#list-user-bills)
45
46
  - [Add US bill account](#add-us-bill-account)
@@ -286,6 +287,7 @@ const bankAccounts = [{
286
287
  },
287
288
  ownedByUser: true,
288
289
  createdAt: "2023-05-03T11:25:02.401Z",
290
+ deliveryMethods: ['STANDARD', 'INSTANT']
289
291
  }]
290
292
  ```
291
293
 
@@ -314,7 +316,40 @@ import { BankAccountType, BankAccountSubType } from '@spritz-finance/api-client'
314
316
  const bankAccounts = await client.bankAccount.create(BankAccountType.USBankAccount, {
315
317
  accountNumber: '123456789',
316
318
  routingNumber: '987654321',
317
- email: 'bilbo@shiremail.net',
319
+ holder: 'Bilbo Baggins',
320
+ name: 'Precious Savings',
321
+ ownedByUser: true,
322
+ subType: BankAccountSubType.Savings,
323
+ })
324
+ ```
325
+
326
+ #### Add Canadian bank account
327
+
328
+ Currently, Spritz supports the addition of Canadian bank accounts:
329
+
330
+ The input structure for adding a Canadian bank account is defined as:
331
+
332
+ ```typescript
333
+ // Input arguments for creating a Canadian bank account
334
+ export interface CABankAccountInput {
335
+ accountNumber: string
336
+ email?: string
337
+ holder: string
338
+ name: string
339
+ ownedByUser?: boolean | null
340
+ transitNumber: string
341
+ institutionNumber: string
342
+ subType: BankAccountSubType
343
+ }
344
+ ```
345
+
346
+ ```typescript
347
+ import { BankAccountType, BankAccountSubType } from '@spritz-finance/api-client'
348
+
349
+ const bankAccounts = await client.bankAccount.create(BankAccountType.CABankAccount, {
350
+ accountNumber: '123456789',
351
+ transitNumber: '12345',
352
+ institutionNumber: '123',
318
353
  holder: 'Bilbo Baggins',
319
354
  name: 'Precious Savings',
320
355
  ownedByUser: true,
@@ -371,6 +406,7 @@ const bills = [
371
406
  logo: 'https://tinyurl.com/shire-bank-logo',
372
407
  },
373
408
  createdAt: '2023-05-03T11:25:02.401Z',
409
+ deliveryMethods: ['STANDARD']
374
410
  },
375
411
  ]
376
412
  ```
@@ -523,6 +559,7 @@ const paymentRequest = await client.paymentRequest.create({
523
559
  amount: 100,
524
560
  accountId: account.id,
525
561
  network: PaymentNetwork.Ethereum,
562
+ deliveryMethod: 'INSTANT'
526
563
  });
527
564
 
528
565
  // Example response
@@ -63,6 +63,10 @@ declare enum PayableAccountType {
63
63
  Bill = "Bill",
64
64
  VirtualCard = "VirtualCard"
65
65
  }
66
+ declare enum PaymentDeliveryMethod {
67
+ INSTANT = "INSTANT",
68
+ STANDARD = "STANDARD"
69
+ }
66
70
  declare enum PaymentStatus {
67
71
  CANCELLED = "CANCELLED",
68
72
  COMPLETED = "COMPLETED",
@@ -91,6 +95,7 @@ interface BankAccountInput {
91
95
  interface CreateDirectPaymentInput {
92
96
  accountId: string;
93
97
  amount: number;
98
+ deliveryMethod?: PaymentDeliveryMethod | null;
94
99
  network?: string | null;
95
100
  provider?: AccountProvider | null;
96
101
  rewardsAmount?: number | null;
@@ -133,7 +138,7 @@ interface CreateBankAccount_createBankAccount {
133
138
  bankAccountType: BankAccountType;
134
139
  bankAccountSubType: BankAccountSubType;
135
140
  holder: string;
136
- email: string;
141
+ email: string | null;
137
142
  ownedByUser: boolean;
138
143
  bankAccountDetails: CreateBankAccount_createBankAccount_bankAccountDetails;
139
144
  dataSync: CreateBankAccount_createBankAccount_dataSync | null;
@@ -149,6 +154,7 @@ interface AccountPayments_paymentsForAccount {
149
154
  amount: number | null;
150
155
  feeAmount: number | null;
151
156
  createdAt: any;
157
+ deliveryMethod: PaymentDeliveryMethod | null;
152
158
  }
153
159
  interface AccountPayments {
154
160
  paymentsForAccount: AccountPayments_paymentsForAccount[];
@@ -186,9 +192,10 @@ interface BankAccountFragment {
186
192
  bankAccountType: BankAccountType;
187
193
  bankAccountSubType: BankAccountSubType;
188
194
  holder: string;
189
- email: string;
195
+ email: string | null;
190
196
  ownedByUser: boolean;
191
197
  bankAccountDetails: BankAccountFragment_bankAccountDetails;
198
+ deliveryMethods: PaymentDeliveryMethod[];
192
199
  institution: BankAccountFragment_institution | null;
193
200
  }
194
201
 
@@ -301,7 +308,7 @@ interface PayableAccountFragment_BankAccount {
301
308
  bankAccountType: BankAccountType;
302
309
  bankAccountSubType: BankAccountSubType;
303
310
  holder: string;
304
- email: string;
311
+ email: string | null;
305
312
  ownedByUser: boolean;
306
313
  bankAccountDetails: PayableAccountFragment_BankAccount_bankAccountDetails;
307
314
  dataSync: PayableAccountFragment_BankAccount_dataSync | null;
@@ -413,6 +420,7 @@ interface PaymentFragment {
413
420
  amount: number | null;
414
421
  feeAmount: number | null;
415
422
  createdAt: any;
423
+ deliveryMethod: PaymentDeliveryMethod | null;
416
424
  }
417
425
 
418
426
  interface PaymentRequestFragment {
@@ -426,6 +434,7 @@ interface PaymentRequestFragment {
426
434
  amountDue: number;
427
435
  network: string;
428
436
  createdAt: any;
437
+ deliveryMethod: string | null;
429
438
  }
430
439
 
431
440
  interface PaymentRequestPayment_paymentForPaymentRequest {
@@ -437,6 +446,7 @@ interface PaymentRequestPayment_paymentForPaymentRequest {
437
446
  amount: number | null;
438
447
  feeAmount: number | null;
439
448
  createdAt: any;
449
+ deliveryMethod: PaymentDeliveryMethod | null;
440
450
  }
441
451
  interface PaymentRequestPayment {
442
452
  paymentForPaymentRequest: PaymentRequestPayment_paymentForPaymentRequest | null;
@@ -535,9 +545,10 @@ interface UserBankAccounts_bankAccounts {
535
545
  bankAccountType: BankAccountType;
536
546
  bankAccountSubType: BankAccountSubType;
537
547
  holder: string;
538
- email: string;
548
+ email: string | null;
539
549
  ownedByUser: boolean;
540
550
  bankAccountDetails: UserBankAccounts_bankAccounts_bankAccountDetails;
551
+ deliveryMethods: PaymentDeliveryMethod[];
541
552
  institution: UserBankAccounts_bankAccounts_institution | null;
542
553
  }
543
554
  interface UserBankAccounts {
@@ -636,7 +647,7 @@ interface UserPayableAccounts_payableAccounts_BankAccount {
636
647
  bankAccountType: BankAccountType;
637
648
  bankAccountSubType: BankAccountSubType;
638
649
  holder: string;
639
- email: string;
650
+ email: string | null;
640
651
  ownedByUser: boolean;
641
652
  bankAccountDetails: UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails;
642
653
  }
@@ -887,7 +898,7 @@ interface DeletePayableAccount_deletePayableAccount_BankAccount {
887
898
  bankAccountType: BankAccountType;
888
899
  bankAccountSubType: BankAccountSubType;
889
900
  holder: string;
890
- email: string;
901
+ email: string | null;
891
902
  ownedByUser: boolean;
892
903
  bankAccountDetails: DeletePayableAccount_deletePayableAccount_BankAccount_bankAccountDetails;
893
904
  }
@@ -964,9 +975,10 @@ interface RenameBankAccount_renamePayableAccount_BankAccount {
964
975
  bankAccountType: BankAccountType;
965
976
  bankAccountSubType: BankAccountSubType;
966
977
  holder: string;
967
- email: string;
978
+ email: string | null;
968
979
  ownedByUser: boolean;
969
980
  bankAccountDetails: RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails;
981
+ deliveryMethods: PaymentDeliveryMethod[];
970
982
  institution: RenameBankAccount_renamePayableAccount_BankAccount_institution | null;
971
983
  }
972
984
 
@@ -1122,6 +1134,7 @@ interface CreatePaymentRequest_createDirectPayment {
1122
1134
  amountDue: number;
1123
1135
  network: string;
1124
1136
  createdAt: any;
1137
+ deliveryMethod: string | null;
1125
1138
  }
1126
1139
 
1127
1140
  declare enum PaymentNetwork {