Class: Yoomoney::Models::Webhook

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

Overview

See Also:

  • Yoomoney::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:, url:) ⇒ Object

Parameters:

  • id (String) —

    Идентификатор webhook.

  • event (Symbol, Yoomoney::Models::NotificationEventType) —

    Событие, о котором нужно уведомить.

  • url (String) —

    URL для уведомлений.



# File 'lib/yoomoney/models/webhook.rb', line 25

Instance Attribute Details

#event ⇒ Symbol, Yoomoney::Models::NotificationEventType

Событие, о котором нужно уведомить.

Parameters:

  • value (Yoomoney::Models::notification_event_type)

Returns:



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

required :event, enum: -> { Yoomoney::NotificationEventType }

#id ⇒ String

Идентификатор webhook.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#url ⇒ String

URL для уведомлений.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :url, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


23
# File 'sig/yoomoney/models/webhook.rbs', line 23

def to_hash: -> {