Class: WhopSDK::Models::CompanyCreateAPIKeyParams::Permission

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/company_create_api_key_params.rb

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(parent_company_id:, child_company_id:, name: nil, permissions: nil, role: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::CompanyCreateAPIKeyParams for more details.

Parameters:

  • parent_company_id (String)
  • child_company_id (String)

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

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

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

  • permissions (Array<WhopSDK::Models::CompanyCreateAPIKeyParams::Permission>, nil) (defaults to: nil)

    Granular permission statements defining which actions this API key can perform.

  • role (Symbol, WhopSDK::Models::CompanyCreateAPIKeyParams::Role, nil) (defaults to: nil)

    The different system roles that can be assigned.

  • request_options (WhopSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/whop_sdk/models/company_create_api_key_params.rb', line 59

class Permission < WhopSDK::Internal::Type::BaseModel
  # @!attribute actions
  #   Actions covered by this statement
  #
  #   @return [Array<String>]
  required :actions, WhopSDK::Internal::Type::ArrayOf[String]

  # @!attribute grant
  #   Whether the actions are granted or denied
  #
  #   @return [Boolean]
  required :grant, WhopSDK::Internal::Type::Boolean

  # @!attribute resources
  #   Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*_|exp*xxx' or
  #   'biz_xxx|app_xxx' or 'biz_xxx|pass_xxx|exp_xxx' or 'biz_xxx|pass_xxx' or
  #   'biz_xxx|pass*_'
  #
  #   @return [Array<String>]
  required :resources, WhopSDK::Internal::Type::ArrayOf[String]

  # @!method initialize(actions:, grant:, resources:)
  #   Some parameter documentations has been truncated, see
  #   {WhopSDK::Models::CompanyCreateAPIKeyParams::Permission} for more details.
  #
  #   Input for a single permissions statement
  #
  #   @param actions [Array<String>] Actions covered by this statement
  #
  #   @param grant [Boolean] Whether the actions are granted or denied
  #
  #   @param resources [Array<String>] Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*\*|exp_xxx' or
  #   'b
end

Instance Attribute Details

#actionsArray<String>

Actions covered by this statement

Returns:

  • (Array<String>)


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

required :actions, WhopSDK::Internal::Type::ArrayOf[String]

#grantBoolean

Whether the actions are granted or denied

Returns:

  • (Boolean)


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

required :grant, WhopSDK::Internal::Type::Boolean

#resourcesArray<String>

Resource identifiers. Can look like ‘biz*xxxx’ or ‘biz_xxx|pass*_|exp*xxx’ or ‘biz_xxx|app_xxx’ or ‘biz_xxx|pass_xxx|exp_xxx’ or ‘biz_xxx|pass_xxx’ or ‘biz_xxx|pass*_’

Returns:

  • (Array<String>)


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

required :resources, WhopSDK::Internal::Type::ArrayOf[String]