Class: Courier::Models::Provider

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/provider.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:, created:, provider:, settings:, title:, alias_: nil, updated: nil) ⇒ Object

A configured provider in the workspace.

Parameters:

  • id (String)

    A unique identifier for the provider configuration.

  • created (Integer)

    Unix timestamp (ms) of when the provider was created.

  • provider (String)

    The provider key (e.g. “sendgrid”, “twilio”, “slack”).

  • settings (Hash{Symbol=>Object})

    Provider-specific settings (snake_case keys on the wire).

  • title (String)

    Display title. Defaults to “Default Configuration” when not explicitly set.

  • alias_ (String) (defaults to: nil)

    Optional alias for this configuration.

  • updated (Integer, nil) (defaults to: nil)

    Unix timestamp (ms) of when the provider was last updated.



# File 'lib/courier/models/provider.rb', line 49

Instance Attribute Details

#alias_String?

Optional alias for this configuration.

Returns:

  • (String, nil)


41
# File 'lib/courier/models/provider.rb', line 41

optional :alias_, String, api_name: :alias

#createdInteger

Unix timestamp (ms) of when the provider was created.

Returns:

  • (Integer)


17
# File 'lib/courier/models/provider.rb', line 17

required :created, Integer

#idString

A unique identifier for the provider configuration.

Returns:

  • (String)


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

required :id, String

#providerString

The provider key (e.g. “sendgrid”, “twilio”, “slack”).

Returns:

  • (String)


23
# File 'lib/courier/models/provider.rb', line 23

required :provider, String

#settingsHash{Symbol=>Object}

Provider-specific settings (snake_case keys on the wire).

Returns:

  • (Hash{Symbol=>Object})


29
# File 'lib/courier/models/provider.rb', line 29

required :settings, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]

#titleString

Display title. Defaults to “Default Configuration” when not explicitly set.

Returns:

  • (String)


35
# File 'lib/courier/models/provider.rb', line 35

required :title, String

#updatedInteger?

Unix timestamp (ms) of when the provider was last updated.

Returns:

  • (Integer, nil)


47
# File 'lib/courier/models/provider.rb', line 47

optional :updated, Integer, nil?: true