Class: SolidusStripe::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/solidus_stripe/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



24
25
26
27
28
# File 'lib/solidus_stripe/configuration.rb', line 24

def initialize
  @webhook_events = []
  @webhook_signature_tolerance = Stripe::Webhook::DEFAULT_TOLERANCE
  @refund_reason_name = Seeds::DEFAULT_STRIPE_REFUND_REASON_NAME
end

Instance Attribute Details

#refund_reason_nameString

Returns Spree::RefundReason#name used for Stripe-generated refunds. Defaults to Seeds::DEFAULT_STRIPE_REFUND_REASON_NAME.

Returns:



22
23
24
# File 'lib/solidus_stripe/configuration.rb', line 22

def refund_reason_name
  @refund_reason_name
end

#webhook_eventsArray<Symbol>

register them in the Stripe dashboard. For an event :foo, a matching :"stripe.foo" event will be registered in Spree::Bus.

Returns:

  • (Array<Symbol>)

    stripe events to handle. You also need to



12
13
14
# File 'lib/solidus_stripe/configuration.rb', line 12

def webhook_events
  @webhook_events
end

#webhook_signature_toleranceInteger

its creation. Defaults to Stripe::Webhook::DEFAULT_TOLERANCE.

Returns:

  • (Integer)

    number of seconds while a webhook event is valid after



17
18
19
# File 'lib/solidus_stripe/configuration.rb', line 17

def webhook_signature_tolerance
  @webhook_signature_tolerance
end