stripe-ruby-mock 2.4.0 → 2.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env +2 -0
- data/.travis.yml +8 -4
- data/README.md +12 -5
- data/lib/stripe_mock/api/account_balance.rb +14 -0
- data/lib/stripe_mock/api/client.rb +4 -4
- data/lib/stripe_mock/api/conversion_rate.rb +14 -0
- data/lib/stripe_mock/api/errors.rb +25 -14
- data/lib/stripe_mock/api/instance.rb +6 -6
- data/lib/stripe_mock/api/webhooks.rb +5 -1
- data/lib/stripe_mock/client.rb +18 -2
- data/lib/stripe_mock/data/list.rb +14 -2
- data/lib/stripe_mock/data.rb +217 -56
- data/lib/stripe_mock/instance.rb +93 -8
- data/lib/stripe_mock/request_handlers/accounts.rb +34 -2
- data/lib/stripe_mock/request_handlers/balance.rb +17 -0
- data/lib/stripe_mock/request_handlers/balance_transactions.rb +18 -2
- data/lib/stripe_mock/request_handlers/charges.rb +25 -17
- data/lib/stripe_mock/request_handlers/coupons.rb +5 -4
- data/lib/stripe_mock/request_handlers/customers.rb +26 -8
- data/lib/stripe_mock/request_handlers/ephemeral_key.rb +13 -0
- data/lib/stripe_mock/request_handlers/external_accounts.rb +55 -0
- data/lib/stripe_mock/request_handlers/helpers/bank_account_helpers.rb +1 -1
- data/lib/stripe_mock/request_handlers/helpers/card_helpers.rb +9 -7
- data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +10 -6
- data/lib/stripe_mock/request_handlers/helpers/external_account_helpers.rb +49 -0
- data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +55 -15
- data/lib/stripe_mock/request_handlers/helpers/token_helpers.rb +2 -2
- data/lib/stripe_mock/request_handlers/invoices.rb +93 -14
- data/lib/stripe_mock/request_handlers/orders.rb +5 -5
- data/lib/stripe_mock/request_handlers/payouts.rb +32 -0
- data/lib/stripe_mock/request_handlers/plans.rb +1 -0
- data/lib/stripe_mock/request_handlers/products.rb +43 -0
- data/lib/stripe_mock/request_handlers/refunds.rb +10 -7
- data/lib/stripe_mock/request_handlers/subscription_items.rb +36 -0
- data/lib/stripe_mock/request_handlers/subscriptions.rb +95 -34
- data/lib/stripe_mock/request_handlers/tax_rates.rb +36 -0
- data/lib/stripe_mock/request_handlers/tokens.rb +9 -3
- data/lib/stripe_mock/request_handlers/transfers.rb +11 -5
- data/lib/stripe_mock/request_handlers/validators/param_validators.rb +10 -1
- data/lib/stripe_mock/server.rb +14 -1
- data/lib/stripe_mock/test_strategies/base.rb +7 -5
- data/lib/stripe_mock/test_strategies/live.rb +5 -0
- data/lib/stripe_mock/test_strategies/mock.rb +8 -0
- data/lib/stripe_mock/util.rb +8 -2
- data/lib/stripe_mock/version.rb +1 -1
- data/lib/stripe_mock/webhook_fixtures/account.updated.json +1 -1
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.funds_reinstated.json +88 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.funds_withdrawn.json +88 -0
- data/lib/stripe_mock/webhook_fixtures/charge.updated.json +58 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +40 -10
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +39 -10
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.trial_will_end.json +39 -10
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +40 -11
- data/lib/stripe_mock/webhook_fixtures/invoice.created.json +3 -2
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +1 -1
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +92 -85
- data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +3 -2
- data/lib/stripe_mock/webhook_fixtures/plan.created.json +1 -1
- data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +1 -1
- data/lib/stripe_mock/webhook_fixtures/plan.updated.json +1 -1
- data/lib/stripe_mock.rb +13 -0
- data/spec/instance_spec.rb +54 -4
- data/spec/integration_examples/prepare_error_examples.rb +6 -6
- data/spec/list_spec.rb +16 -3
- data/spec/readme_spec.rb +2 -0
- data/spec/server_spec.rb +6 -2
- data/spec/shared_stripe_examples/account_examples.rb +35 -0
- data/spec/shared_stripe_examples/balance_examples.rb +11 -0
- data/spec/shared_stripe_examples/balance_transaction_examples.rb +28 -0
- data/spec/shared_stripe_examples/bank_examples.rb +28 -1
- data/spec/shared_stripe_examples/card_examples.rb +10 -3
- data/spec/shared_stripe_examples/charge_examples.rb +73 -17
- data/spec/shared_stripe_examples/coupon_examples.rb +8 -2
- data/spec/shared_stripe_examples/customer_examples.rb +54 -2
- data/spec/shared_stripe_examples/dispute_examples.rb +19 -8
- data/spec/shared_stripe_examples/ephemeral_key_examples.rb +17 -0
- data/spec/shared_stripe_examples/error_mock_examples.rb +3 -3
- data/spec/shared_stripe_examples/external_account_examples.rb +170 -0
- data/spec/shared_stripe_examples/extra_features_examples.rb +2 -0
- data/spec/shared_stripe_examples/invoice_examples.rb +314 -51
- data/spec/shared_stripe_examples/payout_examples.rb +68 -0
- data/spec/shared_stripe_examples/plan_examples.rb +37 -5
- data/spec/shared_stripe_examples/product_example.rb +65 -0
- data/spec/shared_stripe_examples/recipient_examples.rb +7 -7
- data/spec/shared_stripe_examples/refund_examples.rb +17 -11
- data/spec/shared_stripe_examples/subscription_examples.rb +463 -33
- data/spec/shared_stripe_examples/subscription_items_examples.rb +75 -0
- data/spec/shared_stripe_examples/tax_rate_examples.rb +42 -0
- data/spec/shared_stripe_examples/transfer_examples.rb +72 -23
- data/spec/shared_stripe_examples/webhook_event_examples.rb +74 -5
- data/spec/spec_helper.rb +7 -6
- data/spec/stripe_mock_spec.rb +16 -3
- data/spec/support/stripe_examples.rb +7 -1
- data/spec/util_spec.rb +35 -1
- data/stripe-ruby-mock.gemspec +1 -1
- metadata +34 -7
- data/ChangeLog.rdoc +0 -4
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe-ruby-mock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gilbert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: stripe
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.0.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: multi_json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,19 +101,21 @@ executables:
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- .env
|
104
105
|
- .gitignore
|
105
106
|
- .rspec
|
106
107
|
- .travis.yml
|
107
|
-
- ChangeLog.rdoc
|
108
108
|
- Gemfile
|
109
109
|
- LICENSE.txt
|
110
110
|
- README.md
|
111
111
|
- Rakefile
|
112
112
|
- bin/stripe-mock-server
|
113
113
|
- lib/stripe_mock.rb
|
114
|
+
- lib/stripe_mock/api/account_balance.rb
|
114
115
|
- lib/stripe_mock/api/bank_tokens.rb
|
115
116
|
- lib/stripe_mock/api/card_tokens.rb
|
116
117
|
- lib/stripe_mock/api/client.rb
|
118
|
+
- lib/stripe_mock/api/conversion_rate.rb
|
117
119
|
- lib/stripe_mock/api/debug.rb
|
118
120
|
- lib/stripe_mock/api/errors.rb
|
119
121
|
- lib/stripe_mock/api/global_id_prefix.rb
|
@@ -134,6 +136,7 @@ files:
|
|
134
136
|
- lib/stripe_mock/errors/unsupported_request_error.rb
|
135
137
|
- lib/stripe_mock/instance.rb
|
136
138
|
- lib/stripe_mock/request_handlers/accounts.rb
|
139
|
+
- lib/stripe_mock/request_handlers/balance.rb
|
137
140
|
- lib/stripe_mock/request_handlers/balance_transactions.rb
|
138
141
|
- lib/stripe_mock/request_handlers/cards.rb
|
139
142
|
- lib/stripe_mock/request_handlers/charges.rb
|
@@ -141,21 +144,28 @@ files:
|
|
141
144
|
- lib/stripe_mock/request_handlers/coupons.rb
|
142
145
|
- lib/stripe_mock/request_handlers/customers.rb
|
143
146
|
- lib/stripe_mock/request_handlers/disputes.rb
|
147
|
+
- lib/stripe_mock/request_handlers/ephemeral_key.rb
|
144
148
|
- lib/stripe_mock/request_handlers/events.rb
|
149
|
+
- lib/stripe_mock/request_handlers/external_accounts.rb
|
145
150
|
- lib/stripe_mock/request_handlers/helpers/bank_account_helpers.rb
|
146
151
|
- lib/stripe_mock/request_handlers/helpers/card_helpers.rb
|
147
152
|
- lib/stripe_mock/request_handlers/helpers/charge_helpers.rb
|
148
153
|
- lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb
|
154
|
+
- lib/stripe_mock/request_handlers/helpers/external_account_helpers.rb
|
149
155
|
- lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb
|
150
156
|
- lib/stripe_mock/request_handlers/helpers/token_helpers.rb
|
151
157
|
- lib/stripe_mock/request_handlers/invoice_items.rb
|
152
158
|
- lib/stripe_mock/request_handlers/invoices.rb
|
153
159
|
- lib/stripe_mock/request_handlers/orders.rb
|
160
|
+
- lib/stripe_mock/request_handlers/payouts.rb
|
154
161
|
- lib/stripe_mock/request_handlers/plans.rb
|
162
|
+
- lib/stripe_mock/request_handlers/products.rb
|
155
163
|
- lib/stripe_mock/request_handlers/recipients.rb
|
156
164
|
- lib/stripe_mock/request_handlers/refunds.rb
|
157
165
|
- lib/stripe_mock/request_handlers/sources.rb
|
166
|
+
- lib/stripe_mock/request_handlers/subscription_items.rb
|
158
167
|
- lib/stripe_mock/request_handlers/subscriptions.rb
|
168
|
+
- lib/stripe_mock/request_handlers/tax_rates.rb
|
159
169
|
- lib/stripe_mock/request_handlers/tokens.rb
|
160
170
|
- lib/stripe_mock/request_handlers/transfers.rb
|
161
171
|
- lib/stripe_mock/request_handlers/validators/param_validators.rb
|
@@ -173,10 +183,13 @@ files:
|
|
173
183
|
- lib/stripe_mock/webhook_fixtures/balance.available.json
|
174
184
|
- lib/stripe_mock/webhook_fixtures/charge.dispute.closed.json
|
175
185
|
- lib/stripe_mock/webhook_fixtures/charge.dispute.created.json
|
186
|
+
- lib/stripe_mock/webhook_fixtures/charge.dispute.funds_reinstated.json
|
187
|
+
- lib/stripe_mock/webhook_fixtures/charge.dispute.funds_withdrawn.json
|
176
188
|
- lib/stripe_mock/webhook_fixtures/charge.dispute.updated.json
|
177
189
|
- lib/stripe_mock/webhook_fixtures/charge.failed.json
|
178
190
|
- lib/stripe_mock/webhook_fixtures/charge.refunded.json
|
179
191
|
- lib/stripe_mock/webhook_fixtures/charge.succeeded.json
|
192
|
+
- lib/stripe_mock/webhook_fixtures/charge.updated.json
|
180
193
|
- lib/stripe_mock/webhook_fixtures/coupon.created.json
|
181
194
|
- lib/stripe_mock/webhook_fixtures/coupon.deleted.json
|
182
195
|
- lib/stripe_mock/webhook_fixtures/customer.created.json
|
@@ -220,6 +233,7 @@ files:
|
|
220
233
|
- spec/readme_spec.rb
|
221
234
|
- spec/server_spec.rb
|
222
235
|
- spec/shared_stripe_examples/account_examples.rb
|
236
|
+
- spec/shared_stripe_examples/balance_examples.rb
|
223
237
|
- spec/shared_stripe_examples/balance_transaction_examples.rb
|
224
238
|
- spec/shared_stripe_examples/bank_examples.rb
|
225
239
|
- spec/shared_stripe_examples/bank_token_examples.rb
|
@@ -230,14 +244,20 @@ files:
|
|
230
244
|
- spec/shared_stripe_examples/coupon_examples.rb
|
231
245
|
- spec/shared_stripe_examples/customer_examples.rb
|
232
246
|
- spec/shared_stripe_examples/dispute_examples.rb
|
247
|
+
- spec/shared_stripe_examples/ephemeral_key_examples.rb
|
233
248
|
- spec/shared_stripe_examples/error_mock_examples.rb
|
249
|
+
- spec/shared_stripe_examples/external_account_examples.rb
|
234
250
|
- spec/shared_stripe_examples/extra_features_examples.rb
|
235
251
|
- spec/shared_stripe_examples/invoice_examples.rb
|
236
252
|
- spec/shared_stripe_examples/invoice_item_examples.rb
|
253
|
+
- spec/shared_stripe_examples/payout_examples.rb
|
237
254
|
- spec/shared_stripe_examples/plan_examples.rb
|
255
|
+
- spec/shared_stripe_examples/product_example.rb
|
238
256
|
- spec/shared_stripe_examples/recipient_examples.rb
|
239
257
|
- spec/shared_stripe_examples/refund_examples.rb
|
240
258
|
- spec/shared_stripe_examples/subscription_examples.rb
|
259
|
+
- spec/shared_stripe_examples/subscription_items_examples.rb
|
260
|
+
- spec/shared_stripe_examples/tax_rate_examples.rb
|
241
261
|
- spec/shared_stripe_examples/transfer_examples.rb
|
242
262
|
- spec/shared_stripe_examples/validation_examples.rb
|
243
263
|
- spec/shared_stripe_examples/webhook_event_examples.rb
|
@@ -284,6 +304,7 @@ test_files:
|
|
284
304
|
- spec/readme_spec.rb
|
285
305
|
- spec/server_spec.rb
|
286
306
|
- spec/shared_stripe_examples/account_examples.rb
|
307
|
+
- spec/shared_stripe_examples/balance_examples.rb
|
287
308
|
- spec/shared_stripe_examples/balance_transaction_examples.rb
|
288
309
|
- spec/shared_stripe_examples/bank_examples.rb
|
289
310
|
- spec/shared_stripe_examples/bank_token_examples.rb
|
@@ -294,14 +315,20 @@ test_files:
|
|
294
315
|
- spec/shared_stripe_examples/coupon_examples.rb
|
295
316
|
- spec/shared_stripe_examples/customer_examples.rb
|
296
317
|
- spec/shared_stripe_examples/dispute_examples.rb
|
318
|
+
- spec/shared_stripe_examples/ephemeral_key_examples.rb
|
297
319
|
- spec/shared_stripe_examples/error_mock_examples.rb
|
320
|
+
- spec/shared_stripe_examples/external_account_examples.rb
|
298
321
|
- spec/shared_stripe_examples/extra_features_examples.rb
|
299
322
|
- spec/shared_stripe_examples/invoice_examples.rb
|
300
323
|
- spec/shared_stripe_examples/invoice_item_examples.rb
|
324
|
+
- spec/shared_stripe_examples/payout_examples.rb
|
301
325
|
- spec/shared_stripe_examples/plan_examples.rb
|
326
|
+
- spec/shared_stripe_examples/product_example.rb
|
302
327
|
- spec/shared_stripe_examples/recipient_examples.rb
|
303
328
|
- spec/shared_stripe_examples/refund_examples.rb
|
304
329
|
- spec/shared_stripe_examples/subscription_examples.rb
|
330
|
+
- spec/shared_stripe_examples/subscription_items_examples.rb
|
331
|
+
- spec/shared_stripe_examples/tax_rate_examples.rb
|
305
332
|
- spec/shared_stripe_examples/transfer_examples.rb
|
306
333
|
- spec/shared_stripe_examples/validation_examples.rb
|
307
334
|
- spec/shared_stripe_examples/webhook_event_examples.rb
|
data/ChangeLog.rdoc
DELETED