Account
Smarter API Account Manifest Constants.
Smarter API Manifest - Account.metadata.
- class smarter.apps.account.manifest.models.account.metadata.SAMAccountMetadata(*, name, description, version, tags=<factory>, annotations=<factory>, accountNumber=None)[source]
Bases:
AbstractSAMMetadataBaseSmarter API Account Manifest - Metadata class.
- model_config = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
Smarter API Manifest - Plugin.spec.
- class smarter.apps.account.manifest.models.account.spec.SAMAccountSpec(*, config)[source]
Bases:
AbstractSAMSpecBaseSmarter API Account Manifest Account.spec.
- config: SAMAccountSpecConfig
- model_config = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- class smarter.apps.account.manifest.models.account.spec.SAMAccountSpecConfig(*, companyName, phoneNumber=None, address1=None, address2=None, city=None, state=None, postalCode=None, country='US', language='en-US', timezone='America/New_York', currency='USD', parent=None, shareScope=None)[source]
Bases:
AbstractSAMSpecBaseSmarter API Account Manifest Account.spec.config.
- model_config = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- classmethod validate_account_reference(v)[source]
Check that
parentandshareScopeare account numbers, e.g.1234-5678-9012.- Parameters:
v – The account number, or None.
- Returns:
The account number, or None.
- Raises:
SmarterValueError – when it is not an account number.
- classmethod validate_country(v)[source]
Check that the country is an ISO 3166 two- or three-letter code, e.g.
USorUSA.- Parameters:
v – The country code.
- Returns:
The country code.
- Raises:
SmarterValueError – when it is not an ISO 3166 code.
- classmethod validate_currency(v)[source]
Check that the currency is an ISO 4217 code, e.g.
USD.- Parameters:
v – The currency code.
- Returns:
The currency code.
- Raises:
SmarterValueError – when it is not an ISO 4217 code.
- classmethod validate_language(v)[source]
Check that the language is a BCP 47 tag, e.g.
enoren-US.The language must be an ISO 639 code, and the region, if any, an ISO 3166 two-letter code.
- Parameters:
v – The language tag.
- Returns:
The language tag.
- Raises:
SmarterValueError – when the language or the region is not valid.
- classmethod validate_timezone(v)[source]
Check that the timezone is an IANA timezone, e.g.
America/New_York.- Parameters:
v – The timezone.
- Returns:
The timezone.
- Raises:
SmarterValueError – when
zoneinfo.ZoneInfodoes not know it.
Smarter API Manifest - Account.status
- class smarter.apps.account.manifest.models.account.status.SAMAccountStatus(*, recordLocator, created, modified, dependencies=None, adminAccount)[source]
Bases:
AbstractSAMStatusBaseSmarter API Account Manifest - Status class.
- model_config = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
Smarter API Account Manifest
- class smarter.apps.account.manifest.models.account.model.SAMAccount(*, apiVersion, kind, metadata, spec, status=None)[source]
Bases:
AbstractSAMBaseSmarter API Manifest - Account
- metadata: SAMAccountMetadata
- model_config = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- spec: SAMAccountSpec
- status: SAMAccountStatus | None