Class: Knockapi::Models::Recipients::Subscription

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

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(_typename:, inserted_at:, object:, recipient:, updated_at:, properties: nil) ⇒ Object

A subscription object.

Parameters:

  • _typename (String)

    The typename of the schema.

  • inserted_at (Time)

    Timestamp when the resource was created.

  • object (Knockapi::Models::Object)

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

  • recipient (Knockapi::Models::User, Knockapi::Models::Object)

    A recipient of a notification, which is either a user or an object.

  • updated_at (Time)

    The timestamp when the resource was last updated.

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

    The custom properties associated with the subscription relationship.



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


Instance Attribute Details

#_typenameString

The typename of the schema.

Returns:

  • (String)


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

required :_typename, String, api_name: :__typename

#inserted_atTime

Timestamp when the resource was created.

Returns:

  • (Time)


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

required :inserted_at, Time

#objectKnockapi::Models::Object

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



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

required :object, -> { Knockapi::Object }

#propertiesHash{Symbol=>Object}?

The custom properties associated with the subscription relationship.

Returns:



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

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

#recipientKnockapi::Models::User, Knockapi::Models::Object

A recipient of a notification, which is either a user or an object.



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

required :recipient, union: -> { Knockapi::Recipient }

#updated_atTime

The timestamp when the resource was last updated.

Returns:

  • (Time)


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

required :updated_at, Time