Module: SolidusStripe::Seeds

Defined in:
lib/solidus_stripe/seeds.rb

Overview

Seed data to seamlessly integrate Solidus with Stripe.

Constant Summary collapse

DEFAULT_STRIPE_REFUND_REASON_NAME =

Default name for the Spree::RefundReason used for Stripe refunds.

Changed via Configuration#refund_reason_name.

Returns:

  • (String)
"Refund generated from Stripe"

Class Method Summary collapse

Class Method Details

.refund_reasonsObject



13
14
15
16
17
# File 'lib/solidus_stripe/seeds.rb', line 13

def self.refund_reasons
  Spree::RefundReason.find_or_create_by(
    name: DEFAULT_STRIPE_REFUND_REASON_NAME
  ) { _1.mutable = false }
end