Skip to content

Conversation

@GuilhermeCaruso
Copy link

What does this PR do?

Fix missing parameters in Boleto entity.

It's worth remembering that this information appears incorrectly in the documentation HERE

What motivated the PR?

When trying to execute the create method from Boleto module, the error below occurred

TypeError: Boleto.__init__() got an unexpected keyword argument 'splits'

How to use implemented changes

boletos = starkbank.boleto.create([
    starkbank.Boleto(
        amount=400000,
        due="2020-05-20",
        name="Iron Bank S.A.",
        tax_id="20.018.183/0001-80",
        fine=2.5,
        interest=1.3,
        overdue_limit=5,
        street_line_1="Av. Faria Lima, 1844",
        street_line_2="CJ 13",
        district="Itaim Bibi",
        city="São Paulo",
        state_code="SP",
        zip_code="01500-000",
        tags=["War supply", "Invoice #1234"],
        discounts=[
            {"percentage": 10, "date": "2020-04-25"}
        ],
        
       '''
       Now Boleto class has the splits parameter
       '''
        
        splits=[
            Split(amount=3000, receiverId="5742447426535424"),
            Split(amount=5000, receiverId="5743243941642240")
        ]
    )
])

@GuilhermeCaruso GuilhermeCaruso changed the title [Fix / Boleto]: Fixed missing split parameter for creating split "Boleto" [Fix / Boleto]: Fix missing split parameter for creating split "Boleto" Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant