Class: WhopSDK::Resources::Webhooks
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Webhooks
- Defined in:
- lib/whop_sdk/resources/webhooks.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Webhooks
constructor
private
A new instance of Webhooks.
- #unwrap(payload) ⇒ WhopSDK::Models::InvoiceCreatedWebhookEvent, ...
Constructor Details
#initialize(client:) ⇒ Webhooks
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Webhooks.
17 18 19 |
# File 'lib/whop_sdk/resources/webhooks.rb', line 17 def initialize(client:) @client = client end |
Instance Method Details
#unwrap(payload) ⇒ WhopSDK::Models::InvoiceCreatedWebhookEvent, ...
9 10 11 12 |
# File 'lib/whop_sdk/resources/webhooks.rb', line 9 def unwrap(payload) parsed = JSON.parse(payload, symbolize_names: true) WhopSDK::Internal::Type::Converter.coerce(WhopSDK::Models::UnwrapWebhookEvent, parsed) end |