Method: Hippo::Payments#create_customer_for_tenant
- Defined in:
- lib/hippo/payments.rb
#create_customer_for_tenant(tenant) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/hippo/payments.rb', line 53 def create_customer_for_tenant(tenant) return unless gateway.present? result = gateway.customer.create( company: tenant.name, email: tenant.email, phone: tenant.phone_number ) if result.success? tenant.['bt_customer_id'] = result.customer.id end end |