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

API Updates #1240

Merged
merged 1 commit into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/PaymentIntent.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,21 @@ public function confirm($params = null, $opts = null)

return $this;
}

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentIntent the verified payment intent
*/
public function verifyMicrodeposits($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/verify_microdeposits';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);

return $this;
}
}
2 changes: 1 addition & 1 deletion lib/Plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Related guides: <a
* href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up
* a subscription</a> and more about <a
* href="https://stripe.com/docs/billing/prices-guide">products and prices</a>.
* href="https://stripe.com/docs/products-prices/overview">products and prices</a>.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
Expand Down
4 changes: 2 additions & 2 deletions lib/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up
* a subscription</a>, <a
* href="https://stripe.com/docs/billing/invoices/create">create an invoice</a>,
* and more about <a href="https://stripe.com/docs/billing/prices-guide">products
* and prices</a>.
* and more about <a
* href="https://stripe.com/docs/products-prices/overview">products and prices</a>.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
Expand Down
12 changes: 7 additions & 5 deletions lib/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
* For example, you might offer a Standard and Premium version of your goods or
* service; each version would be a separate Product. They can be used in
* conjunction with <a href="https://stripe.com/docs/api#prices">Prices</a> to
* configure pricing in Checkout and Subscriptions.
* configure pricing in Payment Links, Checkout, and Subscriptions.
*
* Related guides: <a
* href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up
* a subscription</a> or accept <a
* href="https://stripe.com/docs/payments/checkout/client#create-products">one-time
* payments with Checkout</a> and more about <a
* href="https://stripe.com/docs/billing/prices-guide">Products and Prices</a>
* a subscription</a>, <a
* href="https://stripe.com/docs/payments/payment-links/overview">share a Payment
* Link</a>, <a
* href="https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront">accept
* payments with Checkout</a>, and more about <a
* href="https://stripe.com/docs/products-prices/overview">Products and Prices</a>
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
Expand Down
16 changes: 16 additions & 0 deletions lib/Service/PaymentIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,20 @@ public function update($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts);
}

/**
* Verifies microdeposits on a PaymentIntent object.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentIntent
*/
public function verifyMicrodeposits($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/payment_intents/%s/verify_microdeposits', $id), $params, $opts);
}
}
16 changes: 16 additions & 0 deletions lib/Service/SetupIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,20 @@ public function update($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/setup_intents/%s', $id), $params, $opts);
}

/**
* Verifies microdeposits on a SetupIntent object.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SetupIntent
*/
public function verifyMicrodeposits($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/setup_intents/%s/verify_microdeposits', $id), $params, $opts);
}
}
17 changes: 17 additions & 0 deletions lib/SetupIntent.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,21 @@ public function confirm($params = null, $opts = null)

return $this;
}

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SetupIntent the verified setup intent
*/
public function verifyMicrodeposits($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/verify_microdeposits';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);

return $this;
}
}
4 changes: 2 additions & 2 deletions lib/SubscriptionItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property \Stripe\Plan $plan <p>You can now model subscriptions more flexibly using the <a href="https://stripe.com/docs/api#prices">Prices API</a>. It replaces the Plans API and is backwards compatible to simplify your migration.</p><p>Plans define the base price, currency, and billing cycle for recurring purchases of products. <a href="https://stripe.com/docs/api#products">Products</a> help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.</p><p>For example, you might have a single &quot;gold&quot; product that has plans for $10/month, $100/year, €9/month, and €90/year.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a> and more about <a href="https://stripe.com/docs/billing/prices-guide">products and prices</a>.</p>
* @property \Stripe\Price $price <p>Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. <a href="https://stripe.com/docs/api#products">Products</a> help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.</p><p>For example, you might have a single &quot;gold&quot; product that has prices for $10/month, $100/year, and €9 once.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a>, <a href="https://stripe.com/docs/billing/invoices/create">create an invoice</a>, and more about <a href="https://stripe.com/docs/billing/prices-guide">products and prices</a>.</p>
* @property \Stripe\Plan $plan <p>You can now model subscriptions more flexibly using the <a href="https://stripe.com/docs/api#prices">Prices API</a>. It replaces the Plans API and is backwards compatible to simplify your migration.</p><p>Plans define the base price, currency, and billing cycle for recurring purchases of products. <a href="https://stripe.com/docs/api#products">Products</a> help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.</p><p>For example, you might have a single &quot;gold&quot; product that has plans for $10/month, $100/year, €9/month, and €90/year.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a> and more about <a href="https://stripe.com/docs/products-prices/overview">products and prices</a>.</p>
* @property \Stripe\Price $price <p>Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. <a href="https://stripe.com/docs/api#products">Products</a> help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.</p><p>For example, you might have a single &quot;gold&quot; product that has prices for $10/month, $100/year, and €9 once.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a>, <a href="https://stripe.com/docs/billing/invoices/create">create an invoice</a>, and more about <a href="https://stripe.com/docs/products-prices/overview">products and prices</a>.</p>
* @property int $quantity The <a href="https://stripe.com/docs/subscriptions/quantities">quantity</a> of the plan to which the customer should be subscribed.
* @property string $subscription The <code>subscription</code> this <code>subscription_item</code> belongs to.
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to this <code>subscription_item</code>. When set, the <code>default_tax_rates</code> on the subscription do not apply to this <code>subscription_item</code>.
Expand Down