Class: Moonbase::Models::Collection
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Moonbase::Models::Collection
- Defined in:
- lib/moonbase/models/collection.rb
Overview
Defined Under Namespace
Modules: Kind
Instance Attribute Summary collapse
-
#created_at ⇒ Time
Time at which the object was created, as an ISO 8601 timestamp in UTC.
-
#description ⇒ String?
An optional, longer-form description of the collection’s purpose.
-
#fields ⇒ Array<Moonbase::Models::SingleLineTextField, Moonbase::Models::MultiLineTextField, Moonbase::Models::IdentifierField, Moonbase::Models::IntegerField, Moonbase::Models::FloatField, Moonbase::Models::MonetaryField, Moonbase::Models::PercentageField, Moonbase::Models::BooleanField, Moonbase::Models::EmailField, Moonbase::Models::URLField, Moonbase::Models::DomainField, Moonbase::Models::SocialXField, Moonbase::Models::SocialLinkedInField, Moonbase::Models::TelephoneNumberField, Moonbase::Models::GeoField, Moonbase::Models::DateField, Moonbase::Models::DatetimeField, Moonbase::Models::ChoiceField, Moonbase::Models::StageField, Moonbase::Models::RelationField>
A list of ‘Field` objects that define the schema for items in this collection.
-
#id ⇒ String
Unique identifier for the object.
-
#kind ⇒ Symbol, Moonbase::Models::Collection::Kind
‘system` collections are managed by Moonbase (e.g., People, Organizations), `form` collections back a Form, and `custom` collections are user-created.
-
#name ⇒ String
The user-facing name of the collection (e.g., “Organizations”).
-
#ref ⇒ String
A unique, stable, machine-readable identifier for the collection.
-
#type ⇒ Symbol, :collection
String representing the object’s type.
-
#updated_at ⇒ Time
Time at which the object was last updated, as an ISO 8601 timestamp in UTC.
-
#views ⇒ Array<Moonbase::Models::View>?
A list of saved ‘View` objects for presenting the collection’s data.
Instance Method Summary collapse
-
#initialize(id:, created_at:, fields:, kind:, name:, ref:, updated_at:, description: nil, views: nil, type: :collection) ⇒ Object
constructor
Some parameter documentations has been truncated, see Collection for more details.
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:, created_at:, fields:, kind:, name:, ref:, updated_at:, description: nil, views: nil, type: :collection) ⇒ Object
Some parameter documentations has been truncated, see Moonbase::Models::Collection for more details.
A Collection is a container for structured data, similar to a database table or spreadsheet. It defines a schema using a set of ‘Fields` and holds the data as a list of `Items`.
|
|
# File 'lib/moonbase/models/collection.rb', line 71
|
Instance Attribute Details
#created_at ⇒ Time
Time at which the object was created, as an ISO 8601 timestamp in UTC.
17 |
# File 'lib/moonbase/models/collection.rb', line 17 required :created_at, Time |
#description ⇒ String?
An optional, longer-form description of the collection’s purpose.
61 |
# File 'lib/moonbase/models/collection.rb', line 61 optional :description, String |
#fields ⇒ Array<Moonbase::Models::SingleLineTextField, Moonbase::Models::MultiLineTextField, Moonbase::Models::IdentifierField, Moonbase::Models::IntegerField, Moonbase::Models::FloatField, Moonbase::Models::MonetaryField, Moonbase::Models::PercentageField, Moonbase::Models::BooleanField, Moonbase::Models::EmailField, Moonbase::Models::URLField, Moonbase::Models::DomainField, Moonbase::Models::SocialXField, Moonbase::Models::SocialLinkedInField, Moonbase::Models::TelephoneNumberField, Moonbase::Models::GeoField, Moonbase::Models::DateField, Moonbase::Models::DatetimeField, Moonbase::Models::ChoiceField, Moonbase::Models::StageField, Moonbase::Models::RelationField>
A list of ‘Field` objects that define the schema for items in this collection.
23 |
# File 'lib/moonbase/models/collection.rb', line 23 required :fields, -> { Moonbase::Internal::Type::ArrayOf[union: Moonbase::Field] } |
#id ⇒ String
Unique identifier for the object.
11 |
# File 'lib/moonbase/models/collection.rb', line 11 required :id, String |
#kind ⇒ Symbol, Moonbase::Models::Collection::Kind
‘system` collections are managed by Moonbase (e.g., People, Organizations), `form` collections back a Form, and `custom` collections are user-created.
30 |
# File 'lib/moonbase/models/collection.rb', line 30 required :kind, enum: -> { Moonbase::Collection::Kind } |
#name ⇒ String
The user-facing name of the collection (e.g., “Organizations”).
36 |
# File 'lib/moonbase/models/collection.rb', line 36 required :name, String |
#ref ⇒ String
A unique, stable, machine-readable identifier for the collection. This reference is used in API requests and does not change even if the ‘name` is updated.
43 |
# File 'lib/moonbase/models/collection.rb', line 43 required :ref, String |
#type ⇒ Symbol, :collection
String representing the object’s type. Always ‘collection` for this object.
49 |
# File 'lib/moonbase/models/collection.rb', line 49 required :type, const: :collection |
#updated_at ⇒ Time
Time at which the object was last updated, as an ISO 8601 timestamp in UTC.
55 |
# File 'lib/moonbase/models/collection.rb', line 55 required :updated_at, Time |
#views ⇒ Array<Moonbase::Models::View>?
A list of saved ‘View` objects for presenting the collection’s data.
Note: Only present when requested using the ‘include` query parameter.
69 |
# File 'lib/moonbase/models/collection.rb', line 69 optional :views, -> { Moonbase::Internal::Type::ArrayOf[Moonbase::View] } |