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

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

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.



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
182
183
184
# File 'lib/zavudev/models/message_send_params.rb', line 137

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :content, String

#content_idString?

Content ID for inline images. Reference in HTML as <img src="cid:your_content_id">.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :content_id, String

#content_typeString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :content_type, String

#filenameString

Name of the attached file.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :filename, String

#pathString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :path, String

Instance Method Details

#to_hash{

Returns:

  • ({)


156
# File 'sig/zavudev/models/message_send_params.rbs', line 156

def to_hash: -> {