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

Adds enum values for billing_address_collection on Checkout Session #971

Merged
merged 1 commit into from
Jul 14, 2020
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
2 changes: 1 addition & 1 deletion lib/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @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 null|string $name Cardholder name.
* @property null|string|\Stripe\Recipient $recipient The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead.
* @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be <code>amex_express_checkout</code>, <code>android_pay</code> (includes Google Pay), <code>apple_pay</code>, <code>masterpass</code>, <code>visa_checkout</code>, or null.
* @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be <code>android_pay</code> (includes Google Pay), <code>apple_pay</code>, <code>masterpass</code>, <code>visa_checkout</code>, or null.
*/
class Card extends ApiResource
{
Expand Down
5 changes: 4 additions & 1 deletion lib/Checkout/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* @property string $id Unique identifier for the object. Used to pass to <code>redirectToCheckout</code> in Stripe.js.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string $billing_address_collection The value (<code>auto</code> or <code>required</code>) for whether Checkout collected the customer's billing address.
* @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address.
* @property string $cancel_url The URL the customer will be directed to if they decide to cancel payment and return to your website.
* @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems.
* @property null|string|\Stripe\Customer $customer The ID of the customer for this session. For Checkout Sessions in <code>payment</code> or <code>subscription</code> mode, Checkout will create a new customer object based on information provided during the session unless an existing customer was provided when the session was created.
Expand Down Expand Up @@ -51,6 +51,9 @@ class Session extends \Stripe\ApiResource
use \Stripe\ApiOperations\NestedResource;
use \Stripe\ApiOperations\Retrieve;

const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required';

const SUBMIT_TYPE_AUTO = 'auto';
const SUBMIT_TYPE_BOOK = 'book';
const SUBMIT_TYPE_DONATE = 'donate';
Expand Down
2 changes: 1 addition & 1 deletion lib/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference.
* @property null|\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
* @property \Stripe\Collection $sources The customer's payment sources, if any.
* @property \Stripe\Collection $subscriptions The customer's current subscriptions, if any.
* @property null|\Stripe\Collection $subscriptions The customer's current subscriptions, if any.
* @property null|string $tax_exempt Describes the customer's tax exemption status. One of <code>none</code>, <code>exempt</code>, or <code>reverse</code>. When set to <code>reverse</code>, invoice and receipt PDFs include the text <strong>&quot;Reverse charge&quot;</strong>.
* @property \Stripe\Collection $tax_ids The customer's tax IDs.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* We also have a separate <a
* href="http://en.wikipedia.org/wiki/Webhook">webhooks</a> system for sending the
* <code>Event</code> objects directly to an endpoint on your server. Webhooks are
* managed in your <a href="https://dashboard.stripe.com/account/webhooks'">account
* managed in your <a href="https://dashboard.stripe.com/account/webhooks">account
* settings</a>, and our <a href="https://stripe.com/docs/webhooks">Using
* Webhooks</a> guide will help you get set up.
*
Expand Down
5 changes: 1 addition & 4 deletions lib/Recipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
* href="https://stripe.com/docs/connect">Connect</a>, specifically Connect's much
* more powerful <a href="https://stripe.com/docs/api#account">Account objects</a>.
* Stripe accounts that don't already use recipients can no longer begin doing so.
* Please use <code>Account</code> objects instead. If you are already using
* recipients, please see our <a
* href="https://stripe.com/docs/connect/recipient-account-migrations">migration
* guide</a> for more information.</strong>
* Please use <code>Account</code> objects instead.</strong>
*
* @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
2 changes: 1 addition & 1 deletion lib/SubscriptionSchedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @property null|\Stripe\StripeObject $current_phase Object representing the start and end dates for the current phase of the subscription schedule, if it is <code>active</code>.
* @property string|\Stripe\Customer $customer ID of the customer who owns the subscription schedule.
* @property \Stripe\StripeObject $default_settings
* @property string $end_behavior Behavior of the subscription schedule and underlying subscription when it ends.
* @property string $end_behavior Behavior of the subscription schedule and underlying subscription when it ends. Possible values are <code>release</code> and <code>cancel</code>.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|\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\StripeObject[] $phases Configuration for the subscription schedule's phases.
Expand Down
9 changes: 7 additions & 2 deletions lib/TaxRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
namespace Stripe;

/**
* Tax rates can be applied to invoices and subscriptions to collect tax.
* Tax rates can be applied to <a
* href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
* href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and
* <a
* href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
* Sessions</a> to collect tax.
*
* Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax
* Rates</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.
* @property bool $active Defaults to <code>true</code>. When set to <code>false</code>, this tax rate cannot be applied to objects in the API, but will still be applied to subscriptions and invoices that already have it set.
* @property bool $active Defaults to <code>true</code>. When set to <code>false</code>, this tax rate is considered archived and cannot be applied to new applications or Checkout Sessions, but will still be applied to subscriptions and invoices that already have it set.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
* @property string $display_name The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
Expand Down