Skip to content

Commit 80c1bcc

Browse files
fix(types): make fields required, remove hostname in card authorization approval webhook
1 parent 89aced4 commit 80c1bcc

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 189
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-0b90022fb88c44037dcbff183d3016a85fe7267c5b461f65a54262f734629a2b.yml
3-
openapi_spec_hash: 7b35e7c203748b3424b5931acd6dacf8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-0340e93de3d3691236aa19c800980112e05dc61fa13f8d8d7ca72e335720a31b.yml
3+
openapi_spec_hash: a271f7753dd6e560fcee7dd8b9e17927
44
config_hash: edbdfefeb0d3d927c2f9fe3402793215

src/lithic/types/card_authorization_approval_request_webhook_event.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,23 +102,16 @@ class Avs(BaseModel):
102102
class Card(BaseModel):
103103
"""Card object in ASA"""
104104

105-
token: Optional[str] = None
105+
token: str
106106
"""Globally unique identifier for the card."""
107107

108-
hostname: Optional[str] = None
109-
"""Hostname of card’s locked merchant (will be empty if not applicable)"""
110-
111-
last_four: Optional[str] = None
108+
last_four: str
112109
"""Last four digits of the card number"""
113110

114-
memo: Optional[str] = None
115-
"""Customizable name to identify the card.
116-
117-
We recommend against using this field to store JSON data as it can cause
118-
unexpected behavior.
119-
"""
111+
memo: str
112+
"""Customizable name to identify the card"""
120113

121-
spend_limit: Optional[int] = None
114+
spend_limit: int
122115
"""Amount (in cents) to limit approved authorizations.
123116
124117
Purchase requests above the spend limit will be declined (refunds and credits
@@ -131,16 +124,16 @@ class Card(BaseModel):
131124
authorization).
132125
"""
133126

134-
spend_limit_duration: Optional[Literal["ANNUALLY", "FOREVER", "MONTHLY", "TRANSACTION"]] = None
127+
spend_limit_duration: Literal["ANNUALLY", "FOREVER", "MONTHLY", "TRANSACTION"]
135128
"""
136129
Note that to support recurring monthly payments, which can occur on different
137130
day every month, the time window we consider for MONTHLY velocity starts 6 days
138131
after the current calendar date one month prior.
139132
"""
140133

141-
state: Optional[Literal["CLOSED", "OPEN", "PAUSED", "PENDING_ACTIVATION", "PENDING_FULFILLMENT"]] = None
134+
state: Literal["CLOSED", "OPEN", "PAUSED", "PENDING_ACTIVATION", "PENDING_FULFILLMENT"]
142135

143-
type: Optional[Literal["SINGLE_USE", "MERCHANT_LOCKED", "UNLOCKED", "PHYSICAL", "DIGITAL_WALLET", "VIRTUAL"]] = None
136+
type: Literal["SINGLE_USE", "MERCHANT_LOCKED", "UNLOCKED", "PHYSICAL", "DIGITAL_WALLET", "VIRTUAL"]
144137

145138

146139
class Merchant(merchant.Merchant):

0 commit comments

Comments
 (0)