Skip to content

Commit

Permalink
feat(api): updates (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jul 17, 2024
1 parent 4f1dd78 commit 09c15d3
Show file tree
Hide file tree
Showing 18 changed files with 162 additions and 47 deletions.
10 changes: 10 additions & 0 deletions src/lithic/resources/events/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ def list(
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
]
| NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -338,6 +343,11 @@ def list(
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
]
| NotGiven = NOT_GIVEN,
Expand Down
30 changes: 30 additions & 0 deletions src/lithic/resources/events/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ def create(
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
]
| NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -190,6 +195,11 @@ def update(
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
]
| NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -611,6 +621,11 @@ def send_simulated_example(
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -691,6 +706,11 @@ async def create(
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
]
| NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -806,6 +826,11 @@ async def update(
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
]
| NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1227,6 +1252,11 @@ async def send_simulated_example(
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down
4 changes: 4 additions & 0 deletions src/lithic/resources/financial_accounts/financial_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def create(
nickname: str,
type: Literal["OPERATING"],
account_token: str | NotGiven = NOT_GIVEN,
is_for_benefit_of: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -92,6 +93,7 @@ def create(
"nickname": nickname,
"type": type,
"account_token": account_token,
"is_for_benefit_of": is_for_benefit_of,
},
financial_account_create_params.FinancialAccountCreateParams,
),
Expand Down Expand Up @@ -249,6 +251,7 @@ async def create(
nickname: str,
type: Literal["OPERATING"],
account_token: str | NotGiven = NOT_GIVEN,
is_for_benefit_of: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -275,6 +278,7 @@ async def create(
"nickname": nickname,
"type": type,
"account_token": account_token,
"is_for_benefit_of": is_for_benefit_of,
},
financial_account_create_params.FinancialAccountCreateParams,
),
Expand Down
24 changes: 22 additions & 2 deletions src/lithic/resources/tokenizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def list(
ending_before: str | NotGiven = NOT_GIVEN,
page_size: int | NotGiven = NOT_GIVEN,
starting_after: str | NotGiven = NOT_GIVEN,
tokenization_channel: Literal["DIGITAL_WALLET", "MERCHANT"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -112,6 +113,9 @@ def list(
starting_after: A cursor representing an item's token after which a page of results should
begin. Used to retrieve the next page of results after this item.
tokenization_channel: Filter for tokenizations by tokenization channel. If this is not specified, only
DIGITAL_WALLET tokenizations will be returned.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -137,6 +141,7 @@ def list(
"ending_before": ending_before,
"page_size": page_size,
"starting_after": starting_after,
"tokenization_channel": tokenization_channel,
},
tokenization_list_params.TokenizationListParams,
),
Expand Down Expand Up @@ -323,9 +328,10 @@ def simulate(
cvv: str,
expiration_date: str,
pan: str,
tokenization_source: Literal["APPLE_PAY", "GOOGLE", "SAMSUNG_PAY"],
tokenization_source: Literal["APPLE_PAY", "GOOGLE", "SAMSUNG_PAY", "MERCHANT"],
account_score: int | NotGiven = NOT_GIVEN,
device_score: int | NotGiven = NOT_GIVEN,
entity: str | NotGiven = NOT_GIVEN,
wallet_recommended_decision: Literal["APPROVED", "DECLINED", "REQUIRE_ADDITIONAL_AUTHENTICATION"]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -354,6 +360,9 @@ def simulate(
device_score: The device score (1-5) that represents how the Digital Wallet's view on how
reputable an end user's device is.
entity: Optional field to specify the token requestor name for a merchant token
simulation. Ignored when tokenization_source is not MERCHANT.
wallet_recommended_decision: The decision that the Digital Wallet's recommend
extra_headers: Send extra headers
Expand All @@ -374,6 +383,7 @@ def simulate(
"tokenization_source": tokenization_source,
"account_score": account_score,
"device_score": device_score,
"entity": entity,
"wallet_recommended_decision": wallet_recommended_decision,
},
tokenization_simulate_params.TokenizationSimulateParams,
Expand Down Expand Up @@ -527,6 +537,7 @@ def list(
ending_before: str | NotGiven = NOT_GIVEN,
page_size: int | NotGiven = NOT_GIVEN,
starting_after: str | NotGiven = NOT_GIVEN,
tokenization_channel: Literal["DIGITAL_WALLET", "MERCHANT"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -554,6 +565,9 @@ def list(
starting_after: A cursor representing an item's token after which a page of results should
begin. Used to retrieve the next page of results after this item.
tokenization_channel: Filter for tokenizations by tokenization channel. If this is not specified, only
DIGITAL_WALLET tokenizations will be returned.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -579,6 +593,7 @@ def list(
"ending_before": ending_before,
"page_size": page_size,
"starting_after": starting_after,
"tokenization_channel": tokenization_channel,
},
tokenization_list_params.TokenizationListParams,
),
Expand Down Expand Up @@ -765,9 +780,10 @@ async def simulate(
cvv: str,
expiration_date: str,
pan: str,
tokenization_source: Literal["APPLE_PAY", "GOOGLE", "SAMSUNG_PAY"],
tokenization_source: Literal["APPLE_PAY", "GOOGLE", "SAMSUNG_PAY", "MERCHANT"],
account_score: int | NotGiven = NOT_GIVEN,
device_score: int | NotGiven = NOT_GIVEN,
entity: str | NotGiven = NOT_GIVEN,
wallet_recommended_decision: Literal["APPROVED", "DECLINED", "REQUIRE_ADDITIONAL_AUTHENTICATION"]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -796,6 +812,9 @@ async def simulate(
device_score: The device score (1-5) that represents how the Digital Wallet's view on how
reputable an end user's device is.
entity: Optional field to specify the token requestor name for a merchant token
simulation. Ignored when tokenization_source is not MERCHANT.
wallet_recommended_decision: The decision that the Digital Wallet's recommend
extra_headers: Send extra headers
Expand All @@ -816,6 +835,7 @@ async def simulate(
"tokenization_source": tokenization_source,
"account_score": account_score,
"device_score": device_score,
"entity": entity,
"wallet_recommended_decision": wallet_recommended_decision,
},
tokenization_simulate_params.TokenizationSimulateParams,
Expand Down
5 changes: 5 additions & 0 deletions src/lithic/types/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ class Event(BaseModel):
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
"""Event types:
Expand Down
5 changes: 5 additions & 0 deletions src/lithic/types/event_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ class EventListParams(TypedDict, total=False):
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
]
"""Event types to filter events by."""
Expand Down
5 changes: 5 additions & 0 deletions src/lithic/types/event_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ class EventSubscription(BaseModel):
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
]
] = None
5 changes: 5 additions & 0 deletions src/lithic/types/events/subscription_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ class SubscriptionCreateParams(TypedDict, total=False):
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
]
"""Indicates types of events that will be sent to this subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@ class SubscriptionSendSimulatedExampleParams(TypedDict, total=False):
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
"""Event type to send example message for."""
5 changes: 5 additions & 0 deletions src/lithic/types/events/subscription_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ class SubscriptionUpdateParams(TypedDict, total=False):
"settlement_report.updated",
"three_ds_authentication.created",
"transfer_transaction.created",
"tokenization.approval_request",
"tokenization.result",
"tokenization.two_factor_authentication_code",
"tokenization.two_factor_authentication_code_sent",
"tokenization.updated",
]
]
"""Indicates types of events that will be sent to this subscription.
Expand Down
3 changes: 3 additions & 0 deletions src/lithic/types/financial_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class FinancialAccount(BaseModel):
created: datetime
"""Date and time for when the financial account was first created."""

is_for_benefit_of: bool
"""Whether the financial account holds funds for benefit of another party."""

type: Literal["ISSUING", "OPERATING", "RESERVE"]
"""Type of financial account"""

Expand Down
2 changes: 2 additions & 0 deletions src/lithic/types/financial_account_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ class FinancialAccountCreateParams(TypedDict, total=False):
type: Required[Literal["OPERATING"]]

account_token: str

is_for_benefit_of: bool
Loading

0 comments on commit 09c15d3

Please sign in to comment.