Class: ModernTreasury::Models::Document::DocumentDetail

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/modern_treasury/models/document.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(id: , created_at: , discarded_at: , document_details: , document_type: , documentable_id: , documentable_type: , file: , live_mode: , object: , source: , updated_at: ) ⇒ Object

Some parameter documentations has been truncated, see ModernTreasury::Models::Document for more details.

Parameters:

  • id (String) (defaults to: )
  • created_at (Time) (defaults to: )
  • discarded_at (Time, nil) (defaults to: )
  • document_details (Array<ModernTreasury::Models::Document::DocumentDetail>) (defaults to: )
  • document_type (String, nil) (defaults to: )

    A category given to the document, can be ‘null`.

  • documentable_id (String) (defaults to: )

    The unique identifier for the associated object.

  • documentable_type (Symbol, ModernTreasury::Models::Document::DocumentableType) (defaults to: )

    The type of the associated object. Currently can be one of ‘payment_order`, `tra

  • file (ModernTreasury::Models::Document::File) (defaults to: )
  • live_mode (Boolean) (defaults to: )

    This field will be true if this object exists in the live environment or false i

  • object (String) (defaults to: )
  • source (String) (defaults to: )

    The source of the document. Can be ‘vendor`, `customer`, or `modern_treasury`.

  • updated_at (Time) (defaults to: )


104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/modern_treasury/models/document.rb', line 104

class DocumentDetail < ModernTreasury::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String]
  required :id, String

  # @!attribute created_at
  #
  #   @return [Time]
  required :created_at, Time

  # @!attribute discarded_at
  #
  #   @return [Time, nil]
  required :discarded_at, Time, nil?: true

  # @!attribute document_identifier
  #
  #   @return [String]
  required :document_identifier, String

  # @!attribute document_identifier_type
  #
  #   @return [String]
  required :document_identifier_type, String

  # @!attribute live_mode
  #   This field will be true if this object exists in the live environment or false
  #   if it exists in the test environment.
  #
  #   @return [Boolean]
  required :live_mode, ModernTreasury::Internal::Type::Boolean

  # @!attribute object
  #
  #   @return [String]
  required :object, String

  # @!attribute updated_at
  #
  #   @return [Time]
  required :updated_at, Time

  # @!method initialize(id:, created_at:, discarded_at:, document_identifier:, document_identifier_type:, live_mode:, object:, updated_at:)
  #   Some parameter documentations has been truncated, see
  #   {ModernTreasury::Models::Document::DocumentDetail} for more details.
  #
  #   @param id [String]
  #
  #   @param created_at [Time]
  #
  #   @param discarded_at [Time, nil]
  #
  #   @param document_identifier [String]
  #
  #   @param document_identifier_type [String]
  #
  #   @param live_mode [Boolean] This field will be true if this object exists in the live environment or false i
  #
  #   @param object [String]
  #
  #   @param updated_at [Time]
end

Instance Attribute Details

#created_atTime

Returns:

  • (Time)


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

required :created_at, Time

#discarded_atTime?

Returns:

  • (Time, nil)


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

required :discarded_at, Time, nil?: true

#document_identifierString

Returns:

  • (String)


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

required :document_identifier, String

#document_identifier_typeString

Returns:

  • (String)


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

required :document_identifier_type, String

#idString

Returns:

  • (String)


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

required :id, String

#live_modeBoolean

This field will be true if this object exists in the live environment or false if it exists in the test environment.

Returns:

  • (Boolean)


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

required :live_mode, ModernTreasury::Internal::Type::Boolean

#objectString

Returns:

  • (String)


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

required :object, String

#updated_atTime

Returns:

  • (Time)


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

required :updated_at, Time