Add REST API stitching

This commit is contained in:
Vikram Rangnekar
2019-05-12 19:27:26 -04:00
parent 6c9accb628
commit f16e95ef22
40 changed files with 1127 additions and 479 deletions

View File

@ -5,6 +5,7 @@ class DeviseCreateCustomers < ActiveRecord::Migration[5.2]
create_table :customers do |t|
t.string :full_name, null: false
t.string :phone
t.string :stripe_id
## Database authenticatable
t.string :email, null: false, default: ""

View File

@ -18,6 +18,7 @@ ActiveRecord::Schema.define(version: 2019_04_05_042247) do
create_table "customers", force: :cascade do |t|
t.string "full_name", null: false
t.string "phone"
t.string "stripe_id"
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"

View File

@ -41,6 +41,7 @@ end
customer_count.times do |i|
customer = Customer.create(
stripe_id: "cus_" + [*('A'..'Z'),*('a'..'z'),*('0'..'9')].shuffle[0,10].join,
full_name: Faker::Name.name,
phone: Faker::PhoneNumber.cell_phone,
email: Faker::Internet.email,