Class: SurgeAPI::Models::Message::Attachment
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- SurgeAPI::Models::Message::Attachment
- Defined in:
- lib/surge_api/models/message.rb
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
-
#id ⇒ String?
Unique identifier for the object.
-
#type ⇒ Symbol, ...
The type of attachment.
-
#url ⇒ String?
The URL of the attachment.
Instance Method Summary collapse
-
#initialize(id: nil, type: nil, url: nil) ⇒ Object
constructor
An Attachment is a file that can be sent with a message.
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: nil, type: nil, url: nil) ⇒ Object
An Attachment is a file that can be sent with a message.
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 |
# File 'lib/surge_api/models/message.rb', line 61 class Attachment < SurgeAPI::Internal::Type::BaseModel # @!attribute id # Unique identifier for the object. # # @return [String, nil] optional :id, String # @!attribute type # The type of attachment. # # @return [Symbol, SurgeAPI::Models::Message::Attachment::Type, nil] optional :type, enum: -> { SurgeAPI::Message::Attachment::Type } # @!attribute url # The URL of the attachment. # # @return [String, nil] optional :url, String # @!method initialize(id: nil, type: nil, url: nil) # An Attachment is a file that can be sent with a message. # # @param id [String] Unique identifier for the object. # # @param type [Symbol, SurgeAPI::Models::Message::Attachment::Type] The type of attachment. # # @param url [String] The URL of the attachment. # The type of attachment. # # @see SurgeAPI::Models::Message::Attachment#type module Type extend SurgeAPI::Internal::Type::Enum FILE = :file IMAGE = :image LINK = :link VIDEO = :video # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#id ⇒ String?
Unique identifier for the object.
66 |
# File 'lib/surge_api/models/message.rb', line 66 optional :id, String |
#type ⇒ Symbol, ...
The type of attachment.
72 |
# File 'lib/surge_api/models/message.rb', line 72 optional :type, enum: -> { SurgeAPI::Message::Attachment::Type } |
#url ⇒ String?
The URL of the attachment.
78 |
# File 'lib/surge_api/models/message.rb', line 78 optional :url, String |