Skip to content

Instantly share code, notes, and snippets.

@matthewarkin
Created October 9, 2015 22:46
Show Gist options
  • Save matthewarkin/4fd09fcd58c4eeb68d0a to your computer and use it in GitHub Desktop.
Save matthewarkin/4fd09fcd58c4eeb68d0a to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'bundler'
Bundler.setup(:default)
require 'stripe'
Stripe.api_key = "api key"
order = Stripe::Order.create(
:currency => 'usd',
:items => [
{
:type => 'sku',
:parent => 'sku_6z17nMTrZd2Vno',
:quantity => 1
},
{
:type => 'sku',
:parent => 'sku_76d7BVEANWibDH',
:quantity => 3
}
],
:shipping => {
:name => 'Jenny Rosen',
:address => {
:line1 => '1234 Main street',
:city => 'Anytown',
:country => 'US',
:postal_code => '123456'
}
},
:email => '[email protected]',
)
puts order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment