Class: Knockapi::Models::Schedules::BulkCreateParams::Schedule

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/models/schedules/bulk_create_params.rb,
sig/knockapi/models/schedules/bulk_create_params.rbs

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(workflow:, actor: nil, data: nil, ending_at: nil, recipient: nil, repeats: nil, scheduled_at: nil, tenant: nil) ⇒ Object

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

A schedule represents a recurring workflow execution.

Parameters:



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/knockapi/models/schedules/bulk_create_params.rb', line 23

class Schedule < Knockapi::Internal::Type::BaseModel
  # @!attribute workflow
  #   The key of the workflow.
  #
  #   @return [String]
  required :workflow, String

  # @!attribute actor
  #   Specifies a recipient in a request. This can either be a user identifier
  #   (string), an inline user request (object), or an inline object request, which is
  #   determined by the presence of a `collection` property.
  #
  #   @return [String, Knockapi::Models::InlineIdentifyUserRequest, Knockapi::Models::InlineObjectRequest, nil]
  optional :actor, union: -> { Knockapi::RecipientRequest }, nil?: true

  # @!attribute data
  #   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.
  #
  #   @return [Hash{Symbol=>Object}, nil]
  optional :data, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown], nil?: true

  # @!attribute ending_at
  #   The ending date and time for the schedule.
  #
  #   @return [Time, nil]
  optional :ending_at, Time, nil?: true

  # @!attribute recipient
  #   Specifies a recipient in a request. This can either be a user identifier
  #   (string), an inline user request (object), or an inline object request, which is
  #   determined by the presence of a `collection` property.
  #
  #   @return [String, Knockapi::Models::InlineIdentifyUserRequest, Knockapi::Models::InlineObjectRequest, nil]
  optional :recipient, union: -> { Knockapi::RecipientRequest }

  # @!attribute repeats
  #   The repeat rule for the schedule.
  #
  #   @return [Array<Knockapi::Models::ScheduleRepeatRule>, nil]
  optional :repeats, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::ScheduleRepeatRule] }

  # @!attribute scheduled_at
  #   The starting date and time for the schedule.
  #
  #   @return [Time, nil]
  optional :scheduled_at, Time, nil?: true

  # @!attribute tenant
  #   An request to set a tenant inline.
  #
  #   @return [String, Knockapi::Models::TenantRequest, nil]
  optional :tenant, union: -> { Knockapi::InlineTenantRequest }, nil?: true

  # @!method initialize(workflow:, actor: nil, data: nil, ending_at: nil, recipient: nil, repeats: nil, scheduled_at: nil, tenant: nil)
  #   Some parameter documentations has been truncated, see
  #   {Knockapi::Models::Schedules::BulkCreateParams::Schedule} for more details.
  #
  #   A schedule represents a recurring workflow execution.
  #
  #   @param workflow [String] The key of the workflow.
  #
  #   @param actor [String, Knockapi::Models::InlineIdentifyUserRequest, Knockapi::Models::InlineObjectRequest, nil] Specifies a recipient in a request. This can either be a user identifier (string
  #
  #   @param data [Hash{Symbol=>Object}, nil] An optional map of data to pass into the workflow execution. There is a 10MB lim
  #
  #   @param ending_at [Time, nil] The ending date and time for the schedule.
  #
  #   @param recipient [String, Knockapi::Models::InlineIdentifyUserRequest, Knockapi::Models::InlineObjectRequest] Specifies a recipient in a request. This can either be a user identifier (string
  #
  #   @param repeats [Array<Knockapi::Models::ScheduleRepeatRule>] The repeat rule for the schedule.
  #
  #   @param scheduled_at [Time, nil] The starting date and time for the schedule.
  #
  #   @param tenant [String, Knockapi::Models::TenantRequest, nil] An request to set a tenant inline.
end

Instance Attribute Details

#actorString, ...

Specifies a recipient in a request. This can either be a user identifier (string), an inline user request (object), or an inline object request, which is determined by the presence of a collection property.

Parameters:

  • value (Knockapi::Models::recipient_request, nil)

Returns:



36
# File 'lib/knockapi/models/schedules/bulk_create_params.rb', line 36

optional :actor, union: -> { Knockapi::RecipientRequest }, 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 in your logs.

Parameters:

  • value (::Hash[Symbol, top], nil)

Returns:



45
# File 'lib/knockapi/models/schedules/bulk_create_params.rb', line 45

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

#ending_atTime?

The ending date and time for the schedule.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


51
# File 'lib/knockapi/models/schedules/bulk_create_params.rb', line 51

optional :ending_at, Time, nil?: true

#recipientString, ...

Specifies a recipient in a request. This can either be a user identifier (string), an inline user request (object), or an inline object request, which is determined by the presence of a collection property.



59
# File 'lib/knockapi/models/schedules/bulk_create_params.rb', line 59

optional :recipient, union: -> { Knockapi::RecipientRequest }

#repeatsArray<Knockapi::Models::ScheduleRepeatRule>?

The repeat rule for the schedule.

Returns:



65
# File 'lib/knockapi/models/schedules/bulk_create_params.rb', line 65

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

#scheduled_atTime?

The starting date and time for the schedule.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


71
# File 'lib/knockapi/models/schedules/bulk_create_params.rb', line 71

optional :scheduled_at, Time, nil?: true

#tenantString, ...

An request to set a tenant inline.

Parameters:

  • value (Knockapi::Models::inline_tenant_request, nil)

Returns:



77
# File 'lib/knockapi/models/schedules/bulk_create_params.rb', line 77

optional :tenant, union: -> { Knockapi::InlineTenantRequest }, nil?: true

#workflowString

The key of the workflow.

Parameters:

  • value (String)

Returns:

  • (String)


28
# File 'lib/knockapi/models/schedules/bulk_create_params.rb', line 28

required :workflow, String

Instance Method Details

#to_hash{

Returns:

  • ({)


72
# File 'sig/knockapi/models/schedules/bulk_create_params.rbs', line 72

def to_hash: -> {