Skip to content

Commit

Permalink
Merge pull request #57 from starkbank/feature/boleto-transaction-ids
Browse files Browse the repository at this point in the history
Add transaction_ids property to Boleto resource
  • Loading branch information
cdottori-stark authored Mar 22, 2021
2 parents bbe15c6 + afb8532 commit 9c2af91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Given a version number MAJOR.MINOR.PATCH, increment:
## [Unreleased]
### Added
- Event.Attempt sub-resource to allow retrieval of information on failed webhook event delivery attempts
- Boleto.transaction_ids property to allow transaction tracking

## [2.8.0] - 2021-03-09
### Added
Expand Down
4 changes: 3 additions & 1 deletion starkbank/boleto/__boleto.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ class Boleto(Resource):
- line [string, default None]: generated Boleto line for payment. ex: "34191.09008 63571.277308 71444.640008 5 81960000000062"
- bar_code [string, default None]: generated Boleto bar-code for payment. ex: "34195819600000000621090063571277307144464000"
- status [string, default None]: current Boleto status. ex: "registered" or "paid"
- transaction_ids [list of strings]: ledger transaction ids linked to this boleto. ex: ["19827356981273"]
- created [datetime.datetime, default None]: creation datetime for the Boleto. ex: datetime.datetime(2020, 3, 10, 10, 30, 0, 0)
- our_number [string, default None]: Reference number registered at the settlement bank. ex:"10131474"
"""

def __init__(self, amount, name, tax_id, street_line_1, street_line_2, district, city, state_code, zip_code,
due=None, fine=None, interest=None, overdue_limit=None, tags=None, descriptions=None, discounts=None,
receiver_name=None, receiver_tax_id=None, id=None, fee=None, line=None, bar_code=None, status=None,
created=None, our_number=None):
transaction_ids=None, created=None, our_number=None):
Resource.__init__(self, id=id)

self.amount = amount
Expand All @@ -66,6 +67,7 @@ def __init__(self, amount, name, tax_id, street_line_1, street_line_2, district,
self.line = line
self.bar_code = bar_code
self.status = status
self.transaction_ids = transaction_ids
self.created = check_datetime(created)
self.our_number = our_number

Expand Down

0 comments on commit 9c2af91

Please sign in to comment.