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

[12.x] Add methods for managing TaxIDs #1137

Merged
merged 2 commits into from
Apr 26, 2021
Merged

[12.x] Add methods for managing TaxIDs #1137

merged 2 commits into from
Apr 26, 2021

Conversation

driesvints
Copy link
Member

This PR adds some methods to easily manage TaxID's on a customer. This is useful for keeping this data in Stripe so it also appears on its invoices an later in our own receipts like in #1136

Usage:

// Return all of the customer's TaxIDs in an collection instance...
$user->taxIds(); 

// Retrieve a specific TaxID from the customer...
$user->findTaxId('txi_IzcmyhZukd4oKD');

// Create a new TaxID for the customer...
$user->createTaxId($type, $value);

// Delete a TaxID from the customer...
$user->deleteTaxId('txi_IzcmyhZukd4oKD');

Closes #1071

@@ -131,7 +131,7 @@ public function findInvoice($id)
$stripeInvoice = StripeInvoice::retrieve(
$id, $this->stripeOptions()
);
} catch (Exception $exception) {
} catch (StripeInvalidRequestException $exception) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This was apparently referencing an invalid exception. Seems like no-one has hit this snag so far...

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

Successfully merging this pull request may close these issues.

Support for creating Tax IDs on the customer
2 participants