Class: WhopSDK::Models::CompanyCreateAPIKeyParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/whop_sdk/models/company_create_api_key_params.rb

Overview

Defined Under Namespace

Modules: Role Classes: Permission

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(actions:, grant:, resources:) ⇒ Object

Some parameter documentations has been truncated, see Permission for more details.

Input for a single permissions statement

‘b

Parameters:

  • actions (Array<String>)

    Actions covered by this statement

  • grant (Boolean)

    Whether the actions are granted or denied

  • resources (Array<String>)

    Resource identifiers. Can look like ‘biz*xxxx’ or ‘biz_xxx|pass**|exp_xxx’ or



# File 'lib/whop_sdk/models/company_create_api_key_params.rb', line 80

Instance Attribute Details

#child_company_idString

The unique identifier of the connected account to create the API key for (e.g. ‘biz_xxx’).

Returns:

  • (String)


20
# File 'lib/whop_sdk/models/company_create_api_key_params.rb', line 20

required :child_company_id, String

#nameString?

A human-readable name for the API key, such as ‘Production API Key’.

Returns:

  • (String, nil)


26
# File 'lib/whop_sdk/models/company_create_api_key_params.rb', line 26

optional :name, String, nil?: true

#parent_company_idString

Returns:

  • (String)


13
# File 'lib/whop_sdk/models/company_create_api_key_params.rb', line 13

required :parent_company_id, String

#permissionsArray<WhopSDK::Models::CompanyCreateAPIKeyParams::Permission>?

Granular permission statements defining which actions this API key can perform. Either permissions or role must be provided.



33
34
35
# File 'lib/whop_sdk/models/company_create_api_key_params.rb', line 33

optional :permissions,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CompanyCreateAPIKeyParams::Permission] },
nil?: true

#roleSymbol, ...

The different system roles that can be assigned.



41
# File 'lib/whop_sdk/models/company_create_api_key_params.rb', line 41

optional :role, enum: -> { WhopSDK::CompanyCreateAPIKeyParams::Role }, nil?: true