Created
October 9, 2015 22:46
-
-
Save matthewarkin/4fd09fcd58c4eeb68d0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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