Class: ModernTreasury::Models::Document::File

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

Overview

See Also:

  • ModernTreasury::Models::Document#file

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(content_type: nil, filename: nil, size: nil) ⇒ Object

Parameters:

  • content_type (String) (defaults to: nil)

    The MIME content type of the document.

  • filename (String) (defaults to: nil)

    The original filename of the document.

  • size (Integer) (defaults to: nil)

    The size of the document in bytes.



# File 'lib/modern_treasury/models/document.rb', line 140

Instance Attribute Details

#content_typeString?

The MIME content type of the document.

Parameters:

  • (String)

Returns:

  • (String, nil)


126
# File 'lib/modern_treasury/models/document.rb', line 126

optional :content_type, String

#filenameString?

The original filename of the document.

Parameters:

  • (String)

Returns:

  • (String, nil)


132
# File 'lib/modern_treasury/models/document.rb', line 132

optional :filename, String

#sizeInteger?

The size of the document in bytes.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


138
# File 'lib/modern_treasury/models/document.rb', line 138

optional :size, Integer

Instance Method Details

#to_hash{

Returns:

  • ({)


121
# File 'sig/modern_treasury/models/document.rbs', line 121

def to_hash: -> {