Skip to content

Commit 610f002

Browse files
committed
Add new option parameter display_description on DynamicBrcode entity
1 parent 938bd63 commit 610f002

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Given a version number MAJOR.MINOR.PATCH, increment:
1414

1515
## [Unreleased]
1616
### Added
17-
- Rule parameter on DynamicBrcode resource
17+
- rule parameter on DynamicBrcode resource
18+
- display_description parameter on DynamicBrcode resource
1819

1920
## [2.26.1] - 2025-02-18
2021
### Fixed

starkbank/dynamicbrcode/__dynamicbrcode.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class DynamicBrcode(Resource):
1919
## Parameters (optional):
2020
- expiration [integer or datetime.timedelta, default 3600 (1 hour)]: time interval in seconds between due date and expiration date. ex 123456789
2121
- tags [list of strings, default []]: list of strings for tagging, these will be passed to the respective Deposit resource when paid
22+
- display_description [string, default None]: optional description to be shown in the payer bank interface. ex: "Payment for service #1234"
2223
- rules [list of DynamicBrcode.Rules, default []]: list of DynamicBrcode.Rule objects for modifying invoice behavior. ex: [DynamicBrcode.Rule(key="allowedTaxIds", value=[ "012.345.678-90", "45.059.493/0001-73" ])]
2324
## Attributes (return-only):
2425
- id [string]: id returned on creation, this is the BR code. ex: "00020126360014br.gov.bcb.pix0114+552840092118152040000530398654040.095802BR5915Jamie Lannister6009Sao Paulo620705038566304FC6C"
@@ -28,12 +29,13 @@ class DynamicBrcode(Resource):
2829
- created [datetime.datetime]: creation datetime for the DynamicBrcode. ex: datetime.datetime(2020, 3, 10, 10, 30, 0, 0)
2930
"""
3031

31-
def __init__(self, amount, expiration=None, tags=None, rules=None, id=None, uuid=None, picture_url=None,
32-
updated=None, created=None):
32+
def __init__(self, amount, expiration=None, tags=None, display_description=None, rules=None, id=None, uuid=None,
33+
picture_url=None, updated=None, created=None):
3334
Resource.__init__(self, id=id)
3435

3536
self.amount = amount
3637
self.expiration = check_timedelta(expiration)
38+
self.display_description = display_description
3739
self.rules = _parse_rules(rules)
3840
self.tags = tags
3941
self.uuid = uuid

tests/utils/dynamicBrcode.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
tags=[
1111
"python-SDK/test"
1212
],
13+
display_description="Payment for service #1234",
1314
rules=[
1415
Rule(
1516
key="allowedTaxIds",

0 commit comments

Comments
 (0)