You’re not receiving notifications from this thread.
Passing name objects to Stripe
A few months ago I purchased the Stripe master class https://courses.gorails.com/payments-with-stripe-and-rails-master-class - awsome - learned a lot!! I could ask this question on Stack Overflow, but since the methods are specific to the course, I thought it be best asked here.
user.rb file, there is the method listed below that creates a Stripe customer is one doesn't exist.
def stripe_customer if stripe_id? Stripe::Customer.retrieve(stripe_id) else stripe_customer = Stripe::Customer.create(email: email) update(stripe_id: stripe_customer.id) stripe_customer end end
Stripe has a customer name field, how can I pass the user_first and user_last along with the email when creating a new customer? I looked on the Stripe api and it doesn't make reference at all to a name object.
I'm pretty sure you want the
description attribute and you can pass the user's name in there. https://stripe.com/docs/api/ruby#create_customer-description