Class: Telnyx::Models::EmailMessageBatchResponse::Error

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

Defined Under Namespace

Modules: Code

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(code:, index:, message:) ⇒ Object

Parameters:



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
# File 'lib/telnyx/models/email_message_batch_response.rb', line 27

class Error < Telnyx::Internal::Type::BaseModel
  # @!attribute code
  #   Batch item errors use `message` (not `detail`) for the human-readable text.
  #
  #   @return [Symbol, Telnyx::Models::EmailMessageBatchResponse::Error::Code]
  required :code, enum: -> { Telnyx::Models::EmailMessageBatchResponse::Error::Code }

  # @!attribute index
  #   Zero-based index of the failed message in the request array.
  #
  #   @return [Integer]
  required :index, Integer

  # @!attribute message
  #
  #   @return [String]
  required :message, String

  # @!method initialize(code:, index:, message:)
  #   @param code [Symbol, Telnyx::Models::EmailMessageBatchResponse::Error::Code] Batch item errors use `message` (not `detail`) for the human-readable text.
  #
  #   @param index [Integer] Zero-based index of the failed message in the request array.
  #
  #   @param message [String]

  # Batch item errors use `message` (not `detail`) for the human-readable text.
  #
  # @see Telnyx::Models::EmailMessageBatchResponse::Error#code
  module Code
    extend Telnyx::Internal::Type::Enum

    BAD_REQUEST = :bad_request
    NOT_FOUND = :not_found
    FORBIDDEN = :forbidden
    SERVICE_UNAVAILABLE = :service_unavailable
    VALIDATION_ERROR = :validation_error
    RECIPIENT_SUPPRESSED = :recipient_suppressed
    REPUTATION_SUSPENDED = :reputation_suspended

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#codeSymbol, Telnyx::Models::EmailMessageBatchResponse::Error::Code

Batch item errors use message (not detail) for the human-readable text.

Parameters:

  • value (Telnyx::Models::EmailMessageBatchResponse::Error::code)

Returns:



32
# File 'lib/telnyx/models/email_message_batch_response.rb', line 32

required :code, enum: -> { Telnyx::Models::EmailMessageBatchResponse::Error::Code }

#indexInteger

Zero-based index of the failed message in the request array.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


38
# File 'lib/telnyx/models/email_message_batch_response.rb', line 38

required :index, Integer

#messageString

Parameters:

  • value (String)

Returns:

  • (String)


43
# File 'lib/telnyx/models/email_message_batch_response.rb', line 43

required :message, String

Instance Method Details

#to_hash{

Returns:

  • ({)


49
# File 'sig/telnyx/models/email_message_batch_response.rbs', line 49

def to_hash: -> {