Class: Straddle::Models::Organization

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

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:, name:, updated_at:, external_id: nil, metadata: nil) ⇒ Object

Parameters:

  • id (String) —

    Straddle's unique ID for the organization.

  • created_at (Time) —

    Date and time when Straddle created the organization.

  • name (String) —

    The name of the organization.

  • updated_at (Time) —

    Date and time of the most recent organization update.

  • external_id (String, nil) (defaults to: nil) —

    Your unique ID for the organization.

  • metadata (Hash{Symbol=>String, nil}, nil) (defaults to: nil) —

    Up to 20 user-defined key-value pairs.



# File 'lib/straddle/models/organization.rb', line 42

Instance Attribute Details

#created_at ⇒ Time

Date and time when Straddle created the organization.

Parameters:

  • value (Time)

Returns:

  • (Time)


16
# File 'lib/straddle/models/organization.rb', line 16

required :created_at, Time

#external_id ⇒ String?

Your unique ID for the organization.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


34
# File 'lib/straddle/models/organization.rb', line 34

optional :external_id, String, nil?: true

#id ⇒ String

Straddle's unique ID for the organization.

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/straddle/models/organization.rb', line 10

required :id, String

#metadata ⇒ Hash{Symbol=>String, nil}?

Up to 20 user-defined key-value pairs.

Parameters:

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

Returns:

  • (Hash{Symbol=>String, nil}, nil)


40
# File 'lib/straddle/models/organization.rb', line 40

optional :metadata, Straddle::Internal::Type::HashOf[String, nil?: true], nil?: true

#name ⇒ String

The name of the organization.

Parameters:

  • value (String)

Returns:

  • (String)


22
# File 'lib/straddle/models/organization.rb', line 22

required :name, String

#updated_at ⇒ Time

Date and time of the most recent organization update.

Parameters:

  • value (Time)

Returns:

  • (Time)


28
# File 'lib/straddle/models/organization.rb', line 28

required :updated_at, Time

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


35
# File 'sig/straddle/models/organization.rbs', line 35

def to_hash: -> {