From fdde0963a2ff7529b6c9af30bce0d735490e947b Mon Sep 17 00:00:00 2001 From: luistarkbank Date: Mon, 28 Aug 2023 19:36:57 -0300 Subject: [PATCH] set Transfer account_type parameter as required --- CHANGELOG.md | 2 ++ README.md | 1 + starkbank/transfer/__transfer.py | 4 ++-- tests/utils/transfer.py | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 025037e..9bbb66a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ Given a version number MAJOR.MINOR.PATCH, increment: ## [Unreleased] +### Changed +- Transfer account_type parameter to required ## [2.20.0] - 2023-05-03 ### Added diff --git a/README.md b/README.md index a68d657..c39a30c 100644 --- a/README.md +++ b/README.md @@ -395,6 +395,7 @@ transfers = starkbank.transfer.create([ bank_code="033", # TED branch_code="0001", account_number="10000-0", + account_type="salary", tax_id="012.345.678-90", name="Tony Stark", tags=["iron", "suit"] diff --git a/starkbank/transfer/__transfer.py b/starkbank/transfer/__transfer.py index 10d5340..b54fa04 100644 --- a/starkbank/transfer/__transfer.py +++ b/starkbank/transfer/__transfer.py @@ -18,8 +18,8 @@ class Transfer(Resource): - bank_code [string]: code of the receiver bank institution in Brazil. If an ISPB (8 digits) is informed, a PIX transfer will be created, else a TED will be issued. ex: "20018183" or "341" - branch_code [string]: receiver bank account branch. Use '-' in case there is a verifier digit. ex: "1357-9" - account_number [string]: receiver bank account number. Use '-' before the verifier digit. ex: "876543-2" + - account_type [string]: Receiver bank account type. This parameter only has effect on Pix Transfers. ex: "checking", "savings", "salary" or "payment" ## Parameters (optional): - - account_type [string, default "checking"]: Receiver bank account type. This parameter only has effect on Pix Transfers. ex: "checking", "savings", "salary" or "payment" - external_id [string, default None]: url safe string that must be unique among all your transfers. Duplicated external_ids will cause failures. By default, this parameter will block any transfer that repeats amount and receiver information on the same date. ex: "my-internal-id-123456" - scheduled [datetime.date, datetime.datetime or string, default now]: date or datetime when the transfer will be processed. May be pushed to next business day if necessary. ex: datetime.datetime(2020, 3, 10, 10, 30, 0, 0) - description [string, default None]: optional description to override default description to be shown in the bank statement. ex: "Payment for service #1234" @@ -35,7 +35,7 @@ class Transfer(Resource): - updated [datetime.datetime]: latest update datetime for the transfer. ex: datetime.datetime(2020, 3, 10, 10, 30, 0, 0) """ - def __init__(self, amount, name, tax_id, bank_code, branch_code, account_number, account_type=None, + def __init__(self, amount, name, tax_id, bank_code, branch_code, account_number, account_type, external_id=None, scheduled=None, description=None, transaction_ids=None, metadata=None, fee=None, tags=None, rules=None, status=None, id=None, created=None, updated=None ): diff --git a/tests/utils/transfer.py b/tests/utils/transfer.py index df63fe0..118dbc2 100644 --- a/tests/utils/transfer.py +++ b/tests/utils/transfer.py @@ -15,7 +15,8 @@ tax_id="01234567890", bank_code=choice(["18236120", "60701190"]), branch_code="0001", - account_number="10000-0" + account_number="10000-0", + account_type="checking" )