stripe-stateful-mock icon indicating copy to clipboard operation
stripe-stateful-mock copied to clipboard

feat: add skus, checkout.session and data reset functionality

Open omairvaiyani opened this issue 4 years ago • 6 comments

Pending tests, once I figure out how it's done.

Adds these endpoints

  • skus.create
  • skus.retrieve
  • skus.list
  • checkout.session.create
  • checkout.session.retrieve

Adds a resetData export to support beforeEach / afterEach pattern.

omairvaiyani avatar Dec 15 '20 12:12 omairvaiyani

Just wanted to let you know I haven't forgotten about this. I'm going to review it tonight or tomorrow morning.

pushplay avatar Dec 18 '20 00:12 pushplay

The sku and checkout session work all looks great.

What's the use case for deleting one account's data and not all data from all accounts? My concern is that it would be easy to create an inconsistent state when I think the default assumption would be that calling resetData() applies to all accounts.

pushplay avatar Dec 18 '20 19:12 pushplay

@pushplay that's a fair point, I think deleting all account data makes more sense too - we didn't have a use-case for it, since we only use the default account

omairvaiyani avatar Dec 21 '20 16:12 omairvaiyani

So this has gotten a bit stale. Do you want to make changes to apply resetData() to all accounts? Alternately I can merge it and then do a bit of reworking myself.

pushplay avatar Jan 03 '21 17:01 pushplay

Would be great to get this in if I can help contribute

cbarratt avatar Nov 07 '22 16:11 cbarratt

Hi. This project hasn't been updated in a long time. I don't know if it's still useful to people. It's not useful to me.

If you want to fork the project I'll support that. If you submit a PR that looks reasonable I can merge and do a release.

Cheers.

pushplay avatar Nov 08 '22 00:11 pushplay