fake_stripe 0.0.10.6 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10a2cf4c05b1a3c90ac7a05be5dd502d8d0cd224
4
- data.tar.gz: ea683e8f5cefd713c30339a6c205c390663083fb
3
+ metadata.gz: b486132c944df168023b4bd2122003947b816187
4
+ data.tar.gz: f6721313615796a5d5f0043db4a2925c65f21df0
5
5
  SHA512:
6
- metadata.gz: 69b3937762a83d62ceba71748de5d6d8896c7a2a58e19476951a76a37f30a8cee99c530fdcc69cb8d6f6a6b1fdf956866025f4e40b994a0a5a7fb4f41eecbe96
7
- data.tar.gz: 4d4879697a1509f87d52602e125efd2f2bf30ffff673ab2d4767130c15749e9506a6bebdf6bf00bc80075419fa5306450adac5c0cd5b930ffc856989841b989d
6
+ metadata.gz: ccd1583b3797681682c88427d2519b6183eb851b0fd4de76fe801000232b147dc0a5ffc289b4dfce88a88d24b300fe1898cbc90e57ced9fd24f09d6af82c3dfa
7
+ data.tar.gz: 841fdc50155438bf4fa3ad8985eb3df8240a5f0c6d2466cd398a85cf07149ec03b9425b0319ef1f64ad0fc97404f75e73bf700163d6e4ec005143a21bfafff42
data/README.md CHANGED
@@ -21,12 +21,19 @@ end
21
21
 
22
22
  Remember to run `bundle install`.
23
23
 
24
+ ### Rails 5 Compatibility
25
+
26
+ `fake_stripe` depends on Sinatra, which is currently in the process of being
27
+ upgraded to use Rack 2.0, a requirement for compatibility with Rails 5. This
28
+ should be resolved once Sinatra 2.0 is officially released; in the meantime,
29
+ you can add `gem 'sinatra', '2.0.0.beta2'` to the `:test` group in your Gemfile.
30
+
24
31
  ### Stripe settings
25
32
 
26
33
  Set the `STRIPE_JS_HOST` constant in an initializer:
27
34
 
28
35
  ```ruby
29
- # config/initilialzers/stripe.rb
36
+ # config/initializers/stripe.rb
30
37
  Stripe.api_key = ENV['STRIPE_API_KEY']
31
38
 
32
39
  unless defined? STRIPE_JS_HOST
@@ -34,13 +41,22 @@ unless defined? STRIPE_JS_HOST
34
41
  end
35
42
  ```
36
43
 
37
- Include the Stripe JavaScript in your application template:
44
+ Include the Stripe JavaScript in your application template.
45
+
46
+ If you're using Stripe.js v1:
38
47
 
39
48
  ```rhtml
40
49
  # app/views/layouts/application.html.erb
41
50
  <%= javascript_include_tag "#{STRIPE_JS_HOST}/v1/" %>
42
51
  ```
43
52
 
53
+ Or if you're using Stripe.js v2:
54
+
55
+ ```rhtml
56
+ # app/views/layouts/application.html.erb
57
+ <%= javascript_include_tag "#{STRIPE_JS_HOST}/v2/" %>
58
+ ```
59
+
44
60
  When the test suite runs `fake_stripe` will override the address for
45
61
  `STRIPE_JS_HOST` and serve up a local version of [Stripe.js](https://stripe.com/docs/stripe.js).
46
62
 
@@ -1,6 +1,19 @@
1
1
  {
2
2
  "id": "sub_3ewdhCIki3FxWt",
3
- "plan": "basic",
3
+ "plan": {
4
+ "interval": "month",
5
+ "name": "New plan name123",
6
+ "created": 1386247539,
7
+ "amount": 2000,
8
+ "currency": "usd",
9
+ "id": "gold21323",
10
+ "object": "plan",
11
+ "livemode": false,
12
+ "interval_count": 1,
13
+ "trial_period_days": null,
14
+ "metadata": {
15
+ }
16
+ },
4
17
  "object": "subscription",
5
18
  "start": 1394732152,
6
19
  "status": "active",
@@ -25,6 +25,7 @@
25
25
  "address_zip": null,
26
26
  "address_country": null,
27
27
  "cvc_check": "pass",
28
+ "dynamic_last4": null,
28
29
  "address_line1_check": null,
29
30
  "address_zip_check": null
30
31
  },
@@ -16,6 +16,7 @@
16
16
  "address_zip": null,
17
17
  "address_country": null,
18
18
  "cvc_check": null,
19
+ "dynamic_last4": null,
19
20
  "address_line1_check": null,
20
21
  "address_zip_check": null
21
22
  }
@@ -9,6 +9,7 @@
9
9
  "id": "card_103eog2eZvKYlo2CoLfqGwa4",
10
10
  "object": "card",
11
11
  "last4": "4242",
12
+ "dynamic_last4": null,
12
13
  "brand": "Visa",
13
14
  "exp_month": 8,
14
15
  "exp_year": 2015,
@@ -51,33 +51,5 @@
51
51
  "discount": null,
52
52
  "account_balance": 0,
53
53
  "currency": "usd",
54
- "cards": {
55
- "object": "list",
56
- "count": 1,
57
- "url": "/v1/customers/abcdefghijklmnop/cards",
58
- "data": [
59
- {
60
- "id": "card_1234567890ABCDEFghijklmn",
61
- "object": "card",
62
- "last4": "4242",
63
- "brand": "Visa",
64
- "exp_month": 10,
65
- "exp_year": 2016,
66
- "fingerprint": "ZYXWVUTSRQPONMLK",
67
- "customer": "abcdefghijklmnop",
68
- "country": "US",
69
- "name": "ralph@example.com",
70
- "address_line1": null,
71
- "address_line2": null,
72
- "address_city": null,
73
- "address_state": null,
74
- "address_zip": null,
75
- "address_country": null,
76
- "cvc_check": "pass",
77
- "address_line1_check": null,
78
- "address_zip_check": null
79
- }
80
- ]
81
- },
82
- "default_card": "card_1234567890ABCDEFghijklmn"
54
+ "default_source": "card_1234567890ABCDEFghijklmn"
83
55
  }
@@ -1,6 +1,19 @@
1
1
  {
2
2
  "id": "sub_3ewdhCIki3FxWt",
3
- "plan": "basic",
3
+ "plan": {
4
+ "interval": "month",
5
+ "name": "New plan name123",
6
+ "created": 1386247539,
7
+ "amount": 2000,
8
+ "currency": "usd",
9
+ "id": "gold21323",
10
+ "object": "plan",
11
+ "livemode": false,
12
+ "interval_count": 1,
13
+ "trial_period_days": null,
14
+ "metadata": {
15
+ }
16
+ },
4
17
  "object": "subscription",
5
18
  "start": 1394732152,
6
19
  "status": "active",
@@ -7,6 +7,7 @@
7
7
  "id": "card_103ewd2eZvKYlo2CzCsKfISF",
8
8
  "object": "card",
9
9
  "last4": "0002",
10
+ "dynamic_last4": null,
10
11
  "brand": "Visa",
11
12
  "exp_month": 5,
12
13
  "exp_year": 2015,
@@ -28,6 +29,7 @@
28
29
  "id": "card_103ewd2eZvKYlo2CzCsKfISG",
29
30
  "object": "card",
30
31
  "last4": "0003",
32
+ "dynamic_last4": null,
31
33
  "brand": "Visa",
32
34
  "exp_month": 5,
33
35
  "exp_year": 2015,
@@ -49,6 +51,7 @@
49
51
  "id": "card_103ewd2eZvKYlo2CzCsKfISH",
50
52
  "object": "card",
51
53
  "last4": "0004",
54
+ "dynamic_last4": null,
52
55
  "brand": "Visa",
53
56
  "exp_month": 5,
54
57
  "exp_year": 2015,
@@ -16,6 +16,7 @@
16
16
  "id": "card_103ewb2eZvKYlo2CMKnx53Vg",
17
17
  "object": "card",
18
18
  "last4": "4242",
19
+ "dynamic_last4": null,
19
20
  "brand": "Visa",
20
21
  "exp_month": 1,
21
22
  "exp_year": 2050,
@@ -67,6 +68,7 @@
67
68
  "id": "card_103ewb2eZvKYlo2CMKnx53Vh",
68
69
  "object": "card",
69
70
  "last4": "4242",
71
+ "dynamic_last4": null,
70
72
  "brand": "Visa",
71
73
  "exp_month": 1,
72
74
  "exp_year": 2050,
@@ -111,6 +113,7 @@
111
113
  "id": "card_103ewb2eZvKYlo2CMKnx53Vi",
112
114
  "object": "card",
113
115
  "last4": "4242",
116
+ "dynamic_last4": null,
114
117
  "brand": "Visa",
115
118
  "exp_month": 1,
116
119
  "exp_year": 2050,
@@ -23,15 +23,16 @@
23
23
  "discount": null,
24
24
  "account_balance": 0,
25
25
  "currency": "usd",
26
- "cards": {
26
+ "sources": {
27
27
  "object": "list",
28
28
  "count": 1,
29
- "url": "/v1/customers/abcdefghijklmnop/cards",
29
+ "url": "/v1/customers/abcdefghijklmnop/sources",
30
30
  "data": [
31
31
  {
32
32
  "id": "card_1234567890ABCDEFghijklmn",
33
33
  "object": "card",
34
34
  "last4": "4242",
35
+ "dynamic_last4": null,
35
36
  "brand": "Visa",
36
37
  "exp_month": 10,
37
38
  "exp_year": 2016,
@@ -51,7 +52,7 @@
51
52
  }
52
53
  ]
53
54
  },
54
- "default_card": "card_1234567890ABCDEFghijklmn"
55
+ "default_source": "card_1234567890ABCDEFghijklmn"
55
56
  },
56
57
  {
57
58
  "object": "customer",
@@ -73,15 +74,16 @@
73
74
  "discount": null,
74
75
  "account_balance": 0,
75
76
  "currency": "usd",
76
- "cards": {
77
+ "sources": {
77
78
  "object": "list",
78
79
  "count": 1,
79
- "url": "/v1/customers/cus_3ewUPsNuSVb5hF/cards",
80
+ "url": "/v1/customers/cus_3ewUPsNuSVb5hF/sources",
80
81
  "data": [
81
82
  {
82
83
  "id": "card_103ewU2eZvKYlo2CVToIWv6R",
83
84
  "object": "card",
84
85
  "last4": "4242",
86
+ "dynamic_last4": null,
85
87
  "brand": "Visa",
86
88
  "exp_month": 10,
87
89
  "exp_year": 2016,
@@ -101,7 +103,7 @@
101
103
  }
102
104
  ]
103
105
  },
104
- "default_card": "card_103ewU2eZvKYlo2CVToIWv6R"
106
+ "default_source": "card_103ewU2eZvKYlo2CVToIWv6R"
105
107
  },
106
108
  {
107
109
  "object": "customer",
@@ -123,15 +125,16 @@
123
125
  "discount": null,
124
126
  "account_balance": 0,
125
127
  "currency": "usd",
126
- "cards": {
128
+ "sources": {
127
129
  "object": "list",
128
130
  "count": 1,
129
- "url": "/v1/customers/cus_3ewUPsNuSVb5hG/cards",
131
+ "url": "/v1/customers/cus_3ewUPsNuSVb5hG/sources",
130
132
  "data": [
131
133
  {
132
134
  "id": "card_103ewU2eZvKYlo2CVToIWv6S",
133
135
  "object": "card",
134
136
  "last4": "4242",
137
+ "dynamic_last4": null,
135
138
  "brand": "Visa",
136
139
  "exp_month": 10,
137
140
  "exp_year": 2016,
@@ -151,7 +154,7 @@
151
154
  }
152
155
  ]
153
156
  },
154
- "default_card": "card_103ewU2eZvKYlo2CVToIWv6S"
157
+ "default_source": "card_103ewU2eZvKYlo2CVToIWv6S"
155
158
  }
156
159
  ]
157
160
  }
@@ -22,6 +22,7 @@
22
22
  "id": "card_103ewb2eZvKYlo2CMKnx53Vg",
23
23
  "object": "card",
24
24
  "last4": "4242",
25
+ "dynamic_last4": null,
25
26
  "brand": "Visa",
26
27
  "exp_month": 1,
27
28
  "exp_year": 2050,
@@ -77,6 +78,7 @@
77
78
  "id": "card_103ewb2eZvKYlo2CMKnx53Vh",
78
79
  "object": "card",
79
80
  "last4": "4242",
81
+ "dynamic_last4": null,
80
82
  "brand": "Visa",
81
83
  "exp_month": 1,
82
84
  "exp_year": 2050,
@@ -132,6 +134,7 @@
132
134
  "id": "card_103ewb2eZvKYlo2CMKnx53Vi",
133
135
  "object": "card",
134
136
  "last4": "4242",
137
+ "dynamic_last4": null,
135
138
  "brand": "Visa",
136
139
  "exp_month": 1,
137
140
  "exp_year": 2050,
@@ -11,6 +11,7 @@
11
11
  "id": "card_103ewb2eZvKYlo2CMKnx53Vg",
12
12
  "object": "card",
13
13
  "last4": "4242",
14
+ "dynamic_last4": null,
14
15
  "brand": "Visa",
15
16
  "exp_month": 1,
16
17
  "exp_year": 2050,
@@ -2,6 +2,7 @@
2
2
  "id": "card_103ewd2eZvKYlo2CzCsKfISF",
3
3
  "object": "card",
4
4
  "last4": "0002",
5
+ "dynamic_last4": null,
5
6
  "brand": "Visa",
6
7
  "exp_month": 5,
7
8
  "exp_year": 2015,
@@ -11,6 +11,7 @@
11
11
  "id": "card_103ewb2eZvKYlo2CMKnx53Vg",
12
12
  "object": "card",
13
13
  "last4": "4242",
14
+ "dynamic_last4": null,
14
15
  "brand": "Visa",
15
16
  "exp_month": 1,
16
17
  "exp_year": 2050,
@@ -8,44 +8,48 @@
8
8
  "delinquent": false,
9
9
  "metadata": {
10
10
  },
11
- "subscriptions": {
12
- "object": "list",
13
- "count": 0,
14
- "url": "/v1/customers/abcdefghijklmnop/subscriptions",
15
- "data": [
16
-
17
- ]
18
- },
19
- "discount": null,
20
- "account_balance": 0,
21
- "currency": "usd",
22
- "cards": {
11
+ "sources": {
23
12
  "object": "list",
24
- "count": 1,
25
- "url": "/v1/customers/abcdefghijklmnop/cards",
26
13
  "data": [
27
14
  {
28
15
  "id": "card_1234567890ABCDEFghijklmn",
29
16
  "object": "card",
30
- "last4": "4242",
31
- "brand": "Visa",
32
- "exp_month": 10,
33
- "exp_year": 2016,
34
- "fingerprint": "ZYXWVUTSRQPONMLK",
35
- "customer": "abcdefghijklmnop",
36
- "country": "US",
37
- "name": "ralph@example.com",
17
+ "address_city": null,
18
+ "address_country": null,
38
19
  "address_line1": null,
20
+ "address_line1_check": null,
39
21
  "address_line2": null,
40
- "address_city": null,
41
22
  "address_state": null,
42
23
  "address_zip": null,
43
- "address_country": null,
24
+ "address_zip_check": null,
25
+ "brand": "Visa",
26
+ "country": "US",
27
+ "customer": "abcdefghijklmnop",
44
28
  "cvc_check": "pass",
45
- "address_line1_check": null,
46
- "address_zip_check": null
29
+ "dynamic_last4": null,
30
+ "exp_month": 10,
31
+ "exp_year": 2016,
32
+ "funding": "credit",
33
+ "last4": "4242",
34
+ "metadata": {},
35
+ "name": null,
36
+ "tokenization_method": null
47
37
  }
38
+ ],
39
+ "has_more": false,
40
+ "total_count": 1,
41
+ "url": "/v1/customers/abcdefghijklmnop/sources"
42
+ },
43
+ "subscriptions": {
44
+ "object": "list",
45
+ "count": 0,
46
+ "url": "/v1/customers/abcdefghijklmnop/subscriptions",
47
+ "data": [
48
+
48
49
  ]
49
50
  },
50
- "default_card": "card_1234567890ABCDEFghijklmn"
51
+ "discount": null,
52
+ "account_balance": 0,
53
+ "currency": "usd",
54
+ "default_source": "card_1234567890ABCDEFghijklmn"
51
55
  }
@@ -17,6 +17,7 @@
17
17
  "id": "card_103ewb2eZvKYlo2CMKnx53Vg",
18
18
  "object": "card",
19
19
  "last4": "4242",
20
+ "dynamic_last4": null,
20
21
  "brand": "Visa",
21
22
  "exp_month": 1,
22
23
  "exp_year": 2050,
@@ -9,6 +9,7 @@
9
9
  "id": "card_103eog2eZvKYlo2CoLfqGwa4",
10
10
  "object": "card",
11
11
  "last4": "4242",
12
+ "dynamic_last4": null,
12
13
  "brand": "Visa",
13
14
  "exp_month": 8,
14
15
  "exp_year": 2015,
@@ -2,6 +2,7 @@
2
2
  "id": "card_103ewd2eZvKYlo2CzCsKfISF",
3
3
  "object": "card",
4
4
  "last4": "0002",
5
+ "dynamic_last4": null,
5
6
  "brand": "Visa",
6
7
  "exp_month": 5,
7
8
  "exp_year": 2015,
@@ -11,6 +11,7 @@
11
11
  "id": "card_103ewb2eZvKYlo2CMKnx53Vg",
12
12
  "object": "card",
13
13
  "last4": "4242",
14
+ "dynamic_last4": null,
14
15
  "brand": "Visa",
15
16
  "exp_month": 1,
16
17
  "exp_year": 2050,
@@ -3,49 +3,53 @@
3
3
  "created": 1394731627,
4
4
  "id": "abcdefghijklmnop",
5
5
  "livemode": false,
6
- "description": "Customer for test@example.com",
6
+ "description": null,
7
7
  "email": null,
8
8
  "delinquent": false,
9
9
  "metadata": {
10
10
  },
11
- "subscriptions": {
12
- "object": "list",
13
- "count": 0,
14
- "url": "/v1/customers/abcdefghijklmnop/subscriptions",
15
- "data": [
16
-
17
- ]
18
- },
19
- "discount": null,
20
- "account_balance": 0,
21
- "currency": "usd",
22
- "cards": {
11
+ "sources": {
23
12
  "object": "list",
24
- "count": 1,
25
- "url": "/v1/customers/abcdefghijklmnop/cards",
26
13
  "data": [
27
14
  {
28
15
  "id": "card_1234567890ABCDEFghijklmn",
29
16
  "object": "card",
30
- "last4": "4242",
31
- "brand": "Visa",
32
- "exp_month": 10,
33
- "exp_year": 2016,
34
- "fingerprint": "ZYXWVUTSRQPONMLK",
35
- "customer": "abcdefghijklmnop",
36
- "country": "US",
37
- "name": "ralph@example.com",
17
+ "address_city": null,
18
+ "address_country": null,
38
19
  "address_line1": null,
20
+ "address_line1_check": null,
39
21
  "address_line2": null,
40
- "address_city": null,
41
22
  "address_state": null,
42
23
  "address_zip": null,
43
- "address_country": null,
24
+ "address_zip_check": null,
25
+ "brand": "Visa",
26
+ "country": "US",
27
+ "customer": "abcdefghijklmnop",
44
28
  "cvc_check": "pass",
45
- "address_line1_check": null,
46
- "address_zip_check": null
29
+ "dynamic_last4": null,
30
+ "exp_month": 10,
31
+ "exp_year": 2016,
32
+ "funding": "credit",
33
+ "last4": "4242",
34
+ "metadata": {},
35
+ "name": null,
36
+ "tokenization_method": null
47
37
  }
38
+ ],
39
+ "has_more": false,
40
+ "total_count": 1,
41
+ "url": "/v1/customers/abcdefghijklmnop/sources"
42
+ },
43
+ "subscriptions": {
44
+ "object": "list",
45
+ "count": 0,
46
+ "url": "/v1/customers/abcdefghijklmnop/subscriptions",
47
+ "data": [
48
+
48
49
  ]
49
50
  },
50
- "default_card": "card_1234567890ABCDEFghijklmn"
51
+ "discount": null,
52
+ "account_balance": 0,
53
+ "currency": "usd",
54
+ "default_source": "card_1234567890ABCDEFghijklmn"
51
55
  }
@@ -1,6 +1,19 @@
1
1
  {
2
2
  "id": "sub_3ewdhCIki3FxWt",
3
- "plan": "basic",
3
+ "plan": {
4
+ "interval": "month",
5
+ "name": "New plan name123",
6
+ "created": 1386247539,
7
+ "amount": 2000,
8
+ "currency": "usd",
9
+ "id": "gold21323",
10
+ "object": "plan",
11
+ "livemode": false,
12
+ "interval_count": 1,
13
+ "trial_period_days": null,
14
+ "metadata": {
15
+ }
16
+ },
4
17
  "object": "subscription",
5
18
  "start": 1394732152,
6
19
  "status": "active",
@@ -17,6 +17,11 @@ module FakeStripe
17
17
  json_response 200, fixture('update_charge')
18
18
  end
19
19
 
20
+ post '/v1/refunds' do
21
+ FakeStripe.refund_count += 1
22
+ json_response 200, fixture('refund_charge')
23
+ end
24
+
20
25
  post '/v1/charges/:charge_id/refund' do
21
26
  FakeStripe.refund_count += 1
22
27
  json_response 200, fixture('refund_charge')
@@ -53,51 +58,84 @@ module FakeStripe
53
58
  end
54
59
 
55
60
  # Cards
56
- post '/v1/customers/:customer_id/cards' do
61
+ post '/v1/customers/:customer_id/sources' do
57
62
  FakeStripe.card_count += 1
58
63
  json_response 200, fixture('create_card')
59
64
  end
60
65
 
61
- get '/v1/customers/:customer_id/cards/:card_id' do
66
+ get '/v1/customers/:customer_id/sources/:card_id' do
62
67
  json_response 200, fixture('retrieve_card')
63
68
  end
64
69
 
65
- post '/v1/customers/:customer_id/cards/:card_id' do
70
+ post '/v1/customers/:customer_id/sources/:card_id' do
66
71
  json_response 200, fixture('update_card')
67
72
  end
68
73
 
69
- delete '/v1/customers/:customer_id/cards/:card_id' do
74
+ delete '/v1/customers/:customer_id/sources/:card_id' do
70
75
  json_response 200, fixture('delete_card')
71
76
  end
72
77
 
73
- get '/v1/customers/:customer_id/cards' do
78
+ get '/v1/customers/:customer_id/sources' do
74
79
  json_response 200, fixture('list_cards')
75
80
  end
76
81
 
77
- get '/v1/customers/:customer_id/sources/:id' do
78
- json_response 200, fixture('retrieve_card')
82
+ # Subscriptions
83
+ [
84
+ '/v1/subscriptions',
85
+ '/v1/customers/:customer_id/subscriptions',
86
+ ].each do |path|
87
+ post path do
88
+ FakeStripe.subscription_count += 1
89
+ json_response 200, fixture('create_subscription')
90
+ end
79
91
  end
80
92
 
81
- # Subscriptions
82
- post '/v1/customers/:customer_id/subscriptions' do
83
- FakeStripe.subscription_count += 1
84
- json_response 200, fixture('create_subscription')
93
+ [
94
+ '/v1/subscriptions/:subscription_id',
95
+ '/v1/customers/:customer_id/subscriptions/:subscription_id',
96
+ ].each do |path|
97
+ get path do
98
+ json_response 200, fixture('retrieve_subscription')
99
+ end
85
100
  end
86
101
 
87
- get '/v1/customers/:customer_id/subscriptions/:subscription_id' do
88
- json_response 200, fixture('retrieve_subscription')
102
+ [
103
+ '/v1/subscriptions/:subscription_id',
104
+ '/v1/customers/:customer_id/subscriptions/:subscription_id',
105
+ ].each do |path|
106
+ post path do
107
+ json_response 200, fixture('update_subscription')
108
+ end
109
+ end
110
+
111
+ [
112
+ '/v1/subscriptions/:subscription_id',
113
+ '/v1/customers/:customer_id/subscriptions/:subscription_id',
114
+ ].each do |path|
115
+ delete path do
116
+ json_response 200, fixture('cancel_subscription')
117
+ end
118
+ end
119
+
120
+ [
121
+ '/v1/subscriptions',
122
+ '/v1/customers/:customer_id/subscriptions',
123
+ ].each do |path|
124
+ get path do
125
+ json_response 200, fixture('list_subscriptions')
126
+ end
89
127
  end
90
128
 
91
- post '/v1/customers/:customer_id/subscriptions/:subscription_id' do
92
- json_response 200, fixture('update_subscription')
129
+ get '/v1/subscriptions/:subscription_id' do
130
+ json_response 200, fixture('retrieve_subscription')
93
131
  end
94
132
 
95
- delete '/v1/customers/:customer_id/subscriptions/:subscription_id' do
96
- json_response 200, fixture('cancel_subscription')
133
+ post '/v1/subscriptions/:subscription_id' do
134
+ json_response 200, fixture('retrieve_subscription')
97
135
  end
98
136
 
99
- get '/v1/customers/:customer_id/subscriptions' do
100
- json_response 200, fixture('list_subscriptions')
137
+ post '/v1/subscriptions' do
138
+ json_response 200, fixture('retrieve_subscription')
101
139
  end
102
140
 
103
141
  # Plans
@@ -1,3 +1,3 @@
1
1
  module FakeStripe
2
- VERSION = '0.0.10.6'
2
+ VERSION = '0.0.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10.6
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harlow Ward
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-18 00:00:00.000000000 Z
11
+ date: 2017-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  version: '0'
208
208
  requirements: []
209
209
  rubyforge_project:
210
- rubygems_version: 2.5.1
210
+ rubygems_version: 2.6.8
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: A fake Stripe server.