Sha256: 3cf1008acbfc236473416ddeb57fe6941e2b3b3cfd508d59ee31b9aab7f2667e

Contents?: true

Size: 1.18 KB

Versions: 8

Compression:

Stored size: 1.18 KB

Contents

Stripe.price :gold do |price|
   price.name = 'Solid Gold'
   price.unit_amount = 699
   price.recurring = {
     interval: 'month'
   }
end

Stripe.price "Solid Gold".to_sym do |price|
   price.constant_name = 'SOLID_GOLD'
   price.name = 'Solid Gold'
   price.unit_amount = 699
   price.recurring = {
     interval: 'month'
   }
end

Stripe.price :alternative_currency do |price|
   price.name = 'Alternative Currency'
   price.unit_amount = 699
   price.recurring = {
     interval: 'month'
   }
   price.currency = 'cad'
end

Stripe.price :metered do |price|
  price.name = 'Metered'
  price.unit_amount = 699
  price.recurring = {
    interval: 'month',
    aggregate_usage: 'max',
    usage_type: 'metered'
  }
  price.billing_scheme = 'per_unit'
end

Stripe.price :tiered do |price|
  price.name = 'Tiered'
  price.billing_scheme = 'tiered'
  # interval must be either 'day', 'week', 'month' or 'year'
  price.recurring = {
    interval: 'month',
    interval_count: 2,
    aggregate_usage: 'max',
    usage_type: 'metered'
  }
  price.tiers = [
    {
      unit_amount: 1500,
      up_to: 10
    },
    {
      unit_amount: 1000,
      up_to: 'inf'
    }
  ]
  price.tiers_mode = 'graduated'
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
stripe-rails-2.3.5 test/dummy/config/stripe/prices.rb
stripe-rails-2.3.4 test/dummy/config/stripe/prices.rb
stripe-rails-2.3.3 test/dummy/config/stripe/prices.rb
stripe-rails-2.3.2 test/dummy/config/stripe/prices.rb
stripe-rails-2.3.1 test/dummy/config/stripe/prices.rb
stripe-rails-2.3.0 test/dummy/config/stripe/prices.rb
stripe-rails-2.2.1 test/dummy/config/stripe/prices.rb
stripe-rails-2.2.0 test/dummy/config/stripe/prices.rb