Sha256: 4b6c3215be07afd796e47f9a5b36e97154acb596d65abd90645f842cbbbb3698

Contents?: true

Size: 504 Bytes

Versions: 5

Compression:

Stored size: 504 Bytes

Contents

FactoryBot.define do
  factory :stripe_customer do
    sequence(:stripe_id) { |n| "customer-identifier-#{n}" }
    account_balance { 0 }
    currency { "usd" }
    delinquent { false }
    livemode { false }

    trait :with_stripe_mock do
      after :create do |stripe_customer|
        mock_customer = Stripe::Customer.create(source: StripeMock.create_test_helper.generate_card_token)
        stripe_customer.assign_from_stripe(mock_customer)
        stripe_customer.save!
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stripe_model_callbacks-0.1.5 lib/stripe_model_callbacks/factories/stripe_customers.rb
stripe_model_callbacks-0.1.4 lib/stripe_model_callbacks/factories/stripe_customers.rb
stripe_model_callbacks-0.1.3 lib/stripe_model_callbacks/factories/stripe_customers.rb
stripe_model_callbacks-0.1.2 lib/stripe_model_callbacks/factories/stripe_customers.rb
stripe_model_callbacks-0.1.1 lib/stripe_model_callbacks/factories/stripe_customers.rb