Class: Dodopayments::Models::DigitalProductDeliveryFile

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/digital_product_delivery_file.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(download_url:, expires_in:, file_id:, filename:, content_type: nil, file_size: nil) ⇒ Object

One file in a digital-product delivery payload.

Parameters:

  • download_url (String)

    Short-lived presigned URL for downloading the file.

  • expires_in (Integer)

    Seconds until ‘download_url` expires.

  • file_id (String)

    Identifier of the attached file.

  • filename (String)

    Original filename of the attached file.

  • content_type (String, nil) (defaults to: nil)

    Optional content-type declared at upload.

  • file_size (Integer, nil) (defaults to: nil)

    Optional size of the file in bytes.



# File 'lib/dodopayments/models/digital_product_delivery_file.rb', line 42

Instance Attribute Details

#content_typeString?

Optional content-type declared at upload.

Returns:

  • (String, nil)


34
# File 'lib/dodopayments/models/digital_product_delivery_file.rb', line 34

optional :content_type, String, nil?: true

#download_urlString

Short-lived presigned URL for downloading the file.

Returns:

  • (String)


10
# File 'lib/dodopayments/models/digital_product_delivery_file.rb', line 10

required :download_url, String

#expires_inInteger

Seconds until ‘download_url` expires.

Returns:

  • (Integer)


16
# File 'lib/dodopayments/models/digital_product_delivery_file.rb', line 16

required :expires_in, Integer

#file_idString

Identifier of the attached file.

Returns:

  • (String)


22
# File 'lib/dodopayments/models/digital_product_delivery_file.rb', line 22

required :file_id, String

#file_sizeInteger?

Optional size of the file in bytes.

Returns:

  • (Integer, nil)


40
# File 'lib/dodopayments/models/digital_product_delivery_file.rb', line 40

optional :file_size, Integer, nil?: true

#filenameString

Original filename of the attached file.

Returns:

  • (String)


28
# File 'lib/dodopayments/models/digital_product_delivery_file.rb', line 28

required :filename, String