Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source-stripe-native: make created optional for Accounts #1978

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 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,12 @@ class Accounts(BaseStripeObjectWithEvents):
"account.updated": "u",
}

# Accounts docs returned in account.updated events may not have a created field.
created: int = Field(
default=None,
# Don't schematize the default value.
json_schema_extra=lambda x: x.pop('default') # type: ignore
)

# Could not verify Persons events are generated in test mode, but suspect
# they are generated in Stripe's live mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
},
"required": [
"id",
"object",
"created"
"object"
],
"title": "Accounts",
"type": "object",
Expand Down
Loading