Class: Courier::Models::NotificationTemplateCreateRequest

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/notification_template_create_request.rb,
sig/courier/models/notification_template_create_request.rbs

Direct Known Subclasses

NotificationCreateParams

Defined Under Namespace

Modules: State

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(notification:, state: nil) ⇒ NotificationTemplateCreateRequest

Some parameter documentations has been truncated, see Courier::Models::NotificationTemplateCreateRequest for more details.

Request body for creating a notification template.

Parameters:



# File 'lib/courier/models/notification_template_create_request.rb', line 20

Instance Attribute Details

#notification ⇒ Courier::Models::NotificationTemplateWritePayload

Template fields accepted in POST and PUT request bodies, nested under a notification key.



11
# File 'lib/courier/models/notification_template_create_request.rb', line 11

required :notification, -> { Courier::NotificationTemplateWritePayload }

#state ⇒ Symbol, ...

Template state after creation. Case-insensitive input, normalized to uppercase in the response. Defaults to "DRAFT".

Parameters:

  • (Courier::Models::NotificationTemplateCreateRequest::state)

Returns:



18
# File 'lib/courier/models/notification_template_create_request.rb', line 18

optional :state, enum: -> { Courier::NotificationTemplateCreateRequest::State }

Instance Method Details

#to_hash ⇒ { notification: Courier::NotificationTemplateWritePayload, state: Courier::Models::NotificationTemplateCreateRequest::state }

Returns:



23
24
25
26
# File 'sig/courier/models/notification_template_create_request.rbs', line 23

def to_hash: -> {
  notification: Courier::NotificationTemplateWritePayload,
  state: Courier::Models::NotificationTemplateCreateRequest::state
}