Class: CashOut::Payments::Customer::Create

Inherits:
ServiceBase
  • Object
show all
Defined in:
lib/cash_out/payments/customer/create.rb

Constant Summary

Constants inherited from ServiceBase

ServiceBase::STRIPE_ERRORS

Instance Method Summary collapse

Methods inherited from ServiceBase

#failure_message, #failure_status, #success_message, #validate_and_save

Instance Method Details

#executeObject



10
11
12
13
14
# File 'lib/cash_out/payments/customer/create.rb', line 10

def execute
  customer = create_stripe_customer
  user.stripe_id = customer["id"] if customer.is_a?(Stripe::Customer)
  validate_and_save(user)
end