Class: GrowsurfRuby::Models::Campaign::Webhook

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

Overview

See Also:

  • GrowsurfRuby::Resources::Campaign::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(auto_disabled_due_to_failures:, events:, failure_count:, id:, is_enabled:, last_failure_at: nil, payload_url: nil) ⇒ Object

Some parameter documentations has been truncated, see GrowsurfRuby::Models::Campaign::Webhook for more details.

Parameters:

  • auto_disabled_due_to_failures (Boolean)

    Read-only. Whether GrowSurf auto-disabled this webhook after repeated delivery fai

  • events (Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>)
  • failure_count (Integer)

    Read-only. Consecutive delivery failures.

  • id (String)

    The webhook id (primary for the program's primary webhook).

  • is_enabled (Boolean)
  • last_failure_at (Integer, nil) (defaults to: nil)

    Read-only. When the last delivery failure occurred, as a Unix timestamp in millise

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

    The URL that receives webhook deliveries.



# File 'lib/growsurf_ruby/models/campaign/webhook.rb', line 52

Instance Attribute Details

#auto_disabled_due_to_failuresBoolean

Read-only. Whether GrowSurf auto-disabled this webhook after repeated delivery failures.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


13
14
15
# File 'lib/growsurf_ruby/models/campaign/webhook.rb', line 13

required :auto_disabled_due_to_failures,
GrowsurfRuby::Internal::Type::Boolean,
api_name: :autoDisabledDueToFailures

#eventsArray<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>

Parameters:

  • value (::Array[GrowsurfRuby::Models::Campaign::webhook_event])

Returns:



20
# File 'lib/growsurf_ruby/models/campaign/webhook.rb', line 20

required :events, -> { GrowsurfRuby::Internal::Type::ArrayOf[enum: GrowsurfRuby::Campaign::WebhookEvent] }

#failure_countInteger

Read-only. Consecutive delivery failures.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


26
# File 'lib/growsurf_ruby/models/campaign/webhook.rb', line 26

required :failure_count, Integer, api_name: :failureCount

#idString

The webhook id (primary for the program's primary webhook).

Parameters:

  • value (String)

Returns:

  • (String)


32
# File 'lib/growsurf_ruby/models/campaign/webhook.rb', line 32

required :id, String

#is_enabledBoolean

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


37
# File 'lib/growsurf_ruby/models/campaign/webhook.rb', line 37

required :is_enabled, GrowsurfRuby::Internal::Type::Boolean, api_name: :isEnabled

#last_failure_atInteger?

Read-only. When the last delivery failure occurred, as a Unix timestamp in milliseconds.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


44
# File 'lib/growsurf_ruby/models/campaign/webhook.rb', line 44

optional :last_failure_at, Integer, api_name: :lastFailureAt, nil?: true

#payload_urlString?

The URL that receives webhook deliveries.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


50
# File 'lib/growsurf_ruby/models/campaign/webhook.rb', line 50

optional :payload_url, String, api_name: :payloadUrl, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


40
# File 'sig/growsurf_ruby/models/campaign/webhook.rbs', line 40

def to_hash: -> {