Class: Knockapi::Models::Object

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/models/object.rb

Overview

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:, _typename:, collection:, updated_at:, created_at: nil, properties: nil) ⇒ Object

A custom [Object](/concepts/objects) entity which belongs to a collection.

Parameters:

  • id (String)

    Unique identifier for the object.

  • _typename (String)

    The typename of the schema.

  • collection (String)

    The collection this object belongs to.

  • updated_at (Time)

    The timestamp when the resource was last updated.

  • created_at (Time, nil) (defaults to: nil)

    Timestamp when the resource was created.

  • properties (Hash{Symbol=>Object}) (defaults to: nil)

    The custom properties associated with the object.



# File 'lib/knockapi/models/object.rb', line 43


Instance Attribute Details

#_typenameString

The typename of the schema.

Returns:

  • (String)


17
# File 'lib/knockapi/models/object.rb', line 17

required :_typename, String, api_name: :__typename

#collectionString

The collection this object belongs to.

Returns:

  • (String)


23
# File 'lib/knockapi/models/object.rb', line 23

required :collection, String

#created_atTime?

Timestamp when the resource was created.

Returns:

  • (Time, nil)


35
# File 'lib/knockapi/models/object.rb', line 35

optional :created_at, Time, nil?: true

#idString

Unique identifier for the object.

Returns:

  • (String)


11
# File 'lib/knockapi/models/object.rb', line 11

required :id, String

#propertiesHash{Symbol=>Object}?

The custom properties associated with the object.

Returns:



41
# File 'lib/knockapi/models/object.rb', line 41

optional :properties, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]

#updated_atTime

The timestamp when the resource was last updated.

Returns:

  • (Time)


29
# File 'lib/knockapi/models/object.rb', line 29

required :updated_at, Time