Class: Increase::Models::File

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/increase/models/file.rb

Overview

Defined Under Namespace

Modules: Direction, Purpose, Type

Instance Attribute Summary collapse

Class Method 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: , description: , direction: , filename: , idempotency_key: , mime_type: , purpose: , type: ) ⇒ Object

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

Files are objects that represent a file hosted on Increase’s servers. The file may have been uploaded by you (for example, when uploading a check image) or it may have been created by Increase (for example, an autogenerated statement PDF). If you need to download a File, create a File Link.

Parameters:

  • id (String) (defaults to: )

    The File’s identifier.

  • created_at (Time) (defaults to: )

    The time the File was created.

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

    A description of the File.

  • direction (Symbol, Increase::Models::File::Direction) (defaults to: )

    Whether the File was generated by Increase or by you and sent to Increase.

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

    The filename that was provided upon upload or generated by Increase.

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

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

  • mime_type (String) (defaults to: )

    The MIME type of the file.

  • purpose (Symbol, Increase::Models::File::Purpose) (defaults to: )

    What the File will be used for. We may add additional possible values for this e

  • type (Symbol, Increase::Models::File::Type) (defaults to: )

    A constant representing the object’s type. For this resource it will always be ‘



# File 'lib/increase/models/file.rb', line 66


Instance Attribute Details

#created_atTime

The time the File was created.

Returns:

  • (Time)


17
# File 'lib/increase/models/file.rb', line 17

required :created_at, Time

#descriptionString?

A description of the File.

Returns:

  • (String, nil)


23
# File 'lib/increase/models/file.rb', line 23

required :description, String, nil?: true

#directionSymbol, Increase::Models::File::Direction

Whether the File was generated by Increase or by you and sent to Increase.



29
# File 'lib/increase/models/file.rb', line 29

required :direction, enum: -> { Increase::File::Direction }

#filenameString?

The filename that was provided upon upload or generated by Increase.

Returns:

  • (String, nil)


35
# File 'lib/increase/models/file.rb', line 35

required :filename, String, nil?: true

#idString

The File’s identifier.

Returns:

  • (String)


11
# File 'lib/increase/models/file.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](increase.com/documentation/idempotency-keys).

Returns:

  • (String, nil)


43
# File 'lib/increase/models/file.rb', line 43

required :idempotency_key, String, nil?: true

#mime_typeString

The MIME type of the file.

Returns:

  • (String)


49
# File 'lib/increase/models/file.rb', line 49

required :mime_type, String

#purposeSymbol, Increase::Models::File::Purpose

What the File will be used for. We may add additional possible values for this enum over time; your application should be able to handle such additions gracefully.

Returns:



57
# File 'lib/increase/models/file.rb', line 57

required :purpose, enum: -> { Increase::File::Purpose }

#typeSymbol, Increase::Models::File::Type

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

Returns:



64
# File 'lib/increase/models/file.rb', line 64

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/increase/models/file.rb', line 105