Class: Knockapi::Models::Schedule

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/models/schedule.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:, inserted_at:, recipient:, repeats:, updated_at:, workflow:, _typename: nil, actor: nil, data: nil, last_occurrence_at: nil, next_occurrence_at: nil, tenant: nil) ⇒ Object

Some parameter documentations has been truncated, see Knockapi::Models::Schedule for more details.

A schedule represents a recurring workflow execution.

Parameters:

  • id (String)

    Unique identifier for the schedule.

  • inserted_at (Time)

    Timestamp when the resource was created.

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

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

  • repeats (Array<Knockapi::Models::ScheduleRepeatRule>)

    The repeat rule for the schedule.

  • updated_at (Time)

    The timestamp when the resource was last updated.

  • workflow (String)

    The workflow the schedule is applied to.

  • _typename (String) (defaults to: nil)

    The typename of the schema.

  • actor (Knockapi::Models::User, Knockapi::Models::Object, nil) (defaults to: nil)

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

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

    An optional map of data to pass into the workflow execution. There is a 10MB lim

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

    The last occurrence of the schedule.

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

    The next occurrence of the schedule.

  • tenant (String, nil) (defaults to: nil)

    The tenant to trigger the workflow for. Triggering with a tenant will use any te



# File 'lib/knockapi/models/schedule.rb', line 84


Instance Attribute Details

#_typenameString?

The typename of the schema.

Returns:

  • (String, nil)


47
# File 'lib/knockapi/models/schedule.rb', line 47

optional :_typename, String, api_name: :__typename

#actorKnockapi::Models::User, ...

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



53
# File 'lib/knockapi/models/schedule.rb', line 53

optional :actor, union: -> { Knockapi::Recipient }, nil?: true

#dataHash{Symbol=>Object}?

An optional map of data to pass into the workflow execution. There is a 10MB limit on the size of the full ‘data` payload. Any individual string value greater than 1024 bytes in length will be [truncated](/developer-tools/api-logs#log-truncation) in your logs.

Returns:



62
# File 'lib/knockapi/models/schedule.rb', line 62

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

#idString

Unique identifier for the schedule.

Returns:

  • (String)


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

required :id, String

#inserted_atTime

Timestamp when the resource was created.

Returns:

  • (Time)


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

required :inserted_at, Time

#last_occurrence_atTime?

The last occurrence of the schedule.

Returns:

  • (Time, nil)


68
# File 'lib/knockapi/models/schedule.rb', line 68

optional :last_occurrence_at, Time, nil?: true

#next_occurrence_atTime?

The next occurrence of the schedule.

Returns:

  • (Time, nil)


74
# File 'lib/knockapi/models/schedule.rb', line 74

optional :next_occurrence_at, Time, nil?: true

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

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



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

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

#repeatsArray<Knockapi::Models::ScheduleRepeatRule>

The repeat rule for the schedule.



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

required :repeats, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::ScheduleRepeatRule] }

#tenantString?

The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level overrides associated with the tenant object, and all messages produced from workflow runs will be tagged with the tenant.

Returns:

  • (String, nil)


82
# File 'lib/knockapi/models/schedule.rb', line 82

optional :tenant, String, nil?: true

#updated_atTime

The timestamp when the resource was last updated.

Returns:

  • (Time)


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

required :updated_at, Time

#workflowString

The workflow the schedule is applied to.

Returns:

  • (String)


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

required :workflow, String