Skip to content

Conversation

@nascin
Copy link
Contributor

@nascin nascin commented Aug 22, 2025

Motivation:

When I list a bill with "frequency": "MULTIPLE_PAYMENTS" and "status": "ACTIVE", a validation error occurs.

Code:

billings = client.billing.list()

Error:

pydantic_core._pydantic_core.ValidationError: 2 validation errors for BillingList
data.6.status
  Input should be 'PENDING', 'EXPIRED', 'CANCELLED', 'PAID' or 'REFUNDED' [type=literal_error, input_value='ACTIVE', input_type=str]
    For further information visit https://errors.pydantic.dev/2.11/v/literal_error
data.6.customer.metadata
  Field required [type=missing, input_value={}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.11/v/missing

Solution:

  • Added the literal 'ACTIVE' to the BILLING_STATUS type.
  • Changed the CustomerInline class so the metadata attribute is now optional.

@JoaquimCassano
Copy link
Contributor

lgtm.
Thank's! 🥑

@JoaquimCassano JoaquimCassano merged commit 1193d4d into AbacatePay:main Aug 23, 2025
2 checks passed
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.

2 participants