Class: Increase::Models::File

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

Overview

See Also:

  • Increase::Resources::Files#create

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

Files are objects that represent a file hosted on Increase's servers. Each File has a purpose that determines how Increase will use it. You upload a File so it can be attached to another object in the API (for example, when uploading a check image), or Increase creates one for you to download (for example, an autogenerated statement PDF). If you need to download a File, use the /files/{file_id}/contents endpoint. If you need to share a File with someone who doesn't have access to your API key, create a File Link.



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


Instance Attribute Details

#created_atTime

The time the File was created.



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

required :created_at, Time

#descriptionString?

A description of the File.



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.



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

required :filename, String, nil?: true

#idString

The File's identifier.



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.



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

required :idempotency_key, String, nil?: true

#mime_typeString

The MIME type of the file.



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.



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.



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

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

Class Method Details

.valuesArray<Symbol>



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


Instance Method Details

#to_hash{



47
# File 'sig/increase/models/file.rbs', line 47

def to_hash: -> {