Class: Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles::File

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/integration_config_response.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(files:, external_url: nil, instructions: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles for more details.

Populated digital-files payload with each file’s metadata and a short-lived presigned download URL.

Parameters:



177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/dodopayments/models/integration_config_response.rb', line 177

class File < Dodopayments::Internal::Type::BaseModel
  # @!attribute download_url
  #   Short-lived presigned URL for downloading the file.
  #
  #   @return [String]
  required :download_url, String

  # @!attribute expires_in
  #   Seconds until `download_url` expires.
  #
  #   @return [Integer]
  required :expires_in, Integer

  # @!attribute file_id
  #   Identifier of the attached file.
  #
  #   @return [String]
  required :file_id, String

  # @!attribute filename
  #   Original filename of the attached file.
  #
  #   @return [String]
  required :filename, String

  # @!attribute content_type
  #   Optional content-type declared at upload.
  #
  #   @return [String, nil]
  optional :content_type, String, nil?: true

  # @!attribute file_size
  #   Optional size of the file in bytes.
  #
  #   @return [Integer, nil]
  optional :file_size, Integer, nil?: true

  # @!method initialize(download_url:, expires_in:, file_id:, filename:, content_type: nil, file_size: nil)
  #   One file in a resolved digital-files payload.
  #
  #   @param download_url [String] Short-lived presigned URL for downloading the file.
  #
  #   @param expires_in [Integer] Seconds until `download_url` expires.
  #
  #   @param file_id [String] Identifier of the attached file.
  #
  #   @param filename [String] Original filename of the attached file.
  #
  #   @param content_type [String, nil] Optional content-type declared at upload.
  #
  #   @param file_size [Integer, nil] Optional size of the file in bytes.
end

Instance Attribute Details

#content_typeString?

Optional content-type declared at upload.

Returns:

  • (String, nil)


206
# File 'lib/dodopayments/models/integration_config_response.rb', line 206

optional :content_type, String, nil?: true

#download_urlString

Short-lived presigned URL for downloading the file.

Returns:

  • (String)


182
# File 'lib/dodopayments/models/integration_config_response.rb', line 182

required :download_url, String

#expires_inInteger

Seconds until ‘download_url` expires.

Returns:

  • (Integer)


188
# File 'lib/dodopayments/models/integration_config_response.rb', line 188

required :expires_in, Integer

#file_idString

Identifier of the attached file.

Returns:

  • (String)


194
# File 'lib/dodopayments/models/integration_config_response.rb', line 194

required :file_id, String

#file_sizeInteger?

Optional size of the file in bytes.

Returns:

  • (Integer, nil)


212
# File 'lib/dodopayments/models/integration_config_response.rb', line 212

optional :file_size, Integer, nil?: true

#filenameString

Original filename of the attached file.

Returns:

  • (String)


200
# File 'lib/dodopayments/models/integration_config_response.rb', line 200

required :filename, String