Skip to content

Commit

Permalink
Remove create & list methods from FinancialAccountFeaturesService (#1274
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ramya-stripe authored Mar 19, 2024
1 parent 38bcf6e commit c0fe6ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 199 deletions.
198 changes: 0 additions & 198 deletions stripe/treasury/_financial_account_features_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,158 +11,6 @@


class FinancialAccountFeaturesService(StripeService):
class CreateParams(TypedDict):
card_issuing: NotRequired[
"FinancialAccountFeaturesService.CreateParamsCardIssuing"
]
"""
Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
"""
deposit_insurance: NotRequired[
"FinancialAccountFeaturesService.CreateParamsDepositInsurance"
]
"""
Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
"""
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""
financial_addresses: NotRequired[
"FinancialAccountFeaturesService.CreateParamsFinancialAddresses"
]
"""
Contains Features that add FinancialAddresses to the FinancialAccount.
"""
inbound_transfers: NotRequired[
"FinancialAccountFeaturesService.CreateParamsInboundTransfers"
]
"""
Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
"""
intra_stripe_flows: NotRequired[
"FinancialAccountFeaturesService.CreateParamsIntraStripeFlows"
]
"""
Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
"""
outbound_payments: NotRequired[
"FinancialAccountFeaturesService.CreateParamsOutboundPayments"
]
"""
Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
"""
outbound_transfers: NotRequired[
"FinancialAccountFeaturesService.CreateParamsOutboundTransfers"
]
"""
Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
"""

class CreateParamsCardIssuing(TypedDict):
requested: bool
"""
Whether the FinancialAccount should have the Feature.
"""

class CreateParamsDepositInsurance(TypedDict):
requested: bool
"""
Whether the FinancialAccount should have the Feature.
"""

class CreateParamsFinancialAddresses(TypedDict):
aba: NotRequired[
"FinancialAccountFeaturesService.CreateParamsFinancialAddressesAba"
]
"""
Adds an ABA FinancialAddress to the FinancialAccount.
"""

class CreateParamsFinancialAddressesAba(TypedDict):
requested: bool
"""
Whether the FinancialAccount should have the Feature.
"""

class CreateParamsInboundTransfers(TypedDict):
ach: NotRequired[
"FinancialAccountFeaturesService.CreateParamsInboundTransfersAch"
]
"""
Enables ACH Debits via the InboundTransfers API.
"""

class CreateParamsInboundTransfersAch(TypedDict):
requested: bool
"""
Whether the FinancialAccount should have the Feature.
"""

class CreateParamsIntraStripeFlows(TypedDict):
requested: bool
"""
Whether the FinancialAccount should have the Feature.
"""

class CreateParamsOutboundPayments(TypedDict):
ach: NotRequired[
"FinancialAccountFeaturesService.CreateParamsOutboundPaymentsAch"
]
"""
Enables ACH transfers via the OutboundPayments API.
"""
us_domestic_wire: NotRequired[
"FinancialAccountFeaturesService.CreateParamsOutboundPaymentsUsDomesticWire"
]
"""
Enables US domestic wire transfers via the OutboundPayments API.
"""

class CreateParamsOutboundPaymentsAch(TypedDict):
requested: bool
"""
Whether the FinancialAccount should have the Feature.
"""

class CreateParamsOutboundPaymentsUsDomesticWire(TypedDict):
requested: bool
"""
Whether the FinancialAccount should have the Feature.
"""

class CreateParamsOutboundTransfers(TypedDict):
ach: NotRequired[
"FinancialAccountFeaturesService.CreateParamsOutboundTransfersAch"
]
"""
Enables ACH transfers via the OutboundTransfers API.
"""
us_domestic_wire: NotRequired[
"FinancialAccountFeaturesService.CreateParamsOutboundTransfersUsDomesticWire"
]
"""
Enables US domestic wire transfers via the OutboundTransfers API.
"""

class CreateParamsOutboundTransfersAch(TypedDict):
requested: bool
"""
Whether the FinancialAccount should have the Feature.
"""

class CreateParamsOutboundTransfersUsDomesticWire(TypedDict):
requested: bool
"""
Whether the FinancialAccount should have the Feature.
"""

class ListParams(TypedDict):
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""

class RetrieveParams(TypedDict):
expand: NotRequired["List[str]"]
"""
Expand Down Expand Up @@ -360,49 +208,3 @@ def retrieve(
options=options,
),
)

def list(
self,
financial_account: str,
params: "FinancialAccountFeaturesService.ListParams" = {},
options: RequestOptions = {},
) -> FinancialAccountFeatures:
"""
Retrieves Features information associated with the FinancialAccount.
"""
return cast(
FinancialAccountFeatures,
self._request(
"get",
"/v1/treasury/financial_accounts/{financial_account}/features".format(
financial_account=sanitize_id(financial_account),
),
api_mode="V1",
base_address="api",
params=params,
options=options,
),
)

def create(
self,
financial_account: str,
params: "FinancialAccountFeaturesService.CreateParams" = {},
options: RequestOptions = {},
) -> FinancialAccountFeatures:
"""
Updates the Features associated with a FinancialAccount.
"""
return cast(
FinancialAccountFeatures,
self._request(
"post",
"/v1/treasury/financial_accounts/{financial_account}/features".format(
financial_account=sanitize_id(financial_account),
),
api_mode="V1",
base_address="api",
params=params,
options=options,
),
)
4 changes: 3 additions & 1 deletion tests/test_generated_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -14906,7 +14906,9 @@ def test_treasury_financial_accounts_features_get_service(
http_client=http_client_mock.get_mock_http_client(),
)

client.treasury.financial_accounts.features.list("fa_xxxxxxxxxxxxx")
client.treasury.financial_accounts.features.retrieve(
"fa_xxxxxxxxxxxxx"
)
http_client_mock.assert_requested(
"get",
path="/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features",
Expand Down

0 comments on commit c0fe6ef

Please sign in to comment.