Skip to content

Commit

Permalink
source-stripe-native: make created optional for Accounts
Browse files Browse the repository at this point in the history
Sometimes, `account.updated` events do not have `created` in the document, causing failures when we validate the document against its model. Making `created` optional will avoid these failures and reflect the API's actual response.
  • Loading branch information
Alex-Bair committed Sep 24, 2024
1 parent 911128f commit 7b59ef4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source-stripe-native/source_stripe_native/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ class Accounts(BaseStripeObjectWithEvents):
"account.updated": "u",
}

# Accounts docs returned in account.updated events may not have a created field.
created: int | None = None

# Could not verify Persons events are generated in test mode, but suspect
# they are generated in Stripe's live mode.
Expand Down

0 comments on commit 7b59ef4

Please sign in to comment.