Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,21 @@ jobs:

- name: Run lints
run: ./scripts/lint
test:
timeout-minutes: 10
name: test
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: '8.3'

- name: Run bootstrap
run: ./scripts/bootstrap

- name: Run tests
run: ./scripts/test
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 238
openapi_spec_hash: ed21325b0e3f886a49c45d2decc4f5d0
openapi_spec_hash: 27aa7d8f7762271b625489f107ff4e8a
config_hash: 2ae0d8aaecf01b38cbf9f9e112822c23
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions src/ACHTransfers/ACHTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ final class ACHTransfer implements BaseModel
public string $accountID;

/**
* The destination account number.
* The receiver's account number.
*/
#[Required('account_number')]
public string $accountNumber;
Expand Down Expand Up @@ -184,7 +184,7 @@ final class ACHTransfer implements BaseModel
public string $currency;

/**
* The type of entity that owns the account to which the ACH Transfer is being sent.
* The type of entity that owns the receiver's account.
*
* @var value-of<DestinationAccountHolder> $destinationAccountHolder
*/
Expand All @@ -201,7 +201,7 @@ enum: DestinationAccountHolder::class
public ?string $externalAccountID;

/**
* The type of the account to which the transfer will be sent.
* The type of the receiver's bank account.
*
* @var value-of<Funding> $funding
*/
Expand All @@ -221,7 +221,7 @@ enum: DestinationAccountHolder::class
public ?InboundFundsHold $inboundFundsHold;

/**
* Your identifier for the transfer recipient.
* Your internal identifier for the transfer recipient. This value is informational and not verified by the recipient's bank.
*/
#[Required('individual_id')]
public ?string $individualID;
Expand Down Expand Up @@ -267,7 +267,7 @@ enum: DestinationAccountHolder::class
public ?Return_ $return;

/**
* The American Bankers' Association (ABA) Routing Transit Number (RTN).
* The American Bankers' Association (ABA) Routing Transit Number (RTN) of the receiver's bank.
*/
#[Required('routing_number')]
public string $routingNumber;
Expand Down Expand Up @@ -539,7 +539,7 @@ public function withAccountID(string $accountID): self
}

/**
* The destination account number.
* The receiver's account number.
*/
public function withAccountNumber(string $accountNumber): self
{
Expand Down Expand Up @@ -710,7 +710,7 @@ public function withCurrency(Currency|string $currency): self
}

/**
* The type of entity that owns the account to which the ACH Transfer is being sent.
* The type of entity that owns the receiver's account.
*
* @param DestinationAccountHolder|value-of<DestinationAccountHolder> $destinationAccountHolder
*/
Expand All @@ -735,7 +735,7 @@ public function withExternalAccountID(?string $externalAccountID): self
}

/**
* The type of the account to which the transfer will be sent.
* The type of the receiver's bank account.
*
* @param Funding|value-of<Funding> $funding
*/
Expand Down Expand Up @@ -773,7 +773,7 @@ public function withInboundFundsHold(
}

/**
* Your identifier for the transfer recipient.
* Your internal identifier for the transfer recipient. This value is informational and not verified by the recipient's bank.
*/
public function withIndividualID(?string $individualID): self
{
Expand Down Expand Up @@ -861,7 +861,7 @@ public function withReturn(Return_|array|null $return): self
}

/**
* The American Bankers' Association (ABA) Routing Transit Number (RTN).
* The American Bankers' Association (ABA) Routing Transit Number (RTN) of the receiver's bank.
*/
public function withRoutingNumber(string $routingNumber): self
{
Expand Down
2 changes: 1 addition & 1 deletion src/ACHTransfers/ACHTransfer/DestinationAccountHolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Increase\ACHTransfers\ACHTransfer;

/**
* The type of entity that owns the account to which the ACH Transfer is being sent.
* The type of entity that owns the receiver's account.
*/
enum DestinationAccountHolder: string
{
Expand Down
2 changes: 1 addition & 1 deletion src/ACHTransfers/ACHTransfer/Funding.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Increase\ACHTransfers\ACHTransfer;

/**
* The type of the account to which the transfer will be sent.
* The type of the receiver's bank account.
*/
enum Funding: string
{
Expand Down
4 changes: 2 additions & 2 deletions src/ACHTransfers/ACHTransfer/Return_.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ final class Return_ implements BaseModel
public string $transactionID;

/**
* The identifier of the ACH Transfer associated with this return.
* The identifier of the ACH Transfer associated with this return. This matches the original Transaction's `source.ach_transfer_intention.transfer_id`.
*/
#[Required('transfer_id')]
public string $transferID;
Expand Down Expand Up @@ -182,7 +182,7 @@ public function withTransactionID(string $transactionID): self
}

/**
* The identifier of the ACH Transfer associated with this return.
* The identifier of the ACH Transfer associated with this return. This matches the original Transaction's `source.ach_transfer_intention.transfer_id`.
*/
public function withTransferID(string $transferID): self
{
Expand Down
44 changes: 22 additions & 22 deletions src/ACHTransfers/ACHTransferCreateParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,43 +71,43 @@ final class ACHTransferCreateParams implements BaseModel
public string $statementDescriptor;

/**
* The account number for the destination account.
* The receiver's account number. For credit transfers (positive `amount`) this is the account that funds will be sent to. For debit transfers (negative `amount`) this is the account that funds will be pulled from.
*/
#[Optional('account_number')]
public ?string $accountNumber;

/**
* Additional information that will be sent to the recipient. This is included in the transfer data sent to the receiving bank.
* Additional information passed through to the receiving bank with the transfer. Most ACH transfers do not need this. Only set this if your recipient has asked for addendum data, typically unstructured remittance information. Corporate Trade Exchange (CTX) flows can carry structured X12 remittance advice instead.
*/
#[Optional]
public ?Addenda $addenda;

/**
* The description of the date of the transfer, usually in the format `YYMMDD`. This is included in the transfer data sent to the receiving bank.
* A description of the transfer date (typically `YYMMDD`), sent in the company batch header. This value is informational and does not affect funds movement, settlement timing, or returns. Only set this if your recipient has asked for it.
*/
#[Optional('company_descriptive_date')]
public ?string $companyDescriptiveDate;

/**
* The data you choose to associate with the transfer. This is included in the transfer data sent to the receiving bank.
* Custom data sent in the company batch header. This value is informational and does not affect funds movement, settlement timing, or returns. Most ACH transfers do not need this. Only set this if your recipient has asked for it.
*/
#[Optional('company_discretionary_data')]
public ?string $companyDiscretionaryData;

/**
* A description of the transfer, included in the transfer data sent to the receiving bank. Standardized formatting may be required, for example `PAYROLL` for payroll-related Prearranged Payments and Deposits (PPD) credit transfers.
* A short description sent in the company batch header. Most receivers do not surface this. Only set this if your recipient has asked for a specific value or if Nacha mandates one for your Standard Entry Class (SEC) code and use case. For example, Prearranged Payment and Deposit (PPD) payroll credits must use `PAYROLL`, and reversals must use `REVERSAL`.
*/
#[Optional('company_entry_description')]
public ?string $companyEntryDescription;

/**
* The name by which the recipient knows you. This is included in the transfer data sent to the receiving bank.
* The name by which the recipient knows you, sent in the company batch header. We recommend setting this on every transfer; if you do not, we fall back to the ACH company name configured on your account.
*/
#[Optional('company_name')]
public ?string $companyName;

/**
* The type of entity that owns the account to which the ACH Transfer is being sent.
* The type of entity that owns the receiver's account.
*
* @var value-of<DestinationAccountHolder>|null $destinationAccountHolder
*/
Expand All @@ -124,15 +124,15 @@ enum: DestinationAccountHolder::class
public ?string $externalAccountID;

/**
* The type of the account to which the transfer will be sent.
* The type of the receiver's bank account.
*
* @var value-of<Funding>|null $funding
*/
#[Optional(enum: Funding::class)]
public ?string $funding;

/**
* Your identifier for the transfer recipient.
* Your internal identifier for the transfer recipient. This value is informational and not verified by the recipient's bank. Most callers can leave this unset.
*/
#[Optional('individual_id')]
public ?string $individualID;
Expand All @@ -156,13 +156,13 @@ enum: DestinationAccountHolder::class
public ?bool $requireApproval;

/**
* The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account.
* The American Bankers' Association (ABA) Routing Transit Number (RTN) of the receiver's bank.
*/
#[Optional('routing_number')]
public ?string $routingNumber;

/**
* The [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) to use for the transfer.
* The [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) to use for the transfer. If not provided, the default is `corporate_credit_or_debit`.
*
* @var value-of<StandardEntryClassCode>|null $standardEntryClassCode
*/
Expand Down Expand Up @@ -294,7 +294,7 @@ public function withStatementDescriptor(string $statementDescriptor): self
}

/**
* The account number for the destination account.
* The receiver's account number. For credit transfers (positive `amount`) this is the account that funds will be sent to. For debit transfers (negative `amount`) this is the account that funds will be pulled from.
*/
public function withAccountNumber(string $accountNumber): self
{
Expand All @@ -305,7 +305,7 @@ public function withAccountNumber(string $accountNumber): self
}

/**
* Additional information that will be sent to the recipient. This is included in the transfer data sent to the receiving bank.
* Additional information passed through to the receiving bank with the transfer. Most ACH transfers do not need this. Only set this if your recipient has asked for addendum data, typically unstructured remittance information. Corporate Trade Exchange (CTX) flows can carry structured X12 remittance advice instead.
*
* @param Addenda|AddendaShape $addenda
*/
Expand All @@ -318,7 +318,7 @@ public function withAddenda(Addenda|array $addenda): self
}

/**
* The description of the date of the transfer, usually in the format `YYMMDD`. This is included in the transfer data sent to the receiving bank.
* A description of the transfer date (typically `YYMMDD`), sent in the company batch header. This value is informational and does not affect funds movement, settlement timing, or returns. Only set this if your recipient has asked for it.
*/
public function withCompanyDescriptiveDate(
string $companyDescriptiveDate
Expand All @@ -330,7 +330,7 @@ public function withCompanyDescriptiveDate(
}

/**
* The data you choose to associate with the transfer. This is included in the transfer data sent to the receiving bank.
* Custom data sent in the company batch header. This value is informational and does not affect funds movement, settlement timing, or returns. Most ACH transfers do not need this. Only set this if your recipient has asked for it.
*/
public function withCompanyDiscretionaryData(
string $companyDiscretionaryData
Expand All @@ -342,7 +342,7 @@ public function withCompanyDiscretionaryData(
}

/**
* A description of the transfer, included in the transfer data sent to the receiving bank. Standardized formatting may be required, for example `PAYROLL` for payroll-related Prearranged Payments and Deposits (PPD) credit transfers.
* A short description sent in the company batch header. Most receivers do not surface this. Only set this if your recipient has asked for a specific value or if Nacha mandates one for your Standard Entry Class (SEC) code and use case. For example, Prearranged Payment and Deposit (PPD) payroll credits must use `PAYROLL`, and reversals must use `REVERSAL`.
*/
public function withCompanyEntryDescription(
string $companyEntryDescription
Expand All @@ -354,7 +354,7 @@ public function withCompanyEntryDescription(
}

/**
* The name by which the recipient knows you. This is included in the transfer data sent to the receiving bank.
* The name by which the recipient knows you, sent in the company batch header. We recommend setting this on every transfer; if you do not, we fall back to the ACH company name configured on your account.
*/
public function withCompanyName(string $companyName): self
{
Expand All @@ -365,7 +365,7 @@ public function withCompanyName(string $companyName): self
}

/**
* The type of entity that owns the account to which the ACH Transfer is being sent.
* The type of entity that owns the receiver's account.
*
* @param DestinationAccountHolder|value-of<DestinationAccountHolder> $destinationAccountHolder
*/
Expand All @@ -390,7 +390,7 @@ public function withExternalAccountID(string $externalAccountID): self
}

/**
* The type of the account to which the transfer will be sent.
* The type of the receiver's bank account.
*
* @param Funding|value-of<Funding> $funding
*/
Expand All @@ -403,7 +403,7 @@ public function withFunding(Funding|string $funding): self
}

/**
* Your identifier for the transfer recipient.
* Your internal identifier for the transfer recipient. This value is informational and not verified by the recipient's bank. Most callers can leave this unset.
*/
public function withIndividualID(string $individualID): self
{
Expand Down Expand Up @@ -450,7 +450,7 @@ public function withRequireApproval(bool $requireApproval): self
}

/**
* The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account.
* The American Bankers' Association (ABA) Routing Transit Number (RTN) of the receiver's bank.
*/
public function withRoutingNumber(string $routingNumber): self
{
Expand All @@ -461,7 +461,7 @@ public function withRoutingNumber(string $routingNumber): self
}

/**
* The [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) to use for the transfer.
* The [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) to use for the transfer. If not provided, the default is `corporate_credit_or_debit`.
*
* @param StandardEntryClassCode|value-of<StandardEntryClassCode> $standardEntryClassCode
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ACHTransfers/ACHTransferCreateParams/Addenda.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Increase\Core\Contracts\BaseModel;

/**
* Additional information that will be sent to the recipient. This is included in the transfer data sent to the receiving bank.
* Additional information passed through to the receiving bank with the transfer. Most ACH transfers do not need this. Only set this if your recipient has asked for addendum data, typically unstructured remittance information. Corporate Trade Exchange (CTX) flows can carry structured X12 remittance advice instead.
*
* @phpstan-import-type FreeformShape from \Increase\ACHTransfers\ACHTransferCreateParams\Addenda\Freeform
* @phpstan-import-type PaymentOrderRemittanceAdviceShape from \Increase\ACHTransfers\ACHTransferCreateParams\Addenda\PaymentOrderRemittanceAdvice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Increase\ACHTransfers\ACHTransferCreateParams;

/**
* The type of entity that owns the account to which the ACH Transfer is being sent.
* The type of entity that owns the receiver's account.
*/
enum DestinationAccountHolder: string
{
Expand Down
2 changes: 1 addition & 1 deletion src/ACHTransfers/ACHTransferCreateParams/Funding.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Increase\ACHTransfers\ACHTransferCreateParams;

/**
* The type of the account to which the transfer will be sent.
* The type of the receiver's bank account.
*/
enum Funding: string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Increase\ACHTransfers\ACHTransferCreateParams;

/**
* The [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) to use for the transfer.
* The [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) to use for the transfer. If not provided, the default is `corporate_credit_or_debit`.
*/
enum StandardEntryClassCode: string
{
Expand Down
4 changes: 2 additions & 2 deletions src/Accounts/AccountCreateParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ final class AccountCreateParams implements BaseModel
public ?Loan $loan;

/**
* The identifier for the Program that this Account falls under. Required if you operate more than one Program.
* The identifier for the Program that this Account falls under. Required if your Group operates more than one Program. List your [Programs](#programs) to find their identifiers.
*/
#[Optional('program_id')]
public ?string $programID;
Expand Down Expand Up @@ -181,7 +181,7 @@ public function withLoan(Loan|array $loan): self
}

/**
* The identifier for the Program that this Account falls under. Required if you operate more than one Program.
* The identifier for the Program that this Account falls under. Required if your Group operates more than one Program. List your [Programs](#programs) to find their identifiers.
*/
public function withProgramID(string $programID): self
{
Expand Down
Loading