Class: Zavudev::Models::SubAccount

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/zavudev/models/sub_account.rb

Overview

Defined Under Namespace

Modules: Status

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:, status:, total_spent:, api_key: nil, credit_limit: nil, external_id: nil, metadata: nil) ⇒ Object

Some parameter documentations has been truncated, see Zavudev::Models::SubAccount for more details.

Parameters:

  • id (String)
  • created_at (Time)
  • name (String)
  • status (Symbol, Zavudev::Models::SubAccount::Status)
  • total_spent (Integer)

    Total amount spent by this sub-account in cents.

  • api_key (String) (defaults to: nil)

    API key for the sub-account. Only returned on creation.

  • credit_limit (Integer, nil) (defaults to: nil)

    Spending cap in cents. When reached, messages from this sub-account will be bloc

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

    External reference ID set by the parent account.

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


# File 'lib/zavudev/models/sub_account.rb', line 57

Instance Attribute Details

#api_keyString?

API key for the sub-account. Only returned on creation.

Returns:

  • (String, nil)


37
# File 'lib/zavudev/models/sub_account.rb', line 37

optional :api_key, String, api_name: :apiKey

#created_atTime

Returns:

  • (Time)


15
# File 'lib/zavudev/models/sub_account.rb', line 15

required :created_at, Time, api_name: :createdAt

#credit_limitInteger?

Spending cap in cents. When reached, messages from this sub-account will be blocked.

Returns:

  • (Integer, nil)


44
# File 'lib/zavudev/models/sub_account.rb', line 44

optional :credit_limit, Integer, api_name: :creditLimit, nil?: true

#external_idString?

External reference ID set by the parent account.

Returns:

  • (String, nil)


50
# File 'lib/zavudev/models/sub_account.rb', line 50

optional :external_id, String, api_name: :externalId, nil?: true

#idString

Returns:

  • (String)


10
# File 'lib/zavudev/models/sub_account.rb', line 10

required :id, String

#metadataHash{Symbol=>Object}?

Returns:

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


55
# File 'lib/zavudev/models/sub_account.rb', line 55

optional :metadata, Zavudev::Internal::Type::HashOf[Zavudev::Internal::Type::Unknown], nil?: true

#nameString

Returns:

  • (String)


20
# File 'lib/zavudev/models/sub_account.rb', line 20

required :name, String

#statusSymbol, Zavudev::Models::SubAccount::Status



25
# File 'lib/zavudev/models/sub_account.rb', line 25

required :status, enum: -> { Zavudev::SubAccount::Status }

#total_spentInteger

Total amount spent by this sub-account in cents.

Returns:

  • (Integer)


31
# File 'lib/zavudev/models/sub_account.rb', line 31

required :total_spent, Integer, api_name: :totalSpent