Class: Courier::Models::Tenant

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/tenant.rb,
sig/courier/models/tenant.rbs

Overview

See Also:

  • Courier::Resources::Tenants#retrieve

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, name:, brand_id: nil, default_preferences: nil, parent_tenant_id: nil, properties: nil, user_profile: nil) ⇒ Object

Some parameter documentations has been truncated, see Courier::Models::Tenant for more details.



# File 'lib/courier/models/tenant.rb', line 50


Instance Attribute Details

#brand_id ⇒ String?

Brand to be used for the account when one is not specified by the send call.



23
# File 'lib/courier/models/tenant.rb', line 23

optional :brand_id, String, nil?: true

#default_preferences ⇒ Courier::Models::DefaultPreferences?

Defines the preferences used for the account when the user hasn't specified their own.



30
# File 'lib/courier/models/tenant.rb', line 30

optional :default_preferences, -> { Courier::DefaultPreferences }, nil?: true

#id ⇒ String

Id of the tenant.



11
# File 'lib/courier/models/tenant.rb', line 11

required :id, String

#name ⇒ String

Name of the tenant.



17
# File 'lib/courier/models/tenant.rb', line 17

required :name, String

#parent_tenant_id ⇒ String?

Tenant's parent id (if any).



36
# File 'lib/courier/models/tenant.rb', line 36

optional :parent_tenant_id, String, nil?: true

#properties ⇒ Hash{Symbol=>Object}?

Arbitrary properties accessible to a template.



42
# File 'lib/courier/models/tenant.rb', line 42

optional :properties, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true

#user_profile ⇒ Hash{Symbol=>Object}?

A user profile object merged with user profile on send.



48
# File 'lib/courier/models/tenant.rb', line 48

optional :user_profile, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true

Instance Method Details

#to_hash ⇒ {



39
# File 'sig/courier/models/tenant.rbs', line 39

def to_hash: -> {