Class: WhopSDK::Models::WebhookCreateParams

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

Overview

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(url:, api_version: nil, child_resource_events: nil, enabled: nil, events: nil, resource_id: nil, request_options: {}) ⇒ Object

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

Parameters:

  • url (String)

    The URL to send the webhook to.

  • api_version (Symbol, WhopSDK::Models::APIVersion, nil) (defaults to: nil)

    The different API versions

  • child_resource_events (Boolean, nil) (defaults to: nil)

    Whether or not to send events for child resources. For example, if the webhook i

  • enabled (Boolean, nil) (defaults to: nil)

    Whether or not the webhook is enabled.

  • events (Array<Symbol, WhopSDK::Models::WebhookEvent>, nil) (defaults to: nil)

    The events to send the webhook for.

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

    The resource to create the webhook for. By default this will use current company

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


# File 'lib/whop_sdk/models/webhook_create_params.rb', line 48

Instance Attribute Details

#api_versionSymbol, ...

The different API versions

Returns:



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

optional :api_version, enum: -> { WhopSDK::APIVersion }, nil?: true

#child_resource_eventsBoolean?

Whether or not to send events for child resources. For example, if the webhook is created for a Company, enabling this will only send events from the Company’s sub-merchants (child companies).

Returns:

  • (Boolean, nil)


28
# File 'lib/whop_sdk/models/webhook_create_params.rb', line 28

optional :child_resource_events, WhopSDK::Internal::Type::Boolean, nil?: true

#enabledBoolean?

Whether or not the webhook is enabled.

Returns:

  • (Boolean, nil)


34
# File 'lib/whop_sdk/models/webhook_create_params.rb', line 34

optional :enabled, WhopSDK::Internal::Type::Boolean, nil?: true

#eventsArray<Symbol, WhopSDK::Models::WebhookEvent>?

The events to send the webhook for.

Returns:



40
# File 'lib/whop_sdk/models/webhook_create_params.rb', line 40

optional :events, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::WebhookEvent] }, nil?: true

#resource_idString?

The resource to create the webhook for. By default this will use current company

Returns:

  • (String, nil)


46
# File 'lib/whop_sdk/models/webhook_create_params.rb', line 46

optional :resource_id, String, nil?: true

#urlString

The URL to send the webhook to.

Returns:

  • (String)


14
# File 'lib/whop_sdk/models/webhook_create_params.rb', line 14

required :url, String