Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CustomerParams doesn't include PayImmediately bool #510

Closed
timendez opened this issue Jan 11, 2018 · 5 comments
Closed

CustomerParams doesn't include PayImmediately bool #510

timendez opened this issue Jan 11, 2018 · 5 comments

Comments

@timendez
Copy link

Using go @ 1.8.3 darwin/amd64 with stripe-go @ 28.6.1

The create customer docs show pay_immediately. I've contacted Stripe support as it's a gated parameter and had it unlocked for my account. However, I still need to send it to Stripe. Since Go is a strongly typed language, I can't just include it in the payload.

Let me know if this is something that you guys intentionally left out.

Thanks!

@timendez
Copy link
Author

I was just told that since pay_immediately is a gated parameter, it doesn't show up for anyone else who isn't using Avalara integration, closing issue and editing the source locally myself.

@jsignanini
Copy link

jsignanini commented Oct 4, 2018

I understand that the parameter is gated but I don't see a reason why it should not be part of this library as long as it is properly documented. I think this issue should be reopened and implemented.

@remi-stripe
Copy link
Contributor

@jsignanini There are gated parameters that we want to maintain (or even ship publicly) which we add to the library but others that have been deprecated for a long time (2+ years in this case) that we do not want to ship publicly because it increases the number of people using it.

Our Go library supports adding extra parameters to your request though for cases like this one. This is done by using the AddExtra method that works on all parameters struct. It would look like this:

params := &stripe.SubscriptionParams{
  Customer: stripe.String("cus_123"),
  Items: []*stripe.SubscriptionItemsParams{
    {
      Plan: stripe.String("pl_123"),
    },
  },
}
params.AddExtra("pay_immediately", "false")
s, err := sub.New(params)

@jsignanini
Copy link

@remi-stripe that makes sense, thanks for the explanation!

@timendez
Copy link
Author

timendez commented Oct 4, 2018

@remi-stripe wow that's so neat! I didn't know about that at the time

nadaismail-stripe added a commit that referenced this issue Oct 18, 2024
* added config hash to setup

* resolving merge conflicts and adding test case

* updates based on pr comments

* fix for failed test case

* removed generic toast throwing and updates success error code check based on PR comments

* update for failing test classes

* fix for failing test

* Some nit fixes

* Nit changes

* Revert small change

* Fix syncing the config hash between saves

* potentially fix bug during setup phase

* missed merge detail

* fixed bug with data mapping losing values on back from sync preferences

* Trying to reduce some of the ambiguity in the code

* Remove a js error in the console

* fixed bad ref

* more bugs

* Pushing this change to see total diff and figure out what else to revert

* Reverting a few more changes for clarity

---------

Co-authored-by: arnoldezeolisa <[email protected]>
Co-authored-by: Nada Ismail <[email protected]>
Co-authored-by: Jacob Mather <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants