Class: Zavudev::Models::MessageSendParams::Attachment

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/zavudev/models/message_send_params.rb

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(filename:, content: nil, content_id: nil, content_type: nil, path: nil) ⇒ Object

Some parameter documentations has been truncated, see Zavudev::Models::MessageSendParams::Attachment for more details.

Email attachment. Provide either ‘content` (base64) or `path` (URL), not both.

Parameters:

  • filename (String)

    Name of the attached file.

  • content (String) (defaults to: nil)

    Content of the attached file as a Base64-encoded string.

  • content_id (String) (defaults to: nil)

    Content ID for inline images. Reference in HTML as ‘<img src=“cid:your_content_i

  • content_type (String) (defaults to: nil)

    MIME type of the attachment. If not set, will be derived from the filename.

  • path (String) (defaults to: nil)

    URL where the attachment file is hosted. The server will fetch the file.



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/zavudev/models/message_send_params.rb', line 134

class Attachment < Zavudev::Internal::Type::BaseModel
  # @!attribute filename
  #   Name of the attached file.
  #
  #   @return [String]
  required :filename, String

  # @!attribute content
  #   Content of the attached file as a Base64-encoded string.
  #
  #   @return [String, nil]
  optional :content, String

  # @!attribute content_id
  #   Content ID for inline images. Reference in HTML as
  #   `<img src="cid:your_content_id">`.
  #
  #   @return [String, nil]
  optional :content_id, String

  # @!attribute content_type
  #   MIME type of the attachment. If not set, will be derived from the filename.
  #
  #   @return [String, nil]
  optional :content_type, String

  # @!attribute path
  #   URL where the attachment file is hosted. The server will fetch the file.
  #
  #   @return [String, nil]
  optional :path, String

  # @!method initialize(filename:, content: nil, content_id: nil, content_type: nil, path: nil)
  #   Some parameter documentations has been truncated, see
  #   {Zavudev::Models::MessageSendParams::Attachment} for more details.
  #
  #   Email attachment. Provide either `content` (base64) or `path` (URL), not both.
  #
  #   @param filename [String] Name of the attached file.
  #
  #   @param content [String] Content of the attached file as a Base64-encoded string.
  #
  #   @param content_id [String] Content ID for inline images. Reference in HTML as `<img src="cid:your_content_i
  #
  #   @param content_type [String] MIME type of the attachment. If not set, will be derived from the filename.
  #
  #   @param path [String] URL where the attachment file is hosted. The server will fetch the file.
end

Instance Attribute Details

#contentString?

Content of the attached file as a Base64-encoded string.

Returns:

  • (String, nil)


145
# File 'lib/zavudev/models/message_send_params.rb', line 145

optional :content, String

#content_idString?

Content ID for inline images. Reference in HTML as ‘<img src=“cid:your_content_id”>`.

Returns:

  • (String, nil)


152
# File 'lib/zavudev/models/message_send_params.rb', line 152

optional :content_id, String

#content_typeString?

MIME type of the attachment. If not set, will be derived from the filename.

Returns:

  • (String, nil)


158
# File 'lib/zavudev/models/message_send_params.rb', line 158

optional :content_type, String

#filenameString

Name of the attached file.

Returns:

  • (String)


139
# File 'lib/zavudev/models/message_send_params.rb', line 139

required :filename, String

#pathString?

URL where the attachment file is hosted. The server will fetch the file.

Returns:

  • (String, nil)


164
# File 'lib/zavudev/models/message_send_params.rb', line 164

optional :path, String