|
1 | 1 | import { Address, CardNetwork, Coordinates, Counterparty, CurrencyConversion, Direction, Merchant, Relationship, RelationshipsArray, RichMerchantData, Tags, UnimplementedFields } from "./common"
|
2 | 2 |
|
3 | 3 | export type Transaction = OriginatedAchTransaction | ReceivedAchTransaction | ReturnedAchTransaction | ReturnedReceivedAchTransaction | DishonoredAchTransaction | BookTransaction | PurchaseTransaction | AtmTransaction | FeeTransaction | FeeReversalTransaction |
|
4 |
| - CardReversalTransaction | CardTransaction | WireTransaction | ReleaseTransaction | AdjustmentTransaction | InterestTransaction | DisputeTransaction | CheckDepositTransaction | CheckPaymentTransaction | ReturnedCheckDepositTransaction | PaymentAdvanceTransaction | |
| 4 | + CardReversalTransaction | CardTransaction | WireTransaction | ReturnedWireTransaction | ReleaseTransaction | AdjustmentTransaction | InterestTransaction | DisputeTransaction | CheckDepositTransaction | CheckPaymentTransaction | ReturnedCheckDepositTransaction | ReturnedCheckPaymentTransaction | PaymentAdvanceTransaction | |
5 | 5 | RepaidPaymentAdvanceTransaction | PaymentCanceledTransaction | RewardTransaction | NegativeBalanceCoverageTransaction | PushToCardTransaction | AccountLowBalanceClosureTransaction | BankRepaymentTransaction
|
6 | 6 |
|
7 | 7 | export interface BaseTransaction {
|
@@ -500,6 +500,11 @@ export type AtmTransaction = BaseTransaction & {
|
500 | 500 | * The debit card involved in the transaction.
|
501 | 501 | */
|
502 | 502 | card: Relationship
|
| 503 | + |
| 504 | + /** |
| 505 | + * Optional. The [Authorization](https://developers.unit.co/#authorization) request made by the merchant, if present (see [Authorizations](https://developers.unit.co/#authorizations)). |
| 506 | + */ |
| 507 | + authorization?: Relationship |
503 | 508 | }
|
504 | 509 | }
|
505 | 510 |
|
@@ -662,6 +667,43 @@ export type WireTransaction = BaseTransaction & {
|
662 | 667 | }
|
663 | 668 | }
|
664 | 669 |
|
| 670 | +export type ReturnedWireTransaction = BaseTransaction & { |
| 671 | + /** |
| 672 | + * Type of the transaction resource. The value is always returnedWireTransaction. |
| 673 | + */ |
| 674 | + type: "returnedWireTransaction" |
| 675 | + |
| 676 | + /** |
| 677 | + * JSON object representing the transaction data. |
| 678 | + */ |
| 679 | + attributes: { |
| 680 | + /** |
| 681 | + * The reason for the return. |
| 682 | + */ |
| 683 | + reason: string |
| 684 | + |
| 685 | + /** |
| 686 | + * Input Message Accountability Data. It's a unique number given to each FedWire payment in case of payment has been sent and fully processed. |
| 687 | + */ |
| 688 | + imad: string |
| 689 | + |
| 690 | + /** |
| 691 | + * Optional. Output Message Accountability Data. It's a unique number given to each FedWire payment in case of payment has been sent and fully processed. |
| 692 | + */ |
| 693 | + omad?: string |
| 694 | + } |
| 695 | + |
| 696 | + /** |
| 697 | + * Describes relationships between the transaction resource and other resources (account and customer). |
| 698 | + */ |
| 699 | + relationships: { |
| 700 | + /** |
| 701 | + * The payment belonging to this transaction. |
| 702 | + */ |
| 703 | + payment: Relationship |
| 704 | + } |
| 705 | +} |
| 706 | + |
665 | 707 | export type ReleaseTransaction = BaseTransaction & {
|
666 | 708 | /**
|
667 | 709 | * Type of the transaction resource. The value is always releaseTransaction.
|
@@ -813,6 +855,33 @@ export type ReturnedCheckDepositTransaction = BaseTransaction & {
|
813 | 855 | }
|
814 | 856 | }
|
815 | 857 |
|
| 858 | +export type ReturnedCheckPaymentTransaction = BaseTransaction & { |
| 859 | + /** |
| 860 | + * Type of the transaction resource. The value is always returnedCheckPaymentTransaction. |
| 861 | + */ |
| 862 | + type: "returnedCheckPaymentTransaction" |
| 863 | + |
| 864 | + /** |
| 865 | + * JSON object representing the transaction data. |
| 866 | + */ |
| 867 | + attributes: { |
| 868 | + /** |
| 869 | + * The reason for the transaction return. This is a replacement to the deprecated `reason` attribute. |
| 870 | + */ |
| 871 | + returnReason: string |
| 872 | + } |
| 873 | + |
| 874 | + /** |
| 875 | + * Describes relationships between the transaction resource and other resources (account, customer, checkDeposit). |
| 876 | + */ |
| 877 | + relationships: { |
| 878 | + /** |
| 879 | + * The [Check Payment](https://developers.unit.co/resources/#transaction-check-payment) the transaction is related to. |
| 880 | + */ |
| 881 | + checkPayment: Relationship |
| 882 | + } |
| 883 | +} |
| 884 | + |
816 | 885 | export type PaymentAdvanceTransaction = BaseTransaction & {
|
817 | 886 | /**
|
818 | 887 | * Type of the transaction resource. The value is always paymentAdvanceTransaction.
|
|
0 commit comments