Class: Telnyx::Models::EmailBlockRetrieveEventsResponse::Data

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

Defined Under Namespace

Modules: EventType, RecordType

Instance Attribute Summary collapse

Class Method 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:, actor:, event_type:, occurred_at:, reason:, record_type:, source:, meta: nil) ⇒ Object

Parameters:



22
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
101
102
103
104
105
106
107
108
109
# File 'lib/telnyx/models/email_block_retrieve_events_response.rb', line 22

class Data < Telnyx::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String]
  required :id, String

  # @!attribute actor
  #   Free-text (`user_id`/`org_id`/`api_key`/`dev_bypass`/`system`/`manual`).
  #
  #   @return [String]
  required :actor, String

  # @!attribute event_type
  #
  #   @return [Symbol, Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::EventType]
  required :event_type, enum: -> { Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::EventType }

  # @!attribute occurred_at
  #
  #   @return [Time]
  required :occurred_at, Time

  # @!attribute reason
  #   Free-text snapshot of the block's reason at event time.
  #
  #   @return [String]
  required :reason, String

  # @!attribute record_type
  #   View-only.
  #
  #   @return [Symbol, Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::RecordType]
  required :record_type, enum: -> { Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::RecordType }

  # @!attribute source
  #   Free-text snapshot of the block's source at event time.
  #
  #   @return [String]
  required :source, String

  # @!attribute meta
  #   `null` when the schema field is nil (the context usually sets it to `{}`).
  #
  #   @return [Hash{Symbol=>Object}, nil]
  optional :meta, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown], nil?: true

  # @!method initialize(id:, actor:, event_type:, occurred_at:, reason:, record_type:, source:, meta: nil)
  #   @param id [String]
  #
  #   @param actor [String] Free-text (`user_id`/`org_id`/`api_key`/`dev_bypass`/`system`/`manual`).
  #
  #   @param event_type [Symbol, Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::EventType]
  #
  #   @param occurred_at [Time]
  #
  #   @param reason [String] Free-text snapshot of the block's reason at event time.
  #
  #   @param record_type [Symbol, Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::RecordType] View-only.
  #
  #   @param source [String] Free-text snapshot of the block's source at event time.
  #
  #   @param meta [Hash{Symbol=>Object}, nil] `null` when the schema field is nil (the context usually sets it to `{}`).

  # @see Telnyx::Models::EmailBlockRetrieveEventsResponse::Data#event_type
  module EventType
    extend Telnyx::Internal::Type::Enum

    CREATED = :created
    REMOVED = :removed
    EXPIRED = :expired
    OVERRIDE_USED = :override_used

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

  # View-only.
  #
  # @see Telnyx::Models::EmailBlockRetrieveEventsResponse::Data#record_type
  module RecordType
    extend Telnyx::Internal::Type::Enum

    EMAIL_BLOCK_EVENT = :email_block_event

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

Instance Attribute Details

#actorString

Free-text (user_id/org_id/api_key/dev_bypass/system/manual).

Parameters:

  • value (String)

Returns:

  • (String)


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

required :actor, String

#event_typeSymbol, Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::EventType

Parameters:

  • value (Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::event_type)

Returns:



37
# File 'lib/telnyx/models/email_block_retrieve_events_response.rb', line 37

required :event_type, enum: -> { Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::EventType }

#idString

Parameters:

  • value (String)

Returns:

  • (String)


26
# File 'lib/telnyx/models/email_block_retrieve_events_response.rb', line 26

required :id, String

#metaHash{Symbol=>Object}?

null when the schema field is nil (the context usually sets it to {}).

Parameters:

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

Returns:

  • (Hash{Symbol=>Object}, nil)


66
# File 'lib/telnyx/models/email_block_retrieve_events_response.rb', line 66

optional :meta, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown], nil?: true

#occurred_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


42
# File 'lib/telnyx/models/email_block_retrieve_events_response.rb', line 42

required :occurred_at, Time

#reasonString

Free-text snapshot of the block's reason at event time.

Parameters:

  • value (String)

Returns:

  • (String)


48
# File 'lib/telnyx/models/email_block_retrieve_events_response.rb', line 48

required :reason, String

#record_typeSymbol, Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::RecordType

View-only.

Parameters:

  • value (Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::record_type)

Returns:



54
# File 'lib/telnyx/models/email_block_retrieve_events_response.rb', line 54

required :record_type, enum: -> { Telnyx::Models::EmailBlockRetrieveEventsResponse::Data::RecordType }

#sourceString

Free-text snapshot of the block's source at event time.

Parameters:

  • value (String)

Returns:

  • (String)


60
# File 'lib/telnyx/models/email_block_retrieve_events_response.rb', line 60

required :source, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/email_block_retrieve_events_response.rb', line 94

Instance Method Details

#to_hash{

Returns:

  • ({)


64
# File 'sig/telnyx/models/email_block_retrieve_events_response.rbs', line 64

def to_hash: -> {