Class: Privy::Models::Policy

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/policy.rb

Overview

Defined Under Namespace

Modules: Version

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:, chain_type:, created_at:, name:, owner_id:, rules:, version:) ⇒ Object

Some parameter documentations has been truncated, see Privy::Models::Policy for more details.

A policy for controlling wallet operations.

Parameters:

  • id (String)

    Unique ID of the created policy. This will be the primary identifier when using

  • chain_type (Symbol, Privy::Models::WalletChainType)

    The wallet chain types.

  • created_at (Float)

    Unix timestamp of when the policy was created in milliseconds.

  • name (String)

    Name to assign to policy.

  • owner_id (String, nil)

    The key quorum ID of the owner of the policy.

  • rules (Array<Privy::Models::PolicyRuleResponse>)
  • version (Symbol, Privy::Models::Policy::Version)

    Version of the policy. Currently, 1.0 is the only version.



# File 'lib/privy/models/policy.rb', line 49

Instance Attribute Details

#chain_typeSymbol, Privy::Models::WalletChainType

The wallet chain types.

Returns:



18
# File 'lib/privy/models/policy.rb', line 18

required :chain_type, enum: -> { Privy::WalletChainType }

#created_atFloat

Unix timestamp of when the policy was created in milliseconds.

Returns:

  • (Float)


24
# File 'lib/privy/models/policy.rb', line 24

required :created_at, Float

#idString

Unique ID of the created policy. This will be the primary identifier when using the policy in the future.

Returns:

  • (String)


12
# File 'lib/privy/models/policy.rb', line 12

required :id, String

#nameString

Name to assign to policy.

Returns:

  • (String)


30
# File 'lib/privy/models/policy.rb', line 30

required :name, String

#owner_idString?

The key quorum ID of the owner of the policy.

Returns:

  • (String, nil)


36
# File 'lib/privy/models/policy.rb', line 36

required :owner_id, String, nil?: true

#rulesArray<Privy::Models::PolicyRuleResponse>



41
# File 'lib/privy/models/policy.rb', line 41

required :rules, -> { Privy::Internal::Type::ArrayOf[Privy::PolicyRuleResponse] }

#versionSymbol, Privy::Models::Policy::Version

Version of the policy. Currently, 1.0 is the only version.

Returns:



47
# File 'lib/privy/models/policy.rb', line 47

required :version, enum: -> { Privy::Policy::Version }