Skip to content

Instantly share code, notes, and snippets.

View MarkMurphy's full-sized avatar
:octocat:

Mark Murphy MarkMurphy

:octocat:
View GitHub Profile
class CreateSubscription
def self.call(plan, email_address, token)
user, raw_token = CreateUser.call(email_address)
subscription = Subscription.new(
plan: plan,
user: user
)
begin
@jonskirk
jonskirk / Create product service
Created February 4, 2015 01:25
Stripe service problem
class CreateProduct
def self.call(options={})
product = Product.new(options)
if !product.valid?
return product
end
begin
Stripe::Product.create(