Class: PostForMe::Models::Webhook

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/post_for_me/models/webhook.rb,
sig/post_for_me/models/webhook.rbs

Overview

See Also:

  • PostForMe::Resources::Webhooks#create

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:, event_types:, secret:, url:) ⇒ Object

Parameters:

  • id (String)

    The unique identifier of the webhook

  • event_types (Array<String>)

    Events that will be sent to the webhook

  • secret (String)

    Secret key used to verify webhook post

  • url (String)

    The public webhook url



# File 'lib/post_for_me/models/webhook.rb', line 31

Instance Attribute Details

#event_typesArray<String>

Events that will be sent to the webhook

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


17
# File 'lib/post_for_me/models/webhook.rb', line 17

required :event_types, PostForMe::Internal::Type::ArrayOf[String]

#idString

The unique identifier of the webhook

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/post_for_me/models/webhook.rb', line 11

required :id, String

#secretString

Secret key used to verify webhook post

Parameters:

  • value (String)

Returns:

  • (String)


23
# File 'lib/post_for_me/models/webhook.rb', line 23

required :secret, String

#urlString

The public webhook url

Parameters:

  • value (String)

Returns:

  • (String)


29
# File 'lib/post_for_me/models/webhook.rb', line 29

required :url, String

Instance Method Details

#to_hash{

Returns:

  • ({)


22
# File 'sig/post_for_me/models/webhook.rbs', line 22

def to_hash: -> {