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: AbstractSAMMetadataBase

Smarter API Account Manifest - Metadata class.

accountNumber: str | None
class_identifier: ClassVar[str] = 'Account.metadata'
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.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

Return type:

None

Smarter API Manifest - Plugin.spec.

class smarter.apps.account.manifest.models.account.spec.SAMAccountSpec(*, config)[source]

Bases: AbstractSAMSpecBase

Smarter API Account Manifest Account.spec.

class_identifier: ClassVar[str] = '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.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

Return type:

None

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: AbstractSAMSpecBase

Smarter API Account Manifest Account.spec.config.

address1: str | None
address2: str | None
city: str | None
class_identifier: ClassVar[str] = 'Account.spec.configuration'
companyName: str
country: str
currency: str
language: str
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.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

Return type:

None

parent: str | None
phoneNumber: str | None
postalCode: str | None
shareScope: str | None
state: str | None
timezone: str
classmethod validate_account_reference(v)[source]

Check that parent and shareScope are 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. US or USA.

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. en or en-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.ZoneInfo does 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: AbstractSAMStatusBase

Smarter API Account Manifest - Status class.

adminAccount: str
class_identifier: ClassVar[str] = 'Account.status'
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.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

Return type:

None

Smarter API Account Manifest

class smarter.apps.account.manifest.models.account.model.SAMAccount(*, apiVersion, kind, metadata, spec, status=None)[source]

Bases: AbstractSAMBase

Smarter API Manifest - Account

class_identifier: ClassVar[str] = '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.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

Return type:

None

spec: SAMAccountSpec
status: SAMAccountStatus | None