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

add support for voiding invoices #444

Merged
merged 5 commits into from
Jan 13, 2019
Merged

add support for voiding invoices #444

merged 5 commits into from
Jan 13, 2019

Conversation

ktravers
Copy link

@ktravers ktravers commented Dec 26, 2018

closes #429

HOLD pending #439

  • update stripe-mock version to 0.40.0 (latest)
  • add Stripe.Invoice#void/2 function

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 83.037% when pulling a64b776 on ktravers:429-void-invoice into 1b4b057 on code-corps:master.

4 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 83.037% when pulling a64b776 on ktravers:429-void-invoice into 1b4b057 on code-corps:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 83.037% when pulling a64b776 on ktravers:429-void-invoice into 1b4b057 on code-corps:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 83.037% when pulling a64b776 on ktravers:429-void-invoice into 1b4b057 on code-corps:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 83.037% when pulling a64b776 on ktravers:429-void-invoice into 1b4b057 on code-corps:master.

@coveralls
Copy link

coveralls commented Dec 26, 2018

Coverage Status

Coverage increased (+0.07%) to 83.037% when pulling b6cf593 on ktravers:429-void-invoice into 1b4b057 on code-corps:master.

@snewcomer
Copy link
Collaborator

👍👏👍

@@ -33,8 +33,7 @@ defmodule Stripe.SourceTest do

describe "detach/2" do
test "detaches a source from a customer" do
assert {:ok, %{deleted: true, id: "src_123"}} =
Stripe.Source.detach("src_123", %{customer: "cus_123"})
assert {:ok, %{id: "src_123"}} = Stripe.Source.detach("src_123", %{customer: "cus_123"})
Copy link
Author

@ktravers ktravers Dec 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as of stripe-mock v0.39.0, this endpoint now returns a Stripe.Account object without a deleted attribute to match against.

i raised a ticket on stripe-mock, since based on Stripe API docs, it seems like this should respond with a Stripe.Source object instead... but regardless, the response will no longer contain a deleted attribute either way.

@snewcomer given that these changes are related to updating the stripe-mock version, not voiding an invoice, it seems cleaner to pull the version updates and this test change into a separate PR. let me know what you prefer.

Copy link
Collaborator

@snewcomer snewcomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @ktravers! Just one comment but otherwise g2g!

lib/stripe/api.ex Outdated Show resolved Hide resolved
Copy link
Collaborator

@snewcomer snewcomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great @ktravers! Merging now 👍

@snewcomer snewcomer merged commit df4b54b into beam-community:master Jan 13, 2019
jalexander pushed a commit to Frameio/stripity_stripe that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support void invoice endpoint
3 participants