Class: Orb::Models::Item

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

Overview

See Also:

  • Orb::Resources::Items#create

Defined Under Namespace

Classes: ExternalConnection

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

#initializeObject



26
# File 'sig/orb/models/item.rbs', line 26

def initialize: (

Instance Attribute Details

#archived_atTime?

The time at which the item was archived. If null, the item is not archived.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


45
# File 'lib/orb/models/item.rb', line 45

optional :archived_at, Time, nil?: true

#created_atTime

The time at which the item was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


17
# File 'lib/orb/models/item.rb', line 17

required :created_at, Time

#external_connectionsArray<Orb::Models::Item::ExternalConnection>

A list of external connections for this item, used to sync with external invoicing and tax systems.

Parameters:

  • value (::Array[Orb::Item::ExternalConnection])

Returns:



24
# File 'lib/orb/models/item.rb', line 24

required :external_connections, -> { Orb::Internal::Type::ArrayOf[Orb::Item::ExternalConnection] }

#idString

The Orb-assigned unique identifier for the item.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/orb/models/item.rb', line 11

required :id, String

#metadataHash{Symbol=>String}

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

Parameters:

  • value (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String})


33
# File 'lib/orb/models/item.rb', line 33

required :metadata, Orb::Internal::Type::HashOf[String]

#nameString

The name of the item.

Parameters:

  • value (String)

Returns:

  • (String)


39
# File 'lib/orb/models/item.rb', line 39

required :name, String

Instance Method Details

#to_hash{

Returns:

  • ({)


35
# File 'sig/orb/models/item.rbs', line 35

def to_hash: -> {