Class: Increase::Models::FileLink

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

Overview

See Also:

  • Increase::Resources::FileLinks#create

Defined Under Namespace

Modules: Type

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(id:, created_at:, expires_at:, file_id:, idempotency_key:, type:, unauthenticated_url:) ⇒ Object

Some parameter documentations has been truncated, see Increase::Models::FileLink for more details.

File Links let you generate a URL that can be used to download a File.

Parameters:

  • id (String)

    The File Link identifier.

  • created_at (Time)

    The ISO 8601 time at which the File Li

  • expires_at (Time)

    The ISO 8601 time at which the File Li

  • file_id (String)

    The identifier of the File the File Link points to.

  • idempotency_key (String, nil)

    The idempotency key you chose for this object. This value is unique across Incre

  • type (Symbol, Increase::Models::FileLink::Type)

    A constant representing the object's type. For this resource it will always be `

  • unauthenticated_url (String)

    A URL where the File can be downloaded. The URL will expire after the `expires_a



# File 'lib/increase/models/file_link.rb', line 56

Instance Attribute Details

#created_atTime

The ISO 8601 time at which the File Link was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


18
# File 'lib/increase/models/file_link.rb', line 18

required :created_at, Time

#expires_atTime

The ISO 8601 time at which the File Link will expire.

Parameters:

  • value (Time)

Returns:

  • (Time)


25
# File 'lib/increase/models/file_link.rb', line 25

required :expires_at, Time

#file_idString

The identifier of the File the File Link points to.

Parameters:

  • value (String)

Returns:

  • (String)


31
# File 'lib/increase/models/file_link.rb', line 31

required :file_id, String

#idString

The File Link identifier.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/increase/models/file_link.rb', line 11

required :id, String

#idempotency_keyString?

The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about idempotency.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


39
# File 'lib/increase/models/file_link.rb', line 39

required :idempotency_key, String, nil?: true

#typeSymbol, Increase::Models::FileLink::Type

A constant representing the object's type. For this resource it will always be file_link.

Parameters:

  • value (Increase::Models::FileLink::type_)

Returns:



46
# File 'lib/increase/models/file_link.rb', line 46

required :type, enum: -> { Increase::FileLink::Type }

#unauthenticated_urlString

A URL where the File can be downloaded. The URL will expire after the expires_at time. This URL is unauthenticated and can be used to download the File without an Increase API key.

Parameters:

  • value (String)

Returns:

  • (String)


54
# File 'lib/increase/models/file_link.rb', line 54

required :unauthenticated_url, String

Instance Method Details

#to_hash{

Returns:

  • ({)


39
# File 'sig/increase/models/file_link.rbs', line 39

def to_hash: -> {