-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFednowTransfersContract.php
More file actions
123 lines (115 loc) · 4.99 KB
/
FednowTransfersContract.php
File metadata and controls
123 lines (115 loc) · 4.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
declare(strict_types=1);
namespace Increase\ServiceContracts;
use Increase\Core\Exceptions\APIException;
use Increase\FednowTransfers\FednowTransfer;
use Increase\FednowTransfers\FednowTransferCreateParams\CreditorAddress;
use Increase\FednowTransfers\FednowTransferCreateParams\DebtorAddress;
use Increase\FednowTransfers\FednowTransferListParams\CreatedAt;
use Increase\FednowTransfers\FednowTransferListParams\Status;
use Increase\Page;
use Increase\RequestOptions;
/**
* @phpstan-import-type CreditorAddressShape from \Increase\FednowTransfers\FednowTransferCreateParams\CreditorAddress
* @phpstan-import-type DebtorAddressShape from \Increase\FednowTransfers\FednowTransferCreateParams\DebtorAddress
* @phpstan-import-type CreatedAtShape from \Increase\FednowTransfers\FednowTransferListParams\CreatedAt
* @phpstan-import-type StatusShape from \Increase\FednowTransfers\FednowTransferListParams\Status
* @phpstan-import-type RequestOpts from \Increase\RequestOptions
*/
interface FednowTransfersContract
{
/**
* @api
*
* @param int $amount the amount, in minor units, to send to the creditor
* @param string $creditorName the creditor's name
* @param string $debtorName the debtor's name
* @param string $sourceAccountNumberID the Account Number to include in the transfer as the debtor's account number
* @param string $unstructuredRemittanceInformation unstructured remittance information to include in the transfer
* @param string $accountNumber the creditor's account number
* @param CreditorAddress|CreditorAddressShape $creditorAddress the creditor's address
* @param DebtorAddress|DebtorAddressShape $debtorAddress the debtor's address
* @param string $externalAccountID The ID of an External Account to initiate a transfer to. If this parameter is provided, `account_number` and `routing_number` must be absent.
* @param bool $requireApproval whether the transfer requires explicit approval via the dashboard or API
* @param string $routingNumber the creditor's bank account routing number
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function create(
int $amount,
string $creditorName,
string $debtorName,
string $sourceAccountNumberID,
string $unstructuredRemittanceInformation,
?string $accountNumber = null,
CreditorAddress|array|null $creditorAddress = null,
DebtorAddress|array|null $debtorAddress = null,
?string $externalAccountID = null,
?bool $requireApproval = null,
?string $routingNumber = null,
RequestOptions|array|null $requestOptions = null,
): FednowTransfer;
/**
* @api
*
* @param string $fednowTransferID the identifier of the FedNow Transfer
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function retrieve(
string $fednowTransferID,
RequestOptions|array|null $requestOptions = null
): FednowTransfer;
/**
* @api
*
* @param string $accountID filter FedNow Transfers to those that originated from the specified Account
* @param CreatedAt|CreatedAtShape $createdAt
* @param string $cursor return the page of entries after this one
* @param string $externalAccountID filter FedNow Transfers to those made to the specified External Account
* @param string $idempotencyKey Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).
* @param int $limit Limit the size of the list that is returned. The default (and maximum) is 100 objects.
* @param Status|StatusShape $status
* @param RequestOpts|null $requestOptions
*
* @return Page<FednowTransfer>
*
* @throws APIException
*/
public function list(
?string $accountID = null,
CreatedAt|array|null $createdAt = null,
?string $cursor = null,
?string $externalAccountID = null,
?string $idempotencyKey = null,
?int $limit = null,
Status|array|null $status = null,
RequestOptions|array|null $requestOptions = null,
): Page;
/**
* @api
*
* @param string $fednowTransferID the identifier of the FedNow Transfer to approve
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function approve(
string $fednowTransferID,
RequestOptions|array|null $requestOptions = null
): FednowTransfer;
/**
* @api
*
* @param string $fednowTransferID the identifier of the pending FedNow Transfer to cancel
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function cancel(
string $fednowTransferID,
RequestOptions|array|null $requestOptions = null
): FednowTransfer;
}