Source code for plaid2.model.override_accounts

from typing import Any, Dict, List, Optional, Union
from enum import Enum
from pydantic import BaseModel, Field
from .holdings_override import HoldingsOverride
from .inflow_model import InflowModel
from .investments_transactions_override import InvestmentsTransactionsOverride
from .liability_override import LiabilityOverride
from .meta import Meta
from .numbers import Numbers
from .owner_override import OwnerOverride
from .paystub_override import PaystubOverride
from .transaction_override import TransactionOverride


[docs]class OverrideAccounts(BaseModel): currency: str """ISO-4217 currency code. If provided, the account will be denominated in the given currency. Transactions will also be in this currency by default.""" liability: LiabilityOverride """Used to configure Sandbox test data for the Liabilities product""" subtype: Optional[str] = None """See the [Account type schema](https://plaid.com/docs/api/accounts/#account-type-schema) for a full listing of account types and corresponding subtypes.""" transactions: List[TransactionOverride] """Specify the list of transactions on the account.""" starting_balance: float """If provided, the account will start with this amount as the current balance. """ investment_transactions: Optional[InvestmentsTransactionsOverride] = None """Specify the list of investments transactions on the account.""" identity: OwnerOverride """Data about the owner or owners of an account. Any fields not specified will be filled in with default Sandbox information.""" inflow_model: InflowModel """The `inflow_model` allows you to model a test account that receives regular income or make regular payments on a loan. Any transactions generated by the `inflow_model` will appear in addition to randomly generated test data or transactions specified by `override_accounts`.""" numbers: Numbers """Account and bank identifier number data used to configure the test account. All values are optional.""" income: Optional[List[PaystubOverride]] = None """Specify payroll data on the account.""" meta: Meta """Allows specifying the metadata of the test account""" type: str """`investment:` Investment account. `credit:` Credit card `depository:` Depository account `loan:` Loan account `payroll:` Payroll account `other:` Non-specified account type See the [Account type schema](https://plaid.com/docs/api/accounts#account-type-schema) for a full listing of account types and corresponding subtypes.""" force_available_balance: float """If provided, the account will always have this amount as its available balance, regardless of current balance or changes in transactions over time.""" holdings: Optional[HoldingsOverride] = None """Specify the holdings on the account."""
[docs] def json(self, **kwargs: Any) -> str: """Return a json string representation of the object. Takes same keyword arguments as pydantic.BaseModel.json""" kwargs.setdefault("by_alias", True) return super().json(**kwargs)
[docs] def dict(self, **kwargs: Any) -> Dict[str, Any]: """Return a dict representation of the object. Takes same keyword arguments as pydantic.BaseModel.dict""" kwargs.setdefault("by_alias", True) return super().dict(**kwargs)
[docs] @classmethod def parse_obj(cls, data: Any) -> "OverrideAccounts": """Parse a dict into the object. Takes same keyword arguments as pydantic.BaseModel.parse_obj""" return super().parse_obj(data)
[docs] @classmethod def parse_raw(cls, b: Union[bytes, str], **kwargs: Any) -> "OverrideAccounts": """Parse a json string into the object. Takes same keyword arguments as pydantic.BaseModel.parse_raw""" return super().parse_raw(b, **kwargs)