stripe_local 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/stripe_local/coupon.rb +2 -0
- data/app/models/stripe_local/customer.rb +13 -8
- data/app/models/stripe_local/discount.rb +3 -0
- data/app/models/stripe_local/invoice.rb +9 -0
- data/app/models/stripe_local/plan.rb +5 -2
- data/app/models/stripe_local/transaction.rb +11 -0
- data/lib/stripe_local/association_methods.rb +51 -0
- data/lib/stripe_local/instance_delegation.rb +49 -0
- data/lib/stripe_local/version.rb +1 -1
- data/lib/stripe_local.rb +9 -59
- data/spec/dummy/log/test.log +333 -0
- data/spec/models/stripe_local/customer_spec.rb +3 -3
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9a6d6bf6b27b5da7149cfaf9dcd392bc9fa8bd2
|
4
|
+
data.tar.gz: 99eb42aa30970acda0afc4057ca4065c374dd092
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37070a90380faa87d282b80aff7cb093f4010915435dce54154d41337c3b55d402bdb75599152e5cfc68ca5b8cc7643c793b9e206b4225eddeb047e472cb5dbe
|
7
|
+
data.tar.gz: f1edb5c48aaa9c8fe2c15c24ff0b7fa8aa592dd4ce77f403e05e0d9860e5968ba9c288fa6e17fb059c59463c3d8cc16b7d545f5bdd88af289cd138c5babaf9a5
|
@@ -4,21 +4,26 @@ module StripeLocal
|
|
4
4
|
|
5
5
|
self.primary_key = :id
|
6
6
|
|
7
|
-
belongs_to :model,
|
8
|
-
|
9
|
-
|
7
|
+
belongs_to :model, inverse_of: :customer,
|
8
|
+
foreign_key: "model_id",
|
9
|
+
class_name: "::#{StripeLocal::model_class}"
|
10
10
|
|
11
|
-
has_many :cards,
|
11
|
+
has_many :cards, inverse_of: :customer,
|
12
|
+
class_name: 'StripeLocal::Card'
|
12
13
|
|
13
|
-
has_many :invoices, inverse_of: :customer
|
14
|
+
has_many :invoices, inverse_of: :customer,
|
15
|
+
class_name: 'StripeLocal::Invoice'
|
14
16
|
|
15
|
-
has_many :charges,
|
17
|
+
has_many :charges, inverse_of: :customer,
|
18
|
+
class_name: 'StripeLocal::Charge'
|
16
19
|
|
17
|
-
has_one :subscription, inverse_of: :customer
|
20
|
+
has_one :subscription, inverse_of: :customer,
|
21
|
+
class_name: 'StripeLocal::Subscription'
|
18
22
|
|
19
23
|
has_one :plan, through: :subscription,
|
20
24
|
inverse_of: :members,
|
21
|
-
source: :plan
|
25
|
+
source: :plan,
|
26
|
+
class_name: 'StripeLocal::Card'
|
22
27
|
|
23
28
|
class<<self
|
24
29
|
|
@@ -5,9 +5,12 @@ module StripeLocal
|
|
5
5
|
self.primary_key = :id
|
6
6
|
|
7
7
|
has_many :subscriptions, inverse_of: :plan
|
8
|
-
has_many :
|
9
|
-
|
8
|
+
has_many :line_items, inverse_of: :plan
|
9
|
+
has_many :members, through: :subscriptions,
|
10
|
+
inverse_of: :plan,
|
10
11
|
source: :customer
|
12
|
+
has_many :invoices, through: :line_items,
|
13
|
+
source: :invoice
|
11
14
|
|
12
15
|
class<<self
|
13
16
|
def create object
|
@@ -6,6 +6,9 @@ module StripeLocal
|
|
6
6
|
|
7
7
|
time_writer :created, :available_on
|
8
8
|
|
9
|
+
|
10
|
+
belongs_to :source, polymorphic: true
|
11
|
+
|
9
12
|
class<<self
|
10
13
|
def create object
|
11
14
|
super normalize( object )
|
@@ -26,6 +29,14 @@ module StripeLocal
|
|
26
29
|
end
|
27
30
|
end
|
28
31
|
end
|
32
|
+
|
33
|
+
def pending
|
34
|
+
where 'available_on < ?', Time.now
|
35
|
+
end
|
36
|
+
|
37
|
+
def available
|
38
|
+
where 'available_on > ?', Time.now
|
39
|
+
end
|
29
40
|
end
|
30
41
|
|
31
42
|
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module StripeLocal
|
2
|
+
module AssociationMethods
|
3
|
+
def customer
|
4
|
+
@customer ||= StripeLocal::Customer.find_by( model_id: id )
|
5
|
+
end
|
6
|
+
|
7
|
+
def subscription
|
8
|
+
@subscription ||= StripeLocal::Subscription.find_by( customer_id: customer.id )
|
9
|
+
end
|
10
|
+
|
11
|
+
def cards
|
12
|
+
@cards ||= StripeLocal::Card.where( customer_id: customer.id )
|
13
|
+
end
|
14
|
+
|
15
|
+
def plan
|
16
|
+
@plan ||= StripeLocal::Plan.find_by( id: subscription.plan_id )
|
17
|
+
end
|
18
|
+
|
19
|
+
def discount
|
20
|
+
@discount ||= StripeLocal::Discount.find_by( customer_id: customer.id )
|
21
|
+
end
|
22
|
+
|
23
|
+
def coupon
|
24
|
+
@coupon ||= StripeLocal::Coupon.find_by( id: discount.coupon_id )
|
25
|
+
end
|
26
|
+
|
27
|
+
def invoices
|
28
|
+
@invoices ||= StripeLocal::Invoice.where( customer_id: customer.id ).order( date: :desc )
|
29
|
+
end
|
30
|
+
|
31
|
+
def paid_invoices
|
32
|
+
invoices.paid
|
33
|
+
end
|
34
|
+
|
35
|
+
def charges
|
36
|
+
@charges ||= StripeLocal::Charge.where( customer_id: customer.id ).order( created: :desc )
|
37
|
+
end
|
38
|
+
|
39
|
+
def transactions
|
40
|
+
@transactions ||= StripeLocal::Transaction.where( source: charges ).order( created: :desc )
|
41
|
+
end
|
42
|
+
|
43
|
+
def pending_transactions
|
44
|
+
transactions.pending
|
45
|
+
end
|
46
|
+
|
47
|
+
def available_transactions
|
48
|
+
transactions.available
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module StripeLocal
|
2
|
+
module InstanceDelegation
|
3
|
+
#=!=#
|
4
|
+
# ==this is the primary interface for subscribing.
|
5
|
+
#
|
6
|
+
# [params]
|
7
|
+
# * +card+ (required) -> the token returned by stripe.js
|
8
|
+
# * +plan+ (required) -> the id of the plan being subscribed to
|
9
|
+
# * +email+ (optional) -> the client's email address
|
10
|
+
# * +description+ (optional) -> a description to attach to the stripe object for future reference
|
11
|
+
# * +coupon+ (optional) -> the id of a coupon if the subscription should be discounted
|
12
|
+
# * +lines+ (optional) -> an array of (amount,description) tuples
|
13
|
+
#
|
14
|
+
# :card => "tok_abc123",
|
15
|
+
# :plan => "MySaaS",
|
16
|
+
# :email => subscriber.email,
|
17
|
+
# :description => "a one year subscription to our flagship service at $99.00 per month"
|
18
|
+
# :lines => [
|
19
|
+
# [ 20000, "a one time setup fee of $200.00 for new members" ]
|
20
|
+
# ]
|
21
|
+
#=¡=#
|
22
|
+
def signup params
|
23
|
+
plan = params.delete( :plan )
|
24
|
+
lines = params.delete( :lines ) || []
|
25
|
+
|
26
|
+
_customer_ = Stripe::Customer.create( params )
|
27
|
+
|
28
|
+
lines.each do |(amount,desc)|
|
29
|
+
_customer_.add_invoice_item({currency: 'usd', amount: amount, description: desc})
|
30
|
+
end
|
31
|
+
_customer_.update_subscription({ plan: plan })
|
32
|
+
|
33
|
+
StripeLocal::Customer.create( {model_id: self.id}.merge _customer_.to_hash )
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
def method_missing method, *args, &block
|
38
|
+
if customer && customer.respond_to?( method )
|
39
|
+
customer.send method, *args, &block
|
40
|
+
else
|
41
|
+
super
|
42
|
+
end
|
43
|
+
end
|
44
|
+
def respond_to_missing? method, include_private = false
|
45
|
+
customer && customer.respond_to?( method ) || super
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
data/lib/stripe_local/version.rb
CHANGED
data/lib/stripe_local.rb
CHANGED
@@ -1,71 +1,21 @@
|
|
1
1
|
require "stripe_local/engine"
|
2
2
|
require "stripe_local/webhook"
|
3
|
+
require "stripe_local/instance_delegation"
|
4
|
+
require "stripe_local/association_methods"
|
3
5
|
|
4
|
-
module StripeLocal
|
5
6
|
|
7
|
+
module StripeLocal
|
6
8
|
mattr_accessor :model_class
|
7
9
|
|
8
10
|
def stripe_customer
|
9
|
-
|
10
|
-
|
11
|
-
include InstanceMethods
|
12
|
-
end
|
13
|
-
|
14
|
-
module InstanceMethods
|
15
|
-
|
16
|
-
#=!=#>>>
|
17
|
-
#
|
18
|
-
# this is the primary interface for subscribing.
|
19
|
-
#
|
20
|
-
# [params]
|
21
|
-
# * +card+ (required) -> the token returned by stripe.js
|
22
|
-
# * +plan+ (required) -> the id of the plan being subscribed to
|
23
|
-
# * +email+ (optional) -> the client's email address
|
24
|
-
# * +description+ (optional) -> a description to attach to the stripe object for future reference
|
25
|
-
# * +coupon+ (optional) -> the id of a coupon if the subscription should be discounted
|
26
|
-
# * +lines+ (optional) -> an array of (amount,description) tuples
|
27
|
-
# ```
|
28
|
-
# :card => "tok_abc123",
|
29
|
-
# :plan => "MySaaS",
|
30
|
-
# :email => subscriber.email,
|
31
|
-
# :description => "a one year subscription to our flagship service at $99.00 per month"
|
32
|
-
# :lines => [
|
33
|
-
# [ 20000, "a one time setup fee of $200.00 for new members" ]
|
34
|
-
# ]
|
35
|
-
# ```
|
36
|
-
#=¡=#>>>
|
37
|
-
|
38
|
-
def signup params
|
39
|
-
plan = params.delete( :plan )
|
40
|
-
lines = params.delete( :lines ) || []
|
11
|
+
include InstanceDelegation
|
12
|
+
include AssociationMethods
|
41
13
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
customer.add_invoice_item( {currency: 'usd'}.merge item )
|
46
|
-
end
|
47
|
-
|
48
|
-
customer.update_subscription({ plan: plan })
|
49
|
-
|
50
|
-
StripeLocal::Customer.create( {model_id: self.id}.merge customer.to_hash )
|
51
|
-
end
|
52
|
-
|
53
|
-
def customer
|
54
|
-
StripeLocal::Customer.find_by( model_id: id )
|
55
|
-
end
|
56
|
-
|
57
|
-
def method_missing method, *args, &block
|
58
|
-
if self.customer && self.customer.respond_to?( method )
|
59
|
-
self.customer.send method, *args, &block
|
60
|
-
else
|
61
|
-
super
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
def respond_to_missing? method, include_private = false
|
66
|
-
self.customer && self.customer.respond_to?( method ) || super
|
67
|
-
end
|
14
|
+
has_one :customer, inverse_of: :model,
|
15
|
+
foreign_key: :model_id,
|
16
|
+
class_name: 'StripeLocal::Customer'
|
68
17
|
|
18
|
+
StripeLocal::model_class = self
|
69
19
|
end
|
70
20
|
end
|
71
21
|
|
data/spec/dummy/log/test.log
CHANGED
@@ -20833,3 +20833,336 @@ Migrating to LoadStripeTables (20131122063517)
|
|
20833
20833
|
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20834
20834
|
[1m[35mStripeLocal::Customer Load (0.4ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" = 1 LIMIT 1
|
20835
20835
|
[1m[36mStripeLocal::Subscription Load (0.7ms)[0m [1mSELECT "stripe_local_subscriptions".* FROM "stripe_local_subscriptions" WHERE "stripe_local_subscriptions"."customer_id" = $1 ORDER BY "stripe_local_subscriptions"."id" ASC LIMIT 1[0m [["customer_id", "cus_123"]]
|
20836
|
+
[1m[36m (1.6ms)[0m [1mALTER TABLE "stripe_local_discounts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_cards" DISABLE TRIGGER ALL;ALTER TABLE "clients" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_customers" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_transfers" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_invoices" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_plans" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_line_items" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_charges" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_coupons" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_transactions" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_balances" DISABLE TRIGGER ALL[0m
|
20837
|
+
[1m[35m (4.1ms)[0m select table_name from information_schema.views where table_schema = 'dummy_test'
|
20838
|
+
[1m[36m (86.8ms)[0m [1mTRUNCATE TABLE "stripe_local_discounts", "stripe_local_cards", "clients", "stripe_local_customers", "stripe_local_transfers", "stripe_local_subscriptions", "stripe_local_invoices", "stripe_local_plans", "stripe_local_line_items", "stripe_local_charges", "stripe_local_coupons", "stripe_local_transactions", "stripe_local_balances" RESTART IDENTITY CASCADE;[0m
|
20839
|
+
[1m[35m (0.5ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_discounts" ENABLE TRIGGER ALL;ALTER TABLE "clients" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_customers" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_transfers" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_cards" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_invoices" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_plans" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_line_items" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_charges" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_coupons" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_transactions" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_balances" ENABLE TRIGGER ALL
|
20840
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
20841
|
+
[1m[35mStripeLocal::Customer Load (0.4ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
20842
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20843
|
+
[1m[35mStripeLocal::Customer Load (0.3ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
20844
|
+
[1m[36mStripeLocal::Customer Load (0.2ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
20845
|
+
[1m[35mStripeLocal::Customer Load (0.2ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
20846
|
+
[1m[36mStripeLocal::Customer Load (0.2ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
20847
|
+
[1m[35mStripeLocal::Customer Load (0.2ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
20848
|
+
[1m[36mStripeLocal::Customer Load (0.2ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
20849
|
+
[1m[35mStripeLocal::Customer Load (0.1ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
20850
|
+
[1m[36mStripeLocal::Customer Load (0.2ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
20851
|
+
[1m[35mSQL (5.9ms)[0m INSERT INTO "clients" ("created_at", "email", "name", "password", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 30 Nov 2013 15:13:26 CST -06:00], ["email", "test@test.com"], ["name", "Test Case"], ["password", "password"], ["updated_at", Sat, 30 Nov 2013 15:13:26 CST -06:00]]
|
20852
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20853
|
+
[1m[35mStripeLocal::Customer Load (0.2ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" = 1 LIMIT 1
|
20854
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
20855
|
+
[1m[35mSQL (2.9ms)[0m INSERT INTO "stripe_local_cards" ("brand", "created_at", "customer_id", "cvc_check", "exp_month", "exp_year", "id", "last4", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["brand", "Visa"], ["created_at", Sat, 30 Nov 2013 15:13:26 CST -06:00], ["customer_id", "cus_123"], ["cvc_check", "pass"], ["exp_month", 8], ["exp_year", 2014], ["id", "card_102Y2J1Cmf55uWiejglofO7j"], ["last4", "4242"], ["name", "Test Case"], ["updated_at", Sat, 30 Nov 2013 15:13:26 CST -06:00]]
|
20856
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
20857
|
+
[1m[35m (0.2ms)[0m BEGIN
|
20858
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "stripe_local_subscriptions" ("created_at", "current_period_end", "current_period_start", "customer_id", "plan_id", "start", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", Sat, 30 Nov 2013 15:13:26 CST -06:00], ["current_period_end", Thu, 10 Oct 2013 13:52:04 CDT -05:00], ["current_period_start", Tue, 10 Sep 2013 13:52:04 CDT -05:00], ["customer_id", "cus_123"], ["plan_id", "GIN100"], ["start", Tue, 10 Sep 2013 13:52:04 CDT -05:00], ["status", "active"], ["updated_at", Sat, 30 Nov 2013 15:13:26 CST -06:00]]
|
20859
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20860
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20861
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "stripe_local_customers" ("account_balance", "created_at", "default_card", "delinquent", "description", "email", "id", "model_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_balance", 0], ["created_at", Sat, 30 Nov 2013 15:13:26 CST -06:00], ["default_card", "card_102Y2J1Cmf55uWiejglofO7j"], ["delinquent", false], ["description", "On September 10th, Test signed up for CA50."], ["email", "test@test.com"], ["id", "cus_123"], ["model_id", 1], ["updated_at", Sat, 30 Nov 2013 15:13:26 CST -06:00]]
|
20862
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20863
|
+
[1m[35mStripeLocal::Customer Load (0.3ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" = 1 LIMIT 1
|
20864
|
+
[1m[36mStripeLocal::Subscription Load (0.6ms)[0m [1mSELECT "stripe_local_subscriptions".* FROM "stripe_local_subscriptions" WHERE "stripe_local_subscriptions"."customer_id" = 'cus_123' LIMIT 1[0m
|
20865
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20866
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20867
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20868
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20869
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20870
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20871
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20872
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20873
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20874
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20875
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20876
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
20877
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20878
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20879
|
+
[1m[35m (0.2ms)[0m COMMIT
|
20880
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20881
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20882
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20883
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "stripe_local_balances"
|
20884
|
+
[1m[36mStripeLocal::Balance Load (0.3ms)[0m [1mSELECT "stripe_local_balances".* FROM "stripe_local_balances" ORDER BY "stripe_local_balances"."id" DESC LIMIT 1[0m
|
20885
|
+
[1m[35mStripeLocal::Balance Load (0.2ms)[0m SELECT "stripe_local_balances".* FROM "stripe_local_balances" ORDER BY "stripe_local_balances"."id" DESC LIMIT 1
|
20886
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "stripe_local_balances" SET "updated_at" = '2013-12-01 21:13:27.029299' WHERE "stripe_local_balances"."id" = 6[0m
|
20887
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "stripe_local_balances"
|
20888
|
+
[1m[36mStripeLocal::Balance Load (0.2ms)[0m [1mSELECT "stripe_local_balances".* FROM "stripe_local_balances" ORDER BY "stripe_local_balances"."id" DESC LIMIT 1[0m
|
20889
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20890
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20891
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20892
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20893
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20894
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
20895
|
+
[1m[35m (0.2ms)[0m SELECT "stripe_local_balances"."available" FROM "stripe_local_balances"
|
20896
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20897
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20898
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20899
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20900
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20901
|
+
[1m[35m (0.2ms)[0m COMMIT
|
20902
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "stripe_local_balances"[0m
|
20903
|
+
[1m[35m (0.0ms)[0m BEGIN
|
20904
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 39800], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 0], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20905
|
+
[1m[35m (0.2ms)[0m COMMIT
|
20906
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "stripe_local_balances"[0m
|
20907
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20908
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20909
|
+
[1m[35m (0.2ms)[0m COMMIT
|
20910
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
20911
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20912
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
20913
|
+
[1m[35m (0.1ms)[0m SELECT "stripe_local_balances"."pending" FROM "stripe_local_balances"
|
20914
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20915
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20916
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20917
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20918
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20919
|
+
[1m[35m (0.2ms)[0m COMMIT
|
20920
|
+
[1m[36m (0.2ms)[0m [1mSELECT "stripe_local_balances"."available" FROM "stripe_local_balances"[0m
|
20921
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20922
|
+
[1m[36mSQL (1.8ms)[0m [1mINSERT INTO "stripe_local_charges" ("amount", "card_id", "created", "created_at", "customer_id", "id", "invoice_id", "paid", "transaction_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["amount", 9900], ["card_id", "cc_1eX7GyRo6wivEf"], ["created", Thu, 01 Aug 2013 18:08:14 CDT -05:00], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["customer_id", "cus_1eX7onie2gq8m1"], ["id", "ch_2wiSyZQkZw8F50"], ["invoice_id", "in_2whTLSkV2ItHAv"], ["paid", true], ["transaction_id", "txn_2wiSFq1N6BTZTQ"], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20923
|
+
[1m[35m (0.5ms)[0m COMMIT
|
20924
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
20925
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "stripe_local_transactions" ("amount", "available_on", "created", "created_at", "description", "fee", "id", "net", "source_id", "source_type", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["amount", -100], ["available_on", Mon, 07 Oct 2013 05:01:01 CDT -05:00], ["created", Mon, 30 Sep 2013 05:01:01 CDT -05:00], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["description", "a dollar for Don Atello"], ["fee", 25], ["id", "txn_2fOGkiBkDgpObU"], ["net", -125], ["source_id", "tr_2fOGfKABdHu3uf"], ["source_type", "transfer"], ["status", "available"], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20926
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
20927
|
+
[1m[35mStripeLocal::Plan Load (0.4ms)[0m SELECT "stripe_local_plans".* FROM "stripe_local_plans" WHERE "stripe_local_plans"."id" = 'New_Plan' LIMIT 1
|
20928
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
20929
|
+
[1m[35mSQL (1.4ms)[0m INSERT INTO "stripe_local_plans" ("amount", "created_at", "id", "interval", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", 2999], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["id", "New_Plan"], ["interval", "month"], ["name", "New Plan"], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20930
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20931
|
+
[1m[35m (0.2ms)[0m BEGIN
|
20932
|
+
[1m[36mSQL (1.5ms)[0m [1mINSERT INTO "stripe_local_line_items" ("amount", "created_at", "id", "invoice_id", "period_end", "period_start", "plan_id", "proration", "quantity", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["amount", 9900], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["id", "su_1bfTBoL3o7blah"], ["invoice_id", "in_2blahblahagain"], ["period_end", Thu, 06 Jun 2013 18:23:47 CDT -05:00], ["period_start", Tue, 07 May 2013 18:23:47 CDT -05:00], ["plan_id", "HR99"], ["proration", false], ["quantity", 1], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20933
|
+
[1m[35m (0.2ms)[0m COMMIT
|
20934
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20935
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "stripe_local_invoices" ("amount_due", "attempt_count", "attempted", "charge_id", "closed", "created_at", "customer_id", "date", "discount", "ending_balance", "id", "paid", "period_end", "period_start", "starting_balance", "subtotal", "total", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18) RETURNING "id" [["amount_due", 9900], ["attempt_count", 0], ["attempted", true], ["charge_id", "ch_blahblahblah"], ["closed", true], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["customer_id", "cus_1A3zUmx7NpUgrT"], ["date", Tue, 07 May 2013 18:23:47 CDT -05:00], ["discount", nil], ["ending_balance", 0], ["id", "in_2blahblahagain"], ["paid", true], ["period_end", Tue, 07 May 2013 18:23:47 CDT -05:00], ["period_start", Tue, 07 May 2013 18:23:47 CDT -05:00], ["starting_balance", 0], ["subtotal", 9900], ["total", 9900], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20936
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
20937
|
+
[1m[35mStripeLocal::LineItem Load (0.7ms)[0m SELECT "stripe_local_line_items".* FROM "stripe_local_line_items" WHERE "stripe_local_line_items"."invoice_id" = $1 [["invoice_id", "in_2blahblahagain"]]
|
20938
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
20939
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "stripe_local_subscriptions" ("created_at", "current_period_end", "current_period_start", "customer_id", "plan_id", "start", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["current_period_end", Wed, 11 Dec 2013 15:32:46 CST -06:00], ["current_period_start", Mon, 11 Nov 2013 15:32:46 CST -06:00], ["customer_id", "cus_2vIuZmAfWK89Yk"], ["plan_id", "HR99"], ["start", Mon, 11 Nov 2013 15:32:46 CST -06:00], ["status", "active"], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20940
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20941
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20942
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "stripe_local_cards" ("brand", "created_at", "customer_id", "cvc_check", "exp_month", "exp_year", "id", "last4", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["brand", "Visa"], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["customer_id", "cus_2J7PZ8ncCbR10Z"], ["cvc_check", "pass"], ["exp_month", 1], ["exp_year", 2014], ["id", "cc_2J7Pscoh4jvFjJ"], ["last4", "4242"], ["name", "Connor Tumbleson"], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20943
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20944
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
20945
|
+
[1m[35mSQL (1.4ms)[0m INSERT INTO "stripe_local_transfers" ("amount", "created_at", "date", "description", "id", "status", "transaction_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["amount", 100], ["created_at", Sat, 30 Nov 2013 15:13:27 CST -06:00], ["date", Mon, 30 Sep 2013 05:01:01 CDT -05:00], ["description", "a dollar for Don Atello"], ["id", "tr_2fOGfKABdHu3uf"], ["status", "paid"], ["transaction_id", "txn_2fOGkiBkDgpObU"], ["updated_at", Sat, 30 Nov 2013 15:13:27 CST -06:00]]
|
20946
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20947
|
+
[1m[36m (1.0ms)[0m [1mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_discounts" DISABLE TRIGGER ALL;ALTER TABLE "clients" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_customers" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_transfers" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_cards" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_invoices" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_plans" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_line_items" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_charges" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_coupons" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_transactions" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_balances" DISABLE TRIGGER ALL[0m
|
20948
|
+
[1m[35m (1.1ms)[0m select table_name from information_schema.views where table_schema = 'dummy_test'
|
20949
|
+
[1m[36m (24.2ms)[0m [1mTRUNCATE TABLE "stripe_local_discounts", "clients", "stripe_local_customers", "stripe_local_transfers", "stripe_local_cards", "stripe_local_subscriptions", "stripe_local_invoices", "stripe_local_plans", "stripe_local_line_items", "stripe_local_charges", "stripe_local_coupons", "stripe_local_transactions", "stripe_local_balances" RESTART IDENTITY CASCADE;[0m
|
20950
|
+
[1m[35m (1.0ms)[0m ALTER TABLE "stripe_local_discounts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_customers" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_transfers" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_cards" ENABLE TRIGGER ALL;ALTER TABLE "clients" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_invoices" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_plans" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_line_items" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_charges" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_coupons" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_transactions" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_balances" ENABLE TRIGGER ALL
|
20951
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
20952
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20953
|
+
[1m[36mSQL (6.4ms)[0m [1mINSERT INTO "stripe_local_transfers" ("amount", "created_at", "date", "description", "id", "status", "transaction_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["amount", 100], ["created_at", Sat, 30 Nov 2013 15:13:31 CST -06:00], ["date", Mon, 30 Sep 2013 05:01:01 CDT -05:00], ["description", "a dollar for Don Atello"], ["id", "tr_2fOGfKABdHu3uf"], ["status", "paid"], ["transaction_id", "txn_2fOGkiBkDgpObU"], ["updated_at", Sat, 30 Nov 2013 15:13:31 CST -06:00]]
|
20954
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20955
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20956
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "stripe_local_line_items" ("amount", "created_at", "id", "invoice_id", "period_end", "period_start", "plan_id", "proration", "quantity", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["amount", 9900], ["created_at", Sat, 30 Nov 2013 15:13:31 CST -06:00], ["id", "su_1bfTBoL3o7blah"], ["invoice_id", "in_2blahblahagain"], ["period_end", Thu, 06 Jun 2013 18:23:47 CDT -05:00], ["period_start", Tue, 07 May 2013 18:23:47 CDT -05:00], ["plan_id", "HR99"], ["proration", false], ["quantity", 1], ["updated_at", Sat, 30 Nov 2013 15:13:31 CST -06:00]]
|
20957
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20958
|
+
[1m[35m (0.2ms)[0m BEGIN
|
20959
|
+
[1m[36mSQL (1.5ms)[0m [1mINSERT INTO "stripe_local_invoices" ("amount_due", "attempt_count", "attempted", "charge_id", "closed", "created_at", "customer_id", "date", "discount", "ending_balance", "id", "paid", "period_end", "period_start", "starting_balance", "subtotal", "total", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18) RETURNING "id"[0m [["amount_due", 9900], ["attempt_count", 0], ["attempted", true], ["charge_id", "ch_blahblahblah"], ["closed", true], ["created_at", Sat, 30 Nov 2013 15:13:31 CST -06:00], ["customer_id", "cus_1A3zUmx7NpUgrT"], ["date", Tue, 07 May 2013 18:23:47 CDT -05:00], ["discount", nil], ["ending_balance", 0], ["id", "in_2blahblahagain"], ["paid", true], ["period_end", Tue, 07 May 2013 18:23:47 CDT -05:00], ["period_start", Tue, 07 May 2013 18:23:47 CDT -05:00], ["starting_balance", 0], ["subtotal", 9900], ["total", 9900], ["updated_at", Sat, 30 Nov 2013 15:13:31 CST -06:00]]
|
20960
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20961
|
+
[1m[36mStripeLocal::LineItem Load (0.6ms)[0m [1mSELECT "stripe_local_line_items".* FROM "stripe_local_line_items" WHERE "stripe_local_line_items"."invoice_id" = $1[0m [["invoice_id", "in_2blahblahagain"]]
|
20962
|
+
[1m[35m (0.2ms)[0m BEGIN
|
20963
|
+
[1m[36mSQL (1.4ms)[0m [1mINSERT INTO "stripe_local_transactions" ("amount", "available_on", "created", "created_at", "description", "fee", "id", "net", "source_id", "source_type", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id"[0m [["amount", -100], ["available_on", Mon, 07 Oct 2013 05:01:01 CDT -05:00], ["created", Mon, 30 Sep 2013 05:01:01 CDT -05:00], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["description", "a dollar for Don Atello"], ["fee", 25], ["id", "txn_2fOGkiBkDgpObU"], ["net", -125], ["source_id", "tr_2fOGfKABdHu3uf"], ["source_type", "transfer"], ["status", "available"], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
20964
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20965
|
+
[1m[36mStripeLocal::Customer Load (0.5ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
20966
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20967
|
+
[1m[36mStripeLocal::Customer Load (0.2ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
20968
|
+
[1m[35mStripeLocal::Customer Load (0.2ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
20969
|
+
[1m[36mStripeLocal::Customer Load (0.2ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
20970
|
+
[1m[35mStripeLocal::Customer Load (0.1ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
20971
|
+
[1m[36mStripeLocal::Customer Load (0.1ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
20972
|
+
[1m[35mStripeLocal::Customer Load (0.2ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
20973
|
+
[1m[36mStripeLocal::Customer Load (0.1ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
20974
|
+
[1m[35mStripeLocal::Customer Load (0.2ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
20975
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "clients" ("created_at", "email", "name", "password", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["email", "test@test.com"], ["name", "Test Case"], ["password", "password"], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
20976
|
+
[1m[35m (0.2ms)[0m COMMIT
|
20977
|
+
[1m[36mStripeLocal::Customer Load (0.2ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" = 1 LIMIT 1[0m
|
20978
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20979
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "stripe_local_cards" ("brand", "created_at", "customer_id", "cvc_check", "exp_month", "exp_year", "id", "last4", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["brand", "Visa"], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["customer_id", "cus_123"], ["cvc_check", "pass"], ["exp_month", 8], ["exp_year", 2014], ["id", "card_102Y2J1Cmf55uWiejglofO7j"], ["last4", "4242"], ["name", "Test Case"], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
20980
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20981
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
20982
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "stripe_local_subscriptions" ("created_at", "current_period_end", "current_period_start", "customer_id", "plan_id", "start", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["current_period_end", Thu, 10 Oct 2013 13:52:04 CDT -05:00], ["current_period_start", Tue, 10 Sep 2013 13:52:04 CDT -05:00], ["customer_id", "cus_123"], ["plan_id", "GIN100"], ["start", Tue, 10 Sep 2013 13:52:04 CDT -05:00], ["status", "active"], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
20983
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
20984
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20985
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "stripe_local_customers" ("account_balance", "created_at", "default_card", "delinquent", "description", "email", "id", "model_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"[0m [["account_balance", 0], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["default_card", "card_102Y2J1Cmf55uWiejglofO7j"], ["delinquent", false], ["description", "On September 10th, Test signed up for CA50."], ["email", "test@test.com"], ["id", "cus_123"], ["model_id", 1], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
20986
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20987
|
+
[1m[36mStripeLocal::Customer Load (0.3ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" = 1 LIMIT 1[0m
|
20988
|
+
[1m[35mStripeLocal::Subscription Load (0.3ms)[0m SELECT "stripe_local_subscriptions".* FROM "stripe_local_subscriptions" WHERE "stripe_local_subscriptions"."customer_id" = 'cus_123' LIMIT 1
|
20989
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
20990
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "stripe_local_subscriptions" ("created_at", "current_period_end", "current_period_start", "customer_id", "plan_id", "start", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["current_period_end", Wed, 11 Dec 2013 15:32:46 CST -06:00], ["current_period_start", Mon, 11 Nov 2013 15:32:46 CST -06:00], ["customer_id", "cus_2vIuZmAfWK89Yk"], ["plan_id", "HR99"], ["start", Mon, 11 Nov 2013 15:32:46 CST -06:00], ["status", "active"], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
20991
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
20992
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20993
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "stripe_local_cards" ("brand", "created_at", "customer_id", "cvc_check", "exp_month", "exp_year", "id", "last4", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["brand", "Visa"], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["customer_id", "cus_2J7PZ8ncCbR10Z"], ["cvc_check", "pass"], ["exp_month", 1], ["exp_year", 2014], ["id", "cc_2J7Pscoh4jvFjJ"], ["last4", "4242"], ["name", "Connor Tumbleson"], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
20994
|
+
[1m[35m (0.3ms)[0m COMMIT
|
20995
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
20996
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "stripe_local_charges" ("amount", "card_id", "created", "created_at", "customer_id", "id", "invoice_id", "paid", "transaction_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["amount", 9900], ["card_id", "cc_1eX7GyRo6wivEf"], ["created", Thu, 01 Aug 2013 18:08:14 CDT -05:00], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["customer_id", "cus_1eX7onie2gq8m1"], ["id", "ch_2wiSyZQkZw8F50"], ["invoice_id", "in_2whTLSkV2ItHAv"], ["paid", true], ["transaction_id", "txn_2wiSFq1N6BTZTQ"], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
20997
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
20998
|
+
[1m[35m (0.1ms)[0m BEGIN
|
20999
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21000
|
+
[1m[35m (0.3ms)[0m COMMIT
|
21001
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21002
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21003
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21004
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "stripe_local_balances"
|
21005
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21006
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 39800], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 0], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21007
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
21008
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "stripe_local_balances"
|
21009
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21010
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21011
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
21012
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21013
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21014
|
+
[1m[35m (0.2ms)[0m COMMIT
|
21015
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "stripe_local_balances"[0m
|
21016
|
+
[1m[35mStripeLocal::Balance Load (0.3ms)[0m SELECT "stripe_local_balances".* FROM "stripe_local_balances" ORDER BY "stripe_local_balances"."id" DESC LIMIT 1
|
21017
|
+
[1m[36mStripeLocal::Balance Load (0.2ms)[0m [1mSELECT "stripe_local_balances".* FROM "stripe_local_balances" ORDER BY "stripe_local_balances"."id" DESC LIMIT 1[0m
|
21018
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "stripe_local_balances" SET "updated_at" = '2013-12-01 21:13:32.294086' WHERE "stripe_local_balances"."id" = 5
|
21019
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "stripe_local_balances"[0m
|
21020
|
+
[1m[35mStripeLocal::Balance Load (0.2ms)[0m SELECT "stripe_local_balances".* FROM "stripe_local_balances" ORDER BY "stripe_local_balances"."id" DESC LIMIT 1
|
21021
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21022
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21023
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
21024
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21025
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21026
|
+
[1m[35m (0.2ms)[0m COMMIT
|
21027
|
+
[1m[36m (0.1ms)[0m [1mSELECT "stripe_local_balances"."pending" FROM "stripe_local_balances"[0m
|
21028
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21029
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21030
|
+
[1m[35m (0.2ms)[0m COMMIT
|
21031
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21032
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21033
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21034
|
+
[1m[35m (0.1ms)[0m SELECT "stripe_local_balances"."available" FROM "stripe_local_balances"
|
21035
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21036
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21037
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21038
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21039
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21040
|
+
[1m[35m (0.2ms)[0m COMMIT
|
21041
|
+
[1m[36m (0.1ms)[0m [1mSELECT "stripe_local_balances"."available" FROM "stripe_local_balances"[0m
|
21042
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21043
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21044
|
+
[1m[35m (0.2ms)[0m COMMIT
|
21045
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
21046
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21047
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
21048
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21049
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21050
|
+
[1m[35m (0.2ms)[0m COMMIT
|
21051
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
21052
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21053
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
21054
|
+
[1m[35mStripeLocal::Plan Load (0.3ms)[0m SELECT "stripe_local_plans".* FROM "stripe_local_plans" WHERE "stripe_local_plans"."id" = 'New_Plan' LIMIT 1
|
21055
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21056
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "stripe_local_plans" ("amount", "created_at", "id", "interval", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", 2999], ["created_at", Sat, 30 Nov 2013 15:13:32 CST -06:00], ["id", "New_Plan"], ["interval", "month"], ["name", "New Plan"], ["updated_at", Sat, 30 Nov 2013 15:13:32 CST -06:00]]
|
21057
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21058
|
+
[1m[36m (1.4ms)[0m [1mALTER TABLE "stripe_local_discounts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_customers" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_transfers" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_cards" DISABLE TRIGGER ALL;ALTER TABLE "clients" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_invoices" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_plans" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_line_items" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_charges" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_coupons" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_transactions" DISABLE TRIGGER ALL;ALTER TABLE "stripe_local_balances" DISABLE TRIGGER ALL[0m
|
21059
|
+
[1m[35m (1.3ms)[0m select table_name from information_schema.views where table_schema = 'dummy_test'
|
21060
|
+
[1m[36m (41.8ms)[0m [1mTRUNCATE TABLE "stripe_local_discounts", "stripe_local_customers", "stripe_local_transfers", "stripe_local_cards", "clients", "stripe_local_subscriptions", "stripe_local_invoices", "stripe_local_plans", "stripe_local_line_items", "stripe_local_charges", "stripe_local_coupons", "stripe_local_transactions", "stripe_local_balances" RESTART IDENTITY CASCADE;[0m
|
21061
|
+
[1m[35m (0.6ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_discounts" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_transfers" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_cards" ENABLE TRIGGER ALL;ALTER TABLE "clients" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_customers" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_invoices" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_plans" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_line_items" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_charges" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_coupons" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_transactions" ENABLE TRIGGER ALL;ALTER TABLE "stripe_local_balances" ENABLE TRIGGER ALL
|
21062
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
21063
|
+
[1m[35mStripeLocal::Customer Load (0.5ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
21064
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21065
|
+
[1m[35mStripeLocal::Customer Load (0.2ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
21066
|
+
[1m[36mStripeLocal::Customer Load (0.2ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
21067
|
+
[1m[35mStripeLocal::Customer Load (0.2ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
21068
|
+
[1m[36mStripeLocal::Customer Load (0.2ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
21069
|
+
[1m[35mStripeLocal::Customer Load (0.2ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
21070
|
+
[1m[36mStripeLocal::Customer Load (0.4ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
21071
|
+
[1m[35mStripeLocal::Customer Load (0.2ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1
|
21072
|
+
[1m[36mStripeLocal::Customer Load (0.2ms)[0m [1mSELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" IS NULL LIMIT 1[0m
|
21073
|
+
[1m[35mSQL (4.2ms)[0m INSERT INTO "clients" ("created_at", "email", "name", "password", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["email", "test@test.com"], ["name", "Test Case"], ["password", "password"], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21074
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21075
|
+
[1m[35mStripeLocal::Customer Load (0.3ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" = 1 LIMIT 1
|
21076
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21077
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "stripe_local_cards" ("brand", "created_at", "customer_id", "cvc_check", "exp_month", "exp_year", "id", "last4", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["brand", "Visa"], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["customer_id", "cus_123"], ["cvc_check", "pass"], ["exp_month", 8], ["exp_year", 2014], ["id", "card_102Y2J1Cmf55uWiejglofO7j"], ["last4", "4242"], ["name", "Test Case"], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21078
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21079
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21080
|
+
[1m[36mSQL (1.2ms)[0m [1mINSERT INTO "stripe_local_subscriptions" ("created_at", "current_period_end", "current_period_start", "customer_id", "plan_id", "start", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["current_period_end", Thu, 10 Oct 2013 13:52:04 CDT -05:00], ["current_period_start", Tue, 10 Sep 2013 13:52:04 CDT -05:00], ["customer_id", "cus_123"], ["plan_id", "GIN100"], ["start", Tue, 10 Sep 2013 13:52:04 CDT -05:00], ["status", "active"], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21081
|
+
[1m[35m (0.3ms)[0m COMMIT
|
21082
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21083
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "stripe_local_customers" ("account_balance", "created_at", "default_card", "delinquent", "description", "email", "id", "model_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_balance", 0], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["default_card", "card_102Y2J1Cmf55uWiejglofO7j"], ["delinquent", false], ["description", "On September 10th, Test signed up for CA50."], ["email", "test@test.com"], ["id", "cus_123"], ["model_id", 1], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21084
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21085
|
+
[1m[35mStripeLocal::Customer Load (0.4ms)[0m SELECT "stripe_local_customers".* FROM "stripe_local_customers" WHERE "stripe_local_customers"."model_id" = 1 LIMIT 1
|
21086
|
+
[1m[36mStripeLocal::Subscription Load (0.5ms)[0m [1mSELECT "stripe_local_subscriptions".* FROM "stripe_local_subscriptions" WHERE "stripe_local_subscriptions"."customer_id" = 'cus_123' LIMIT 1[0m
|
21087
|
+
[1m[35mStripeLocal::Plan Load (0.4ms)[0m SELECT "stripe_local_plans".* FROM "stripe_local_plans" WHERE "stripe_local_plans"."id" = 'New_Plan' LIMIT 1
|
21088
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21089
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "stripe_local_plans" ("amount", "created_at", "id", "interval", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", 2999], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["id", "New_Plan"], ["interval", "month"], ["name", "New Plan"], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21090
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
21091
|
+
[1m[35m (0.2ms)[0m BEGIN
|
21092
|
+
[1m[36mSQL (1.7ms)[0m [1mINSERT INTO "stripe_local_charges" ("amount", "card_id", "created", "created_at", "customer_id", "id", "invoice_id", "paid", "transaction_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["amount", 9900], ["card_id", "cc_1eX7GyRo6wivEf"], ["created", Thu, 01 Aug 2013 18:08:14 CDT -05:00], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["customer_id", "cus_1eX7onie2gq8m1"], ["id", "ch_2wiSyZQkZw8F50"], ["invoice_id", "in_2whTLSkV2ItHAv"], ["paid", true], ["transaction_id", "txn_2wiSFq1N6BTZTQ"], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21093
|
+
[1m[35m (0.3ms)[0m COMMIT
|
21094
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
21095
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21096
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21097
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21098
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21099
|
+
[1m[35m (0.3ms)[0m COMMIT
|
21100
|
+
[1m[36m (0.2ms)[0m [1mSELECT "stripe_local_balances"."pending" FROM "stripe_local_balances"[0m
|
21101
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21102
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21103
|
+
[1m[35m (0.3ms)[0m COMMIT
|
21104
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21105
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21106
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21107
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "stripe_local_balances"
|
21108
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21109
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 39800], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 0], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21110
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21111
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "stripe_local_balances"
|
21112
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21113
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21114
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21115
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21116
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21117
|
+
[1m[35m (0.3ms)[0m COMMIT
|
21118
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21119
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21120
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21121
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21122
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21123
|
+
[1m[35m (0.3ms)[0m COMMIT
|
21124
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21125
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21126
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
21127
|
+
[1m[35m (0.0ms)[0m BEGIN
|
21128
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21129
|
+
[1m[35m (0.2ms)[0m COMMIT
|
21130
|
+
[1m[36m (0.1ms)[0m [1mSELECT "stripe_local_balances"."available" FROM "stripe_local_balances"[0m
|
21131
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21132
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21133
|
+
[1m[35m (0.2ms)[0m COMMIT
|
21134
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
21135
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21136
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
21137
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "stripe_local_balances"
|
21138
|
+
[1m[36mStripeLocal::Balance Load (0.3ms)[0m [1mSELECT "stripe_local_balances".* FROM "stripe_local_balances" ORDER BY "stripe_local_balances"."id" DESC LIMIT 1[0m
|
21139
|
+
[1m[35mStripeLocal::Balance Load (0.2ms)[0m SELECT "stripe_local_balances".* FROM "stripe_local_balances" ORDER BY "stripe_local_balances"."id" DESC LIMIT 1
|
21140
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "stripe_local_balances" SET "updated_at" = '2013-12-01 21:17:41.767251' WHERE "stripe_local_balances"."id" = 13[0m
|
21141
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "stripe_local_balances"
|
21142
|
+
[1m[36mStripeLocal::Balance Load (0.2ms)[0m [1mSELECT "stripe_local_balances".* FROM "stripe_local_balances" ORDER BY "stripe_local_balances"."id" DESC LIMIT 1[0m
|
21143
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21144
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["available", 9900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 29900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21145
|
+
[1m[35m (0.3ms)[0m COMMIT
|
21146
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21147
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stripe_local_balances" ("available", "created_at", "pending", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["available", 19900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["pending", 19900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21148
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
21149
|
+
[1m[35m (0.1ms)[0m SELECT "stripe_local_balances"."available" FROM "stripe_local_balances"
|
21150
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21151
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stripe_local_cards" ("brand", "created_at", "customer_id", "cvc_check", "exp_month", "exp_year", "id", "last4", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["brand", "Visa"], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["customer_id", "cus_2J7PZ8ncCbR10Z"], ["cvc_check", "pass"], ["exp_month", 1], ["exp_year", 2014], ["id", "cc_2J7Pscoh4jvFjJ"], ["last4", "4242"], ["name", "Connor Tumbleson"], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21152
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21153
|
+
[1m[35m (0.2ms)[0m BEGIN
|
21154
|
+
[1m[36mSQL (1.3ms)[0m [1mINSERT INTO "stripe_local_line_items" ("amount", "created_at", "id", "invoice_id", "period_end", "period_start", "plan_id", "proration", "quantity", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["amount", 9900], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["id", "su_1bfTBoL3o7blah"], ["invoice_id", "in_2blahblahagain"], ["period_end", Thu, 06 Jun 2013 18:23:47 CDT -05:00], ["period_start", Tue, 07 May 2013 18:23:47 CDT -05:00], ["plan_id", "HR99"], ["proration", false], ["quantity", 1], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21155
|
+
[1m[35m (0.3ms)[0m COMMIT
|
21156
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21157
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "stripe_local_invoices" ("amount_due", "attempt_count", "attempted", "charge_id", "closed", "created_at", "customer_id", "date", "discount", "ending_balance", "id", "paid", "period_end", "period_start", "starting_balance", "subtotal", "total", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18) RETURNING "id" [["amount_due", 9900], ["attempt_count", 0], ["attempted", true], ["charge_id", "ch_blahblahblah"], ["closed", true], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["customer_id", "cus_1A3zUmx7NpUgrT"], ["date", Tue, 07 May 2013 18:23:47 CDT -05:00], ["discount", nil], ["ending_balance", 0], ["id", "in_2blahblahagain"], ["paid", true], ["period_end", Tue, 07 May 2013 18:23:47 CDT -05:00], ["period_start", Tue, 07 May 2013 18:23:47 CDT -05:00], ["starting_balance", 0], ["subtotal", 9900], ["total", 9900], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21158
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
21159
|
+
[1m[35mStripeLocal::LineItem Load (0.7ms)[0m SELECT "stripe_local_line_items".* FROM "stripe_local_line_items" WHERE "stripe_local_line_items"."invoice_id" = $1 [["invoice_id", "in_2blahblahagain"]]
|
21160
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21161
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "stripe_local_subscriptions" ("created_at", "current_period_end", "current_period_start", "customer_id", "plan_id", "start", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["current_period_end", Wed, 11 Dec 2013 15:32:46 CST -06:00], ["current_period_start", Mon, 11 Nov 2013 15:32:46 CST -06:00], ["customer_id", "cus_2vIuZmAfWK89Yk"], ["plan_id", "HR99"], ["start", Mon, 11 Nov 2013 15:32:46 CST -06:00], ["status", "active"], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21162
|
+
[1m[36m (0.5ms)[0m [1mCOMMIT[0m
|
21163
|
+
[1m[35m (0.1ms)[0m BEGIN
|
21164
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "stripe_local_transactions" ("amount", "available_on", "created", "created_at", "description", "fee", "id", "net", "source_id", "source_type", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id"[0m [["amount", -100], ["available_on", Mon, 07 Oct 2013 05:01:01 CDT -05:00], ["created", Mon, 30 Sep 2013 05:01:01 CDT -05:00], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["description", "a dollar for Don Atello"], ["fee", 25], ["id", "txn_2fOGkiBkDgpObU"], ["net", -125], ["source_id", "tr_2fOGfKABdHu3uf"], ["source_type", "transfer"], ["status", "available"], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21165
|
+
[1m[35m (0.4ms)[0m COMMIT
|
21166
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
21167
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "stripe_local_transfers" ("amount", "created_at", "date", "description", "id", "status", "transaction_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["amount", 100], ["created_at", Sat, 30 Nov 2013 15:17:41 CST -06:00], ["date", Mon, 30 Sep 2013 05:01:01 CDT -05:00], ["description", "a dollar for Don Atello"], ["id", "tr_2fOGfKABdHu3uf"], ["status", "paid"], ["transaction_id", "txn_2fOGkiBkDgpObU"], ["updated_at", Sat, 30 Nov 2013 15:17:41 CST -06:00]]
|
21168
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
@@ -11,15 +11,15 @@ describe StripeLocal::Customer do
|
|
11
11
|
stripe_customer.should_receive :update_subscription
|
12
12
|
StripeLocal::Customer.should_receive( :create ).and_call_original
|
13
13
|
StripeLocal::Customer.should_receive( :normalize ).and_call_original
|
14
|
-
client.signup( {card: "token", plan: "
|
14
|
+
client.signup( {card: "token", plan: "GIN100"} )
|
15
15
|
|
16
16
|
client.customer.id.should eq "cus_123"
|
17
17
|
|
18
18
|
client.subscription.plan_id.should eq "GIN100"
|
19
19
|
end
|
20
20
|
|
21
|
-
it "
|
22
|
-
StripeLocal
|
21
|
+
it "derives its model association via the StripeLocal method :model_class" do
|
22
|
+
StripeLocal.model_class.new.should be_a Client
|
23
23
|
end
|
24
24
|
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe_local
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Cohen
|
@@ -213,7 +213,9 @@ files:
|
|
213
213
|
- app/views/layouts/stripe_local/application.html.erb
|
214
214
|
- config/routes.rb
|
215
215
|
- db/migrate/20131122063517_load_stripe_tables.rb
|
216
|
+
- lib/stripe_local/association_methods.rb
|
216
217
|
- lib/stripe_local/engine.rb
|
218
|
+
- lib/stripe_local/instance_delegation.rb
|
217
219
|
- lib/stripe_local/version.rb
|
218
220
|
- lib/stripe_local/webhook/subscriber.rb
|
219
221
|
- lib/stripe_local/webhook/types.rb
|