forked from beam-community/stripity-stripe
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update to the upstream v2.10.0 #19
Open
jalexander
wants to merge
57
commits into
jalexander/v2.8.0
Choose a base branch
from
jalexander/v2.10.0
base: jalexander/v2.8.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deprecated tax information for Customers have been removed. The deprecated tax_info and tax_info_verification fields on the Customer object are now removed in favor of tax_ids. The deprecated tax_info parameter on the Customer create and update methods are removed in favor of tax_id_data. For more information, view the migration guide.
As one [might see](https://stackoverflow.com/questions/60941305/stripity-stripe-module-not-found), the recommendation to use `"~> 2.0.0"` which effectively bumps the version to `"2.0.1"` is not great :)
It is possible to use the Stripe API without providing these keys. They are optional so we flag them as such to keep dialyzer happy. The Stripe docs indicate that only 'items' is required: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data
The types are based on: https://github.com/stripe/stripe-go/blob/b363a1c3d64708d837a96d32a498b59d6287ab7b/checkout_session.go#L98-L107 https://github.com/stripe/stripe-java/blob/13055f22a885379c24dcba11feba0ec38b1bf018/src/main/java/com/stripe/param/checkout/SessionCreateParams.java#L2393 Application Free Percent would ideally be something that is limited to postive values with maximum two decimal places but it seems like other APIs don't require that.
Using the `@deprecated` tag marked all usages of `Stripe.Subscription.delete/2` and `Stripe.Subscription.delete/3` as deprecated, whereas only those receiving `%{at_period_end: true}` should be deprecated. This PR fixes the unnecessary deprecation warning.
…fields, and add support for some missing objects (beam-community#602) * Remove /issuing/card_details endpoint interactions The endpoint /issuing/card_details has been removed from the Stripe API. These details can be found at /issuing/cards/retrieve with the appropriate 'expand' parameters. * Remove Issuing Disputes Since Issuing Disputes are no longer available in the Stripe API, remove the issuing disputes module and references to issuing disputes in issuing transaction. * add support for Stripe Mandate core resource * add support for File Link core resource * update core resources structs * add converter support for order_item, usage_record * remove deprecated fields from, add missing fields to issuing objects * add support for Credit Note Line Items, Customer Balance Transactions * remove deprecated fields, add 'threshold reason', alphabetize struct fields * add support for usage_record_summary object * remove incorrect field from recipient fixture for test warning * fix typespecs for struct and update/4 * list login_link as supported object * fix typespec for list/3 * fix typespecs, struct fields for subscriptions objects * add missing struct fields to connect objects * adjust typespec to match library style, add missing struct fields * add missing 'deleted' field to stripe objects * update stripe-mock version * ignore coverage reports in /cover * fix to actually test Stripe.Relay.Product module * add prices api Co-authored-by: Ianko Leite <[email protected]> Co-authored-by: ianko <[email protected]>
* added terminal endpoints with tests * updated comments * fix args for create reader
…m-community#592) * changed params for subscription to accept default payment method * added optional id to allow for upgrading and downgrading
* add price to subscriptions * add price to subscriptions * run format
Stripe allows creating refunds off of payment intents. Currently, the typespec for creating refunds forces us to only send in a charge to refund. Update the typespecs to allow for either charges or payment intents.
…munity#612) according to https://stripe.com/docs/api/events/object , `data.previous_attributes` is "sent along only with *.updated events"
* VERSION BUMP 2.9.0 * CHANGELOG
Cancel subscription endpoint supports `invoice_now` and `prorate` parameters (https://stripe.com/docs/api/subscriptions/cancel).
Include cancel_at_period_end parameter in Subscription.create function.
Looks like Stripe moved the page. I think this it the correct one
https://stripe.com/docs/api/checkout/sessions/create includes a top level `metadata` key that this library was missing.
Allow confirming a payment intent using a payment method. This appears to be the newest way of confirming a payment, deprecating the source field. I believe it's best to leave both options in for backwards compatibility https://stripe.com/docs/api/payment_intents/confirm#confirm_payment_intent-payment_method
…community#631) * Add optional default tax rates to subscription typespecs * Add optional default tax rates to invoice typespecs as well
Co-authored-by: Devin Henslee <[email protected]>
Stripe’s API support the off_session parameter, so the typespec should include it too. https://stripe.com/docs/api/invoices/pay
* Add promotion codes * Update API spec and fix failing tests * Add promotion_code to subscription create * Add code and active to PromotionCode.list * Sort attributes * :id is not a possible creation parameter
…ty#645) The API supports the `source_type` parameter when creating a transfer, but the type restrictions don't currently list it. This causes a warning in Dialyzer when passing the `source_type` parameter. https://stripe.com/docs/api/transfers/create
…munity#644) This is supported by the Stripe API, but was missing from the typespec.
* Add credit note preview * mix format
When `expand: ["invoice_settings.default_payment_method"]` is used with `Stripe.Customer.retrieve/2`, the typespec is incorrect.
Co-authored-by: Connor Morrison <[email protected]>
* Add api key support for Oauth token * Allow docker setup for stripe-mock * Support express accounts authorize_url
…eam-community#662) It's invalid to pass the `customer` key as both part of the URL (which this function does) *and* in the body. Doing so leads to a Stripe error: ``` iex(1)> Stripe.CustomerBalanceTransaction.create("cus_JO4D6sa5xl4Uk7", %{amount: -100, currency: "USD", customer: "cus_JO4D6sa5x l4Uk7"}) {:error, %Stripe.Error{ code: :invalid_request_error, extra: %{ http_status: 400, param: :customer, raw_error: %{ "message" => "A parameter provided in the URL (customer) was repeated as a GET or POST parameter. You can only provide this information as a portion of the URL.", "param" => "customer", "type" => "invalid_request_error" } }, message: "A parameter provided in the URL (customer) was repeated as a GET or POST parameter. You can only provide this information as a portion of the URL.", request_id: nil, source: :stripe, user_message: nil }} ``` Whereas passing it as the first (required) positional argument works fine: ``` iex(2)> Stripe.CustomerBalanceTransaction.create("cus_JO4D6sa5xl4Uk7", %{amount: -100, currency: "USD"}) {:ok, %Stripe.CustomerBalanceTransaction{ amount: -100, created: 1619635421, credit_note: nil, currency: "usd", customer: "cus_JO4D6sa5xl4Uk7", description: nil, ending_balance: -100, id: "cbtxn_1IlIMLFvgMYR2X5ykmdTnR5H", invoice: nil, livemode: false, metadata: %{}, object: "customer_balance_transaction", type: "adjustment" }} ```
* add capability module to groups * add capability to supported objects * add list of capability module and test * add retrieve capability by id * add update capability * update module docs * update spec to be consistant with others
jalexander
force-pushed
the
jalexander/v2.10.0
branch
from
November 20, 2024 23:17
b1e6d57
to
52b87e1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates our stripity_stripe fork to v2.10.0. This is part of an effort to bring our forked version of the library closer to the latest upstream version of the library.
This matches all of the changes from upstream, except I added the properties back in that we are still using in massdriver.
Testing this locally by installing the commit ID from this PR.