Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Martin Wilhelmi
@mnin_twitter
@eyefodder this is the current status of the project.
Paul Barnes-Hoggett
@eyefodder
ie. @mnin_twitter - server specs not passing?
Alexander Mamonchik
@alexmamonchik
please, look at stripe-ruby-mock/stripe-ruby-mock#691 let's release it if no changes required
Alexander Mamonchik
@alexmamonchik
yes, tests in all branches still not green but we have to make it less sensitive
Manny
@Alloffices

Hey guys does anyone know if it is possible for my app user connected with Stripe Connect to create subscription plans for their products on my app?

I see that they can create fixed products but don't see if there is something that allows monthly subscriptions for their customers

Mahesh Kasodhan
@maheshmahi1319
CONNECTED_STRIPE_ACCOUNT_ID anyone help me how i connect two stripe accoun
Marc Köhlbrugge
@marckohlbrugge_twitter
Hi all 👋 – is there a quick way to create a 'factory'? For example I need a Stripe Subscription for some of my specs, but I prefer not having to first set up a Stripe Customer, with a Source, etc, etc
Oh, looks like I can just use Stripe::Subscription.new or Stripe::Subscription.construct_from from the stripe-ruby gem itself
Marc Köhlbrugge
@marckohlbrugge_twitter
^ actually, that doesn't give me an ID to work with because the object isn't saved
and saving them isn't possible without creating other objects it depends on
which in turn depends on even more objects

So far I've got the following code, but I can't yet create a stripe_customer because it needs a Source and more params. I'm probably going about this the wrong way.

How can I get a working Stripe::Subscription object? Something that seems persisted as if I got it from the Stripe API.

let(:stripe_product) { Stripe::Product.create StripeMock::Data.mock_product }
let(:stripe_plan) { Stripe::Plan.create StripeMock::Data.mock_plan.merge(product: stripe_product.id) }
let(:stripe_customer) { Stripe::Customer.create StripeMock::Data.mock_customer }
let(:stripe_subscription) { Stripe::Subscription.create StripeMock::Data.mock_subscription.merge(plan: stripe_plan.id, customer: stripe_customer.id) }
Martin Wilhelmi
@mnin_twitter
@marckohlbrugge_twitter hey
Just try this:
context 'with stripe mock' do
  before { StripeMock.start }
  after { StripeMock.stop }

  context 'with stripe subscription' do
    helper = StripeMock.create_test_helper

    let(:plan) { helper.create_plan(amount: 1099, product: helper.create_product.id, currency: 'eur') }
    let(:customer) { Stripe::Customer.create(currency: 'eur', source: helper.generate_card_token) }
    let(:subscription) { Stripe::Subscription.create(customer: customer.id, items: [{ plan: plan.id }]) }
  end
end
Marc Köhlbrugge
@marckohlbrugge_twitter
@mnin_twitter oh wow, thanks! that did the trick indeed
Marc Köhlbrugge
@marckohlbrugge_twitter
Do you have any suggestions on how to then use that same subscription for StripeMock.mock_webhook_event ?
Martin Wilhelmi
@mnin_twitter
@marckohlbrugge_twitter what is the idea behind using the subscription with StripeMock.mock_webhook_event ?
Chris Salvato
@csalvato
Who do I talk to about getting the ability to make a PR on the repo?
@gilbert I'd like to open a PR for this: stripe-ruby-mock/stripe-ruby-mock#737
I created a fork that addresses things, but can add tests and open it as a PR: https://github.com/leevo/stripe-ruby-mock
I probably won't be on Gitter again, but my contact info is on my GitHub account: http://github.com/csalvato
Martin Wilhelmi
@mnin_twitter
@csalvato hey, thanks for finding this issue!
@csalvato do you like to chat about your PR (in the near future?) or any other topics? Otherwise, I would prefer to just use the issue/pr on GitHub to talk about it. But if you have questions, just contact me here or somewhere else.
Pier-Olivier Thibault
@pothibo
Hello! We're using this library a lot at ConvertKit to build reliable specs around Stripe. As we're building the next feature for our platform, we've hit a few roadblocks with this library missing features. We're slowly going to create PRs in the coming days/weeks and at the same time, I saw that you were looking for contributors. I'd be more than happy to become one, if it can help both ConvertKit and the community! cc @Gilbert
Chris Salvato
@csalvato
@mnin_twitter I am happy to keep the conversation on the issue and subsequent PR; but I am unable to push a branch to the repo and open a PR. What is the process you'd like me to follow?
Martin Wilhelmi
@mnin_twitter
@pothibo nice! Hope @klaustopher will help you to merge the stuff!
@csalvato that's a good question, just fork (you did it already I know) the repository, create features branches on your own and then create PRs on this project.
@csalvato can you explain what you mean 'I am unable to push a branch to the repo' (you are using your fork?) and 'open a PR' (I didn't see a reason why it shouldn't work)
Chris Salvato
@csalvato
@mnin_twitter I've never contributed to an OSS project before. I thought I could make a branch then just push it to the repo, as I've done in other repos. Looks like I need to make a fork, and a branch, then create a PR on this project. I'll look into doing that (will be a first for me!)
It may take me a few days to open though
Martin Wilhelmi
@mnin_twitter
@csalvato oh, congratulations! Just fork the original repository to your own user account, modify it and click 'New Pull Request' (see https://docs.github.com/en/enterprise/2.15/user/articles/creating-a-pull-request-from-a-fork)
joshm1204
@joshm1204
Where does StripeMock.toggle_debug(true) output to? Can i set where it outputs? I checked my test.log file and found no output. I need to check the correct name to add an error to :update_subscription, as i get an error when i prepare an error using this name.
Martin Wilhelmi
@mnin_twitter
@joshm1204 see if there is a separate file called "stripe-mock-server.log"
joshm1204
@joshm1204
No seperate file, where would it be located?
i just added the toggle in my single rspec test. Should i put it somewhere else?
@mnin_twitter ^
Martin Wilhelmi
@mnin_twitter
@joshm1204 hey, should be in the log directory
Espen from @MakePlans
@Espen_Antonsen_twitter
Is there any way to add fixtures? I have an account that is used in many tests. Do I just 'Stripe::Account.create' or can I add a json fixture somewhere like with the webhooks?
Chris Salvato
@csalvato
@gilbert I've opened two PRs in the repo. What do I need to do to get it merged in?
Chris Salvato
@csalvato
@mnin_twitter ^

stripe-ruby-mock/stripe-ruby-mock#763

I think we have three options from here cc @gilbert @alexmamonchik @mnin_twitter @pothibo

No offense intended by any of this - just looking to make progress on my own projects, and build on the great work which is already in this repo.
Chris Salvato
@csalvato
@pothibo Are you still interested in becoming a contributor?
Alex Takitani
@alextakitani
Hello!
Pavel Isakov
@isakovp
Hello, looks like stripe-ruby-mock doesn't support SubscriptionSchedule or not?
mjimenez-pernix
@mjimenez-pernix
Hi, I am using stripe 5.30.0 and stripe-ruby-mock 3.0.1, when a run my test I get this "wrong number of arguments (given 3, expected 2)"
on this call "Stripe::Customer.list({ email: email.to_s })"
Andrew Leung
@a-leung
Hi