struct

Stripe::Webhook

Inherits JSON::Serializable < Stripe::Resource < Struct < Value < Object

Constants

DEFAULT_TOLERANCE = 5.minutes

Constructors

new(pull : JSON::PullParser)
new(*, __pull_for_json_serializable pull : JSON::PullParser)

Class methods

from_request(request, webhook_secret, body : IO, tolerance = DEFAULT_TOLERANCE)
Source
from_request(request, webhook_secret, body : String, tolerance = DEFAULT_TOLERANCE) : Webhook | Nil
Source
from_request(request, webhook_secret, tolerance = DEFAULT_TOLERANCE)
Source
raw_from_request(request, webhook_secret, body : IO, tolerance = DEFAULT_TOLERANCE)
Source
raw_from_request(request, webhook_secret, body : String, tolerance = DEFAULT_TOLERANCE) : String | Nil
Source
raw_from_request(request, webhook_secret, tolerance = DEFAULT_TOLERANCE)
Source

Instance methods

api_version

The Stripe API version this webhook conforms to.

Source
created

The time that this webhook was first sent.

Source
data

The data associated with the webhook event, specific to that type of webhook.

Source
id

The Stripe identifier for this webhook

Source
livemode?

Returns true if this was sent from your live Stripe environment, false if it was from a test or sandbox environment.

Source
object

The object type, which should always be "webhook".

Source
pending_webhooks

The number of pending webhooks.

Source
request
Source
type

The type of webhook, indicating the Crystal type — for example, the value "customer.created" here indicates that the event will be an instance of Stripe::Webhook::Customer::Created.

Source

Macros

enable_account

Allow deserialization of account.* events

Source
enable_balance

Allow deserialization of balance.* events

Source
enable_billing

Allow deserialization of billing.* events

Source
enable_capability

Allow deserialization of capability.* events

Source
enable_cash_balance

Allow deserialization of cash_balance.* events

Source
enable_charge

Allow deserialization of charge.* events

Source
enable_checkout

Allow deserialization of checkout.* events

Source
enable_climate

Allow deserialization of climate.* events

Source
enable_coupon

Allow deserialization of coupon.* events

Source
enable_credit_note

Allow deserialization of credit_note.* events

Source
enable_customer

Allow deserialization of customer.* events

Source
enable_customer_cash_balance_transaction

Allow deserialization of customer_cash_balance_transaction.* events

Source
enable_entitlements

Allow deserialization of entitlements.* events

Source
enable_file

Allow deserialization of file.* events

Source
enable_financial_connections

Allow deserialization of financial_connections.* events

Source
enable_identity

Allow deserialization of identity.* events

Source
enable_invoice

Allow deserialization of invoice.* events

Source
enable_invoiceitem

Allow deserialization of invoiceitem.* events

Source
enable_issuing_authorization

Allow deserialization of issuing_authorization.* events

Source
enable_issuing_card

Allow deserialization of issuing_card.* events

Source
enable_issuing_cardholder

Allow deserialization of issuing_cardholder.* events

Source
enable_issuing_dispute

Allow deserialization of issuing_dispute.* events

Source
enable_issuing_personalization_design

Allow deserialization of issuing_personalization_design.* events

Source
enable_issuing_token

Allow deserialization of issuing_token.* events

Source
enable_issuing_transaction

Allow deserialization of issuing_transaction.* events

Source
enable_mandate

Allow deserialization of mandate.* events

Source
enable_payment_intent

Allow deserialization of payment_intent.* events

Source
enable_payment_method

Allow deserialization of payment_method.* events

Source
enable_payout

Allow deserialization of payout.* events

Source
enable_person

Allow deserialization of person.* events

Source
enable_plan

Allow deserialization of plan.* events

Source
enable_price

Allow deserialization of price.* events

Source
enable_product

Allow deserialization of product.* events

Source
enable_promotion_code

Allow deserialization of promotion_code.* events

Source
enable_quote

Allow deserialization of quote.* events

Source
enable_radar

Allow deserialization of radar.* events

Source
enable_refund

Allow deserialization of refund.* events

Source
enable_reporting

Allow deserialization of reporting.* events

Source
enable_review

Allow deserialization of review.* events

Source
enable_setup_intent

Allow deserialization of setup_intent.* events

Source
enable_sigma

Allow deserialization of sigma.* events

Source
enable_source

Allow deserialization of source.* events

Source
enable_subscription_schedule

Allow deserialization of subscription_schedule.* events

Source
enable_tax_rate

Allow deserialization of tax_rate.* events

Source
enable_terminal

Allow deserialization of terminal.* events

Source
enable_test_helpers

Allow deserialization of test_helpers.* events

Source
enable_topup

Allow deserialization of topup.* events

Source
enable_transfer

Allow deserialization of transfer.* events

Source
handle(types)
Source
handle_all
Source

Nested types