stripe-ruby-mock 3.0.1 → 3.1.0

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.
Files changed (137) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/rspec_tests.yml +38 -0
  3. data/.rspec +2 -1
  4. data/CHANGELOG.md +62 -15
  5. data/Gemfile +1 -0
  6. data/README.md +5 -3
  7. data/lib/stripe_mock/api/client.rb +1 -1
  8. data/lib/stripe_mock/api/instance.rb +1 -1
  9. data/lib/stripe_mock/api/webhooks.rb +66 -25
  10. data/lib/stripe_mock/client.rb +2 -1
  11. data/lib/stripe_mock/data/list.rb +31 -6
  12. data/lib/stripe_mock/data.rb +201 -30
  13. data/lib/stripe_mock/instance.rb +12 -3
  14. data/lib/stripe_mock/request_handlers/account_links.rb +15 -0
  15. data/lib/stripe_mock/request_handlers/accounts.rb +17 -6
  16. data/lib/stripe_mock/request_handlers/charges.rb +11 -4
  17. data/lib/stripe_mock/request_handlers/checkout_session.rb +179 -0
  18. data/lib/stripe_mock/request_handlers/customers.rb +22 -13
  19. data/lib/stripe_mock/request_handlers/ephemeral_key.rb +1 -1
  20. data/lib/stripe_mock/request_handlers/events.rb +30 -3
  21. data/lib/stripe_mock/request_handlers/express_login_links.rb +15 -0
  22. data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +1 -0
  23. data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +36 -12
  24. data/lib/stripe_mock/request_handlers/invoices.rb +10 -4
  25. data/lib/stripe_mock/request_handlers/payment_intents.rb +13 -2
  26. data/lib/stripe_mock/request_handlers/payment_methods.rb +11 -4
  27. data/lib/stripe_mock/request_handlers/prices.rb +62 -0
  28. data/lib/stripe_mock/request_handlers/promotion_codes.rb +43 -0
  29. data/lib/stripe_mock/request_handlers/refunds.rb +13 -2
  30. data/lib/stripe_mock/request_handlers/setup_intents.rb +16 -9
  31. data/lib/stripe_mock/request_handlers/sources.rb +12 -6
  32. data/lib/stripe_mock/request_handlers/subscriptions.rb +120 -21
  33. data/lib/stripe_mock/request_handlers/tokens.rb +6 -4
  34. data/lib/stripe_mock/request_handlers/transfers.rb +12 -1
  35. data/lib/stripe_mock/request_handlers/validators/param_validators.rb +33 -4
  36. data/lib/stripe_mock/server.rb +2 -2
  37. data/lib/stripe_mock/test_strategies/base.rb +62 -10
  38. data/lib/stripe_mock/version.rb +1 -1
  39. data/lib/stripe_mock/webhook_fixtures/account.updated.json +1 -1
  40. data/lib/stripe_mock/webhook_fixtures/balance.available.json +27 -15
  41. data/lib/stripe_mock/webhook_fixtures/charge.captured.json +143 -0
  42. data/lib/stripe_mock/webhook_fixtures/charge.dispute.created.json +63 -16
  43. data/lib/stripe_mock/webhook_fixtures/charge.failed.json +49 -120
  44. data/lib/stripe_mock/webhook_fixtures/charge.refund.updated.json +35 -0
  45. data/lib/stripe_mock/webhook_fixtures/charge.refunded.json +145 -50
  46. data/lib/stripe_mock/webhook_fixtures/charge.succeeded.json +114 -43
  47. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.json +79 -0
  48. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.payment_mode.json +53 -0
  49. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.setup_mode.json +45 -0
  50. data/lib/stripe_mock/webhook_fixtures/customer.created.json +37 -46
  51. data/lib/stripe_mock/webhook_fixtures/customer.deleted.json +36 -32
  52. data/lib/stripe_mock/webhook_fixtures/customer.source.created.json +31 -22
  53. data/lib/stripe_mock/webhook_fixtures/customer.source.updated.json +36 -25
  54. data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +135 -47
  55. data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +134 -45
  56. data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +135 -56
  57. data/lib/stripe_mock/webhook_fixtures/customer.updated.json +38 -47
  58. data/lib/stripe_mock/webhook_fixtures/invoice.created.json +176 -49
  59. data/lib/stripe_mock/webhook_fixtures/invoice.finalized.json +171 -0
  60. data/lib/stripe_mock/webhook_fixtures/invoice.paid.json +171 -0
  61. data/lib/stripe_mock/webhook_fixtures/invoice.payment_action_required.json +171 -0
  62. data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +149 -83
  63. data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +149 -90
  64. data/lib/stripe_mock/webhook_fixtures/invoice.upcoming.json +70 -0
  65. data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +178 -50
  66. data/lib/stripe_mock/webhook_fixtures/invoiceitem.created.json +87 -13
  67. data/lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json +88 -14
  68. data/lib/stripe_mock/webhook_fixtures/mandate.updated.json +34 -0
  69. data/lib/stripe_mock/webhook_fixtures/payment_intent.amount_capturable_updated.json +170 -0
  70. data/lib/stripe_mock/webhook_fixtures/payment_intent.canceled.json +73 -0
  71. data/lib/stripe_mock/webhook_fixtures/payment_intent.created.json +86 -0
  72. data/lib/stripe_mock/webhook_fixtures/payment_intent.payment_failed.json +225 -0
  73. data/lib/stripe_mock/webhook_fixtures/payment_intent.processing.json +162 -0
  74. data/lib/stripe_mock/webhook_fixtures/payment_intent.requires_action.json +191 -0
  75. data/lib/stripe_mock/webhook_fixtures/payment_intent.succeeded.json +196 -0
  76. data/lib/stripe_mock/webhook_fixtures/payment_link.created.json +47 -0
  77. data/lib/stripe_mock/webhook_fixtures/payment_link.updated.json +50 -0
  78. data/lib/stripe_mock/webhook_fixtures/payment_method.attached.json +63 -0
  79. data/lib/stripe_mock/webhook_fixtures/payment_method.detached.json +62 -0
  80. data/lib/stripe_mock/webhook_fixtures/payout.created.json +40 -0
  81. data/lib/stripe_mock/webhook_fixtures/payout.paid.json +40 -0
  82. data/lib/stripe_mock/webhook_fixtures/payout.updated.json +46 -0
  83. data/lib/stripe_mock/webhook_fixtures/plan.created.json +30 -13
  84. data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +30 -13
  85. data/lib/stripe_mock/webhook_fixtures/plan.updated.json +34 -14
  86. data/lib/stripe_mock/webhook_fixtures/price.created.json +42 -0
  87. data/lib/stripe_mock/webhook_fixtures/price.deleted.json +42 -0
  88. data/lib/stripe_mock/webhook_fixtures/price.updated.json +48 -0
  89. data/lib/stripe_mock/webhook_fixtures/product.created.json +19 -13
  90. data/lib/stripe_mock/webhook_fixtures/product.deleted.json +20 -14
  91. data/lib/stripe_mock/webhook_fixtures/product.updated.json +24 -15
  92. data/lib/stripe_mock/webhook_fixtures/quote.accepted.json +92 -0
  93. data/lib/stripe_mock/webhook_fixtures/quote.canceled.json +92 -0
  94. data/lib/stripe_mock/webhook_fixtures/quote.created.json +92 -0
  95. data/lib/stripe_mock/webhook_fixtures/quote.finalized.json +92 -0
  96. data/lib/stripe_mock/webhook_fixtures/setup_intent.canceled.json +46 -0
  97. data/lib/stripe_mock/webhook_fixtures/setup_intent.created.json +51 -0
  98. data/lib/stripe_mock/webhook_fixtures/setup_intent.setup_failed.json +100 -0
  99. data/lib/stripe_mock/webhook_fixtures/setup_intent.succeeded.json +46 -0
  100. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.canceled.json +119 -0
  101. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.created.json +114 -0
  102. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.released.json +111 -0
  103. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.updated.json +125 -0
  104. data/lib/stripe_mock/webhook_fixtures/tax_rate.created.json +32 -0
  105. data/lib/stripe_mock/webhook_fixtures/tax_rate.updated.json +37 -0
  106. data/lib/stripe_mock.rb +7 -1
  107. data/spec/instance_spec.rb +7 -7
  108. data/spec/integration_examples/completing_checkout_sessions_example.rb +37 -0
  109. data/spec/list_spec.rb +23 -0
  110. data/spec/readme_spec.rb +1 -1
  111. data/spec/server_spec.rb +4 -2
  112. data/spec/shared_stripe_examples/account_examples.rb +9 -1
  113. data/spec/shared_stripe_examples/account_link_examples.rb +16 -0
  114. data/spec/shared_stripe_examples/balance_examples.rb +6 -0
  115. data/spec/shared_stripe_examples/card_token_examples.rb +17 -21
  116. data/spec/shared_stripe_examples/checkout_session_examples.rb +99 -0
  117. data/spec/shared_stripe_examples/customer_examples.rb +11 -13
  118. data/spec/shared_stripe_examples/express_login_link_examples.rb +12 -0
  119. data/spec/shared_stripe_examples/invoice_examples.rb +29 -8
  120. data/spec/shared_stripe_examples/payment_intent_examples.rb +74 -0
  121. data/spec/shared_stripe_examples/payment_method_examples.rb +336 -67
  122. data/spec/shared_stripe_examples/price_examples.rb +223 -0
  123. data/spec/shared_stripe_examples/product_examples.rb +1 -9
  124. data/spec/shared_stripe_examples/promotion_code_examples.rb +68 -0
  125. data/spec/shared_stripe_examples/refund_examples.rb +13 -0
  126. data/spec/shared_stripe_examples/setup_intent_examples.rb +17 -0
  127. data/spec/shared_stripe_examples/subscription_examples.rb +327 -9
  128. data/spec/shared_stripe_examples/transfer_examples.rb +10 -1
  129. data/spec/shared_stripe_examples/webhook_event_examples.rb +51 -5
  130. data/spec/spec_helper.rb +4 -0
  131. data/spec/stripe_mock_spec.rb +2 -2
  132. data/spec/support/stripe_examples.rb +8 -2
  133. data/stripe-ruby-mock.gemspec +7 -2
  134. metadata +72 -15
  135. data/.travis.yml +0 -28
  136. data/lib/stripe_mock/request_handlers/checkout.rb +0 -15
  137. data/spec/shared_stripe_examples/checkout_examples.rb +0 -19
@@ -10,7 +10,12 @@ Gem::Specification.new do |gem|
10
10
  gem.license = "MIT"
11
11
  gem.authors = ["Gilbert"]
12
12
  gem.email = "gilbertbgarza@gmail.com"
13
- gem.homepage = "https://github.com/rebelidealist/stripe-ruby-mock"
13
+ gem.homepage = "https://github.com/stripe-ruby-mock/stripe-ruby-mock"
14
+ gem.metadata = {
15
+ "bug_tracker_uri" => "https://github.com/stripe-ruby-mock/stripe-ruby-mock/issues",
16
+ "changelog_uri" => "https://github.com/stripe-ruby-mock/stripe-ruby-mock/blob/master/CHANGELOG.md",
17
+ "source_code_uri" => "https://github.com/stripe-ruby-mock/stripe-ruby-mock"
18
+ }
14
19
 
15
20
  gem.files = `git ls-files`.split($/)
16
21
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -23,5 +28,5 @@ Gem::Specification.new do |gem|
23
28
 
24
29
  gem.add_development_dependency 'rspec', '~> 3.7.0'
25
30
  gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
26
- gem.add_development_dependency 'thin', '~> 1.6.4'
31
+ gem.add_development_dependency 'thin', '~> 1.8.1'
27
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe-ruby-mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gilbert
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-29 00:00:00.000000000 Z
11
+ date: 2024-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stripe
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 1.6.4
95
+ version: 1.8.1
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 1.6.4
102
+ version: 1.8.1
103
103
  description: A drop-in library to test stripe without hitting their servers
104
104
  email: gilbertbgarza@gmail.com
105
105
  executables:
@@ -108,9 +108,9 @@ extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
110
  - ".env"
111
+ - ".github/workflows/rspec_tests.yml"
111
112
  - ".gitignore"
112
113
  - ".rspec"
113
- - ".travis.yml"
114
114
  - CHANGELOG.md
115
115
  - Gemfile
116
116
  - LICENSE.txt
@@ -142,18 +142,20 @@ files:
142
142
  - lib/stripe_mock/errors/unstarted_state_error.rb
143
143
  - lib/stripe_mock/errors/unsupported_request_error.rb
144
144
  - lib/stripe_mock/instance.rb
145
+ - lib/stripe_mock/request_handlers/account_links.rb
145
146
  - lib/stripe_mock/request_handlers/accounts.rb
146
147
  - lib/stripe_mock/request_handlers/balance.rb
147
148
  - lib/stripe_mock/request_handlers/balance_transactions.rb
148
149
  - lib/stripe_mock/request_handlers/cards.rb
149
150
  - lib/stripe_mock/request_handlers/charges.rb
150
- - lib/stripe_mock/request_handlers/checkout.rb
151
+ - lib/stripe_mock/request_handlers/checkout_session.rb
151
152
  - lib/stripe_mock/request_handlers/country_spec.rb
152
153
  - lib/stripe_mock/request_handlers/coupons.rb
153
154
  - lib/stripe_mock/request_handlers/customers.rb
154
155
  - lib/stripe_mock/request_handlers/disputes.rb
155
156
  - lib/stripe_mock/request_handlers/ephemeral_key.rb
156
157
  - lib/stripe_mock/request_handlers/events.rb
158
+ - lib/stripe_mock/request_handlers/express_login_links.rb
157
159
  - lib/stripe_mock/request_handlers/external_accounts.rb
158
160
  - lib/stripe_mock/request_handlers/helpers/bank_account_helpers.rb
159
161
  - lib/stripe_mock/request_handlers/helpers/card_helpers.rb
@@ -169,7 +171,9 @@ files:
169
171
  - lib/stripe_mock/request_handlers/payment_methods.rb
170
172
  - lib/stripe_mock/request_handlers/payouts.rb
171
173
  - lib/stripe_mock/request_handlers/plans.rb
174
+ - lib/stripe_mock/request_handlers/prices.rb
172
175
  - lib/stripe_mock/request_handlers/products.rb
176
+ - lib/stripe_mock/request_handlers/promotion_codes.rb
173
177
  - lib/stripe_mock/request_handlers/recipients.rb
174
178
  - lib/stripe_mock/request_handlers/refunds.rb
175
179
  - lib/stripe_mock/request_handlers/setup_intents.rb
@@ -192,15 +196,20 @@ files:
192
196
  - lib/stripe_mock/webhook_fixtures/account.external_account.updated.json
193
197
  - lib/stripe_mock/webhook_fixtures/account.updated.json
194
198
  - lib/stripe_mock/webhook_fixtures/balance.available.json
199
+ - lib/stripe_mock/webhook_fixtures/charge.captured.json
195
200
  - lib/stripe_mock/webhook_fixtures/charge.dispute.closed.json
196
201
  - lib/stripe_mock/webhook_fixtures/charge.dispute.created.json
197
202
  - lib/stripe_mock/webhook_fixtures/charge.dispute.funds_reinstated.json
198
203
  - lib/stripe_mock/webhook_fixtures/charge.dispute.funds_withdrawn.json
199
204
  - lib/stripe_mock/webhook_fixtures/charge.dispute.updated.json
200
205
  - lib/stripe_mock/webhook_fixtures/charge.failed.json
206
+ - lib/stripe_mock/webhook_fixtures/charge.refund.updated.json
201
207
  - lib/stripe_mock/webhook_fixtures/charge.refunded.json
202
208
  - lib/stripe_mock/webhook_fixtures/charge.succeeded.json
203
209
  - lib/stripe_mock/webhook_fixtures/charge.updated.json
210
+ - lib/stripe_mock/webhook_fixtures/checkout.session.completed.json
211
+ - lib/stripe_mock/webhook_fixtures/checkout.session.completed.payment_mode.json
212
+ - lib/stripe_mock/webhook_fixtures/checkout.session.completed.setup_mode.json
204
213
  - lib/stripe_mock/webhook_fixtures/coupon.created.json
205
214
  - lib/stripe_mock/webhook_fixtures/coupon.deleted.json
206
215
  - lib/stripe_mock/webhook_fixtures/customer.created.json
@@ -217,18 +226,54 @@ files:
217
226
  - lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json
218
227
  - lib/stripe_mock/webhook_fixtures/customer.updated.json
219
228
  - lib/stripe_mock/webhook_fixtures/invoice.created.json
229
+ - lib/stripe_mock/webhook_fixtures/invoice.finalized.json
230
+ - lib/stripe_mock/webhook_fixtures/invoice.paid.json
231
+ - lib/stripe_mock/webhook_fixtures/invoice.payment_action_required.json
220
232
  - lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json
221
233
  - lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json
234
+ - lib/stripe_mock/webhook_fixtures/invoice.upcoming.json
222
235
  - lib/stripe_mock/webhook_fixtures/invoice.updated.json
223
236
  - lib/stripe_mock/webhook_fixtures/invoiceitem.created.json
224
237
  - lib/stripe_mock/webhook_fixtures/invoiceitem.deleted.json
225
238
  - lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json
239
+ - lib/stripe_mock/webhook_fixtures/mandate.updated.json
240
+ - lib/stripe_mock/webhook_fixtures/payment_intent.amount_capturable_updated.json
241
+ - lib/stripe_mock/webhook_fixtures/payment_intent.canceled.json
242
+ - lib/stripe_mock/webhook_fixtures/payment_intent.created.json
243
+ - lib/stripe_mock/webhook_fixtures/payment_intent.payment_failed.json
244
+ - lib/stripe_mock/webhook_fixtures/payment_intent.processing.json
245
+ - lib/stripe_mock/webhook_fixtures/payment_intent.requires_action.json
246
+ - lib/stripe_mock/webhook_fixtures/payment_intent.succeeded.json
247
+ - lib/stripe_mock/webhook_fixtures/payment_link.created.json
248
+ - lib/stripe_mock/webhook_fixtures/payment_link.updated.json
249
+ - lib/stripe_mock/webhook_fixtures/payment_method.attached.json
250
+ - lib/stripe_mock/webhook_fixtures/payment_method.detached.json
251
+ - lib/stripe_mock/webhook_fixtures/payout.created.json
252
+ - lib/stripe_mock/webhook_fixtures/payout.paid.json
253
+ - lib/stripe_mock/webhook_fixtures/payout.updated.json
226
254
  - lib/stripe_mock/webhook_fixtures/plan.created.json
227
255
  - lib/stripe_mock/webhook_fixtures/plan.deleted.json
228
256
  - lib/stripe_mock/webhook_fixtures/plan.updated.json
257
+ - lib/stripe_mock/webhook_fixtures/price.created.json
258
+ - lib/stripe_mock/webhook_fixtures/price.deleted.json
259
+ - lib/stripe_mock/webhook_fixtures/price.updated.json
229
260
  - lib/stripe_mock/webhook_fixtures/product.created.json
230
261
  - lib/stripe_mock/webhook_fixtures/product.deleted.json
231
262
  - lib/stripe_mock/webhook_fixtures/product.updated.json
263
+ - lib/stripe_mock/webhook_fixtures/quote.accepted.json
264
+ - lib/stripe_mock/webhook_fixtures/quote.canceled.json
265
+ - lib/stripe_mock/webhook_fixtures/quote.created.json
266
+ - lib/stripe_mock/webhook_fixtures/quote.finalized.json
267
+ - lib/stripe_mock/webhook_fixtures/setup_intent.canceled.json
268
+ - lib/stripe_mock/webhook_fixtures/setup_intent.created.json
269
+ - lib/stripe_mock/webhook_fixtures/setup_intent.setup_failed.json
270
+ - lib/stripe_mock/webhook_fixtures/setup_intent.succeeded.json
271
+ - lib/stripe_mock/webhook_fixtures/subscription_schedule.canceled.json
272
+ - lib/stripe_mock/webhook_fixtures/subscription_schedule.created.json
273
+ - lib/stripe_mock/webhook_fixtures/subscription_schedule.released.json
274
+ - lib/stripe_mock/webhook_fixtures/subscription_schedule.updated.json
275
+ - lib/stripe_mock/webhook_fixtures/tax_rate.created.json
276
+ - lib/stripe_mock/webhook_fixtures/tax_rate.updated.json
232
277
  - lib/stripe_mock/webhook_fixtures/transfer.created.json
233
278
  - lib/stripe_mock/webhook_fixtures/transfer.failed.json
234
279
  - lib/stripe_mock/webhook_fixtures/transfer.paid.json
@@ -241,12 +286,14 @@ files:
241
286
  - spec/fixtures/stripe_webhooks/custom.account.updated.json
242
287
  - spec/instance_spec.rb
243
288
  - spec/integration_examples/charge_token_examples.rb
289
+ - spec/integration_examples/completing_checkout_sessions_example.rb
244
290
  - spec/integration_examples/customer_card_examples.rb
245
291
  - spec/integration_examples/prepare_error_examples.rb
246
292
  - spec/list_spec.rb
247
293
  - spec/readme_spec.rb
248
294
  - spec/server_spec.rb
249
295
  - spec/shared_stripe_examples/account_examples.rb
296
+ - spec/shared_stripe_examples/account_link_examples.rb
250
297
  - spec/shared_stripe_examples/balance_examples.rb
251
298
  - spec/shared_stripe_examples/balance_transaction_examples.rb
252
299
  - spec/shared_stripe_examples/bank_examples.rb
@@ -254,13 +301,14 @@ files:
254
301
  - spec/shared_stripe_examples/card_examples.rb
255
302
  - spec/shared_stripe_examples/card_token_examples.rb
256
303
  - spec/shared_stripe_examples/charge_examples.rb
257
- - spec/shared_stripe_examples/checkout_examples.rb
304
+ - spec/shared_stripe_examples/checkout_session_examples.rb
258
305
  - spec/shared_stripe_examples/country_specs_examples.rb
259
306
  - spec/shared_stripe_examples/coupon_examples.rb
260
307
  - spec/shared_stripe_examples/customer_examples.rb
261
308
  - spec/shared_stripe_examples/dispute_examples.rb
262
309
  - spec/shared_stripe_examples/ephemeral_key_examples.rb
263
310
  - spec/shared_stripe_examples/error_mock_examples.rb
311
+ - spec/shared_stripe_examples/express_login_link_examples.rb
264
312
  - spec/shared_stripe_examples/external_account_examples.rb
265
313
  - spec/shared_stripe_examples/extra_features_examples.rb
266
314
  - spec/shared_stripe_examples/invoice_examples.rb
@@ -269,7 +317,9 @@ files:
269
317
  - spec/shared_stripe_examples/payment_method_examples.rb
270
318
  - spec/shared_stripe_examples/payout_examples.rb
271
319
  - spec/shared_stripe_examples/plan_examples.rb
320
+ - spec/shared_stripe_examples/price_examples.rb
272
321
  - spec/shared_stripe_examples/product_examples.rb
322
+ - spec/shared_stripe_examples/promotion_code_examples.rb
273
323
  - spec/shared_stripe_examples/recipient_examples.rb
274
324
  - spec/shared_stripe_examples/refund_examples.rb
275
325
  - spec/shared_stripe_examples/setup_intent_examples.rb
@@ -285,11 +335,14 @@ files:
285
335
  - spec/support/stripe_examples.rb
286
336
  - spec/util_spec.rb
287
337
  - stripe-ruby-mock.gemspec
288
- homepage: https://github.com/rebelidealist/stripe-ruby-mock
338
+ homepage: https://github.com/stripe-ruby-mock/stripe-ruby-mock
289
339
  licenses:
290
340
  - MIT
291
- metadata: {}
292
- post_install_message:
341
+ metadata:
342
+ bug_tracker_uri: https://github.com/stripe-ruby-mock/stripe-ruby-mock/issues
343
+ changelog_uri: https://github.com/stripe-ruby-mock/stripe-ruby-mock/blob/master/CHANGELOG.md
344
+ source_code_uri: https://github.com/stripe-ruby-mock/stripe-ruby-mock
345
+ post_install_message:
293
346
  rdoc_options: []
294
347
  require_paths:
295
348
  - lib
@@ -304,9 +357,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
357
  - !ruby/object:Gem::Version
305
358
  version: '0'
306
359
  requirements: []
307
- rubyforge_project:
308
- rubygems_version: 2.6.8
309
- signing_key:
360
+ rubygems_version: 3.0.3.1
361
+ signing_key:
310
362
  specification_version: 4
311
363
  summary: TDD with stripe
312
364
  test_files:
@@ -317,12 +369,14 @@ test_files:
317
369
  - spec/fixtures/stripe_webhooks/custom.account.updated.json
318
370
  - spec/instance_spec.rb
319
371
  - spec/integration_examples/charge_token_examples.rb
372
+ - spec/integration_examples/completing_checkout_sessions_example.rb
320
373
  - spec/integration_examples/customer_card_examples.rb
321
374
  - spec/integration_examples/prepare_error_examples.rb
322
375
  - spec/list_spec.rb
323
376
  - spec/readme_spec.rb
324
377
  - spec/server_spec.rb
325
378
  - spec/shared_stripe_examples/account_examples.rb
379
+ - spec/shared_stripe_examples/account_link_examples.rb
326
380
  - spec/shared_stripe_examples/balance_examples.rb
327
381
  - spec/shared_stripe_examples/balance_transaction_examples.rb
328
382
  - spec/shared_stripe_examples/bank_examples.rb
@@ -330,13 +384,14 @@ test_files:
330
384
  - spec/shared_stripe_examples/card_examples.rb
331
385
  - spec/shared_stripe_examples/card_token_examples.rb
332
386
  - spec/shared_stripe_examples/charge_examples.rb
333
- - spec/shared_stripe_examples/checkout_examples.rb
387
+ - spec/shared_stripe_examples/checkout_session_examples.rb
334
388
  - spec/shared_stripe_examples/country_specs_examples.rb
335
389
  - spec/shared_stripe_examples/coupon_examples.rb
336
390
  - spec/shared_stripe_examples/customer_examples.rb
337
391
  - spec/shared_stripe_examples/dispute_examples.rb
338
392
  - spec/shared_stripe_examples/ephemeral_key_examples.rb
339
393
  - spec/shared_stripe_examples/error_mock_examples.rb
394
+ - spec/shared_stripe_examples/express_login_link_examples.rb
340
395
  - spec/shared_stripe_examples/external_account_examples.rb
341
396
  - spec/shared_stripe_examples/extra_features_examples.rb
342
397
  - spec/shared_stripe_examples/invoice_examples.rb
@@ -345,7 +400,9 @@ test_files:
345
400
  - spec/shared_stripe_examples/payment_method_examples.rb
346
401
  - spec/shared_stripe_examples/payout_examples.rb
347
402
  - spec/shared_stripe_examples/plan_examples.rb
403
+ - spec/shared_stripe_examples/price_examples.rb
348
404
  - spec/shared_stripe_examples/product_examples.rb
405
+ - spec/shared_stripe_examples/promotion_code_examples.rb
349
406
  - spec/shared_stripe_examples/recipient_examples.rb
350
407
  - spec/shared_stripe_examples/refund_examples.rb
351
408
  - spec/shared_stripe_examples/setup_intent_examples.rb
data/.travis.yml DELETED
@@ -1,28 +0,0 @@
1
- dist: trusty
2
- group: deprecated-2017Q2
3
- sudo: required
4
- language: ruby
5
- rvm:
6
- - 2.4.6
7
- - 2.5.5
8
- - 2.6.3
9
- before_install:
10
- - rvm 2.1.10 do gem install mime-types -v 2.6.2
11
- - gem install bundler -v '< 2'
12
- before_script:
13
- - "sudo touch /var/log/stripe-mock-server.log"
14
- - "sudo chown travis /var/log/stripe-mock-server.log"
15
- script: "bundle exec rspec && bundle exec rspec -t live"
16
-
17
- env:
18
- global:
19
- - IS_TRAVIS=true STRIPE_TEST_SECRET_KEY_A=sk_test_BsztzqQjzd7lqkgo1LjEG5DF00KzH7tWKF STRIPE_TEST_SECRET_KEY_B=sk_test_rKCEu0x8jzg6cKPqoey8kUPQ00usQO3KYE STRIPE_TEST_SECRET_KEY_C=sk_test_qeaB7R6Ywp8sC9pzd1ZIABH700YLC7nhmZ
20
-
21
- notifications:
22
- webhooks:
23
- urls:
24
- - https://webhooks.gitter.im/e/44a1f4718ae2efb67eac
25
- on_success: change # options: [always|never|change] default: always
26
- on_failure: always # options: [always|never|change] default: always
27
- on_start: false # default: false
28
-
@@ -1,15 +0,0 @@
1
- module StripeMock
2
- module RequestHandlers
3
- module Checkout
4
- def Checkout.included(klass)
5
- klass.add_handler 'post /v1/checkout/sessions', :new_session
6
- end
7
-
8
- def new_session(route, method_url, params, headers)
9
- params[:id] ||= new_id('cs')
10
-
11
- checkout_sessions[params[:id]] = Data.mock_checkout_session(params)
12
- end
13
- end
14
- end
15
- end
@@ -1,19 +0,0 @@
1
- require 'spec_helper'
2
-
3
- shared_examples 'Checkout API' do
4
-
5
- it "creates a stripe checkout session" do
6
- session = Stripe::Checkout::Session.create({
7
- payment_method_types: ['card'],
8
- line_items: [{
9
- name: 'T-shirt',
10
- quantity: 1,
11
- amount: 500,
12
- currency: 'usd',
13
- }],
14
- })
15
- expect(session.id).to match(/^test_cs/)
16
- expect(session.line_items.count).to eq(1)
17
- end
18
-
19
- end