From b0c4935867ab28141a77bc58a2a41857c4f24607 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Thu, 9 Apr 2020 20:48:24 -0700 Subject: [PATCH] Codegen for openapi 83431de --- lib/Charge.php | 5 +++-- lib/Invoice.php | 2 +- lib/Issuing/Authorization.php | 20 ++++++++++---------- lib/Issuing/Card.php | 6 ++++-- lib/Issuing/Cardholder.php | 3 ++- lib/Issuing/Transaction.php | 6 +++--- lib/Mandate.php | 4 ++-- lib/PaymentIntent.php | 2 +- lib/Plan.php | 8 +++++--- lib/SubscriptionItem.php | 2 +- lib/TaxId.php | 3 ++- 11 files changed, 34 insertions(+), 27 deletions(-) diff --git a/lib/Charge.php b/lib/Charge.php index eaf02cde2..07e481247 100644 --- a/lib/Charge.php +++ b/lib/Charge.php @@ -20,6 +20,7 @@ * @property null|int $application_fee_amount The amount of the application fee (if any) for the charge. See the Connect documentation for details. * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). * @property \Stripe\StripeObject $billing_details + * @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. * @property bool $captured If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. @@ -38,12 +39,12 @@ * @property null|string|\Stripe\Order $order ID of the order this charge is for if one exists. * @property null|\Stripe\StripeObject $outcome Details about whether the payment was accepted, and why. See understanding declines for details. * @property bool $paid true if the charge succeeded, or was successfully authorized for later capture. - * @property null|string $payment_intent ID of the PaymentIntent associated with this charge, if one exists. + * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent associated with this charge, if one exists. * @property null|string $payment_method ID of the payment method used in this charge. * @property null|\Stripe\StripeObject $payment_method_details Details about the payment method at the time of the transaction. * @property null|string $receipt_email This is the email address that the receipt for this charge was sent to. * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this charge. This attribute will be null until a receipt has been sent. - * @property string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + * @property null|string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. * @property bool $refunded Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. * @property \Stripe\Collection $refunds A list of refunds that have been applied to the charge. * @property null|string|\Stripe\Review $review ID of the review associated with this charge if one exists. diff --git a/lib/Invoice.php b/lib/Invoice.php index 289838da0..289c4b2a2 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -98,7 +98,7 @@ * @property \Stripe\StripeObject $threshold_reason * @property int $total Total after discounts and taxes. * @property null|\Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items. - * @property null|int $webhooks_delivered_at The time at which webhooks for this invoice were successfully delivered (if the invoice had no webhooks to deliver, this will match created). Invoice payment is delayed until webhooks are delivered, or until all webhook delivery attempts have been exhausted. + * @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. */ class Invoice extends ApiResource { diff --git a/lib/Issuing/Authorization.php b/lib/Issuing/Authorization.php index 374d4f6ee..d616c349d 100644 --- a/lib/Issuing/Authorization.php +++ b/lib/Issuing/Authorization.php @@ -14,27 +14,27 @@ * * @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 int $amount The total amount in the card's currency that was authorized or rejected. + * @property int $amount The total amount that was authorized or rejected. This amount is in the card's currency and in the smallest currency unit. * @property bool $approved Whether the authorization has been approved. * @property string $authorization_method How the card details were provided. - * @property int $authorized_amount The amount that has been authorized. This will be 0 when the object is created, and increase after it has been approved. - * @property string $authorized_currency The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property int $authorized_amount [DEPRECATED] The amount that has been authorized. This will be 0 when the object is created, and increase after it has been approved. + * @property string $authorized_currency [DEPRECATED] The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization. * @property \Stripe\Issuing\Card $card You can create physical or virtual cards that are issued to cardholders. * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. - * @property int $held_amount The amount the authorization is expected to be in held_currency. When Stripe holds funds from you, this is the amount reserved for the authorization. This will be 0 when the object is created, and increase after it has been approved. For multi-currency transactions, held_amount can be used to determine the expected exchange rate. - * @property string $held_currency The currency of the held amount. This will always be the card currency. - * @property bool $is_held_amount_controllable If set true, you may provide held_amount to control how much to hold for the authorization. + * @property int $held_amount [DEPRECATED] The amount the authorization is expected to be in held_currency. When Stripe holds funds from you, this is the amount reserved for the authorization. This will be 0 when the object is created, and increase after it has been approved. For multi-currency transactions, held_amount can be used to determine the expected exchange rate. + * @property string $held_currency [DEPRECATED] The currency of the held amount. This will always be the card currency. + * @property bool $is_held_amount_controllable [DEPRECATED] If set true, you may provide held_amount to control how much to hold for the authorization. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. - * @property int $merchant_amount The total amount that was authorized or rejected in the local merchant_currency. + * @property int $merchant_amount The total amount that was authorized or rejected. This amount is in the merchant_currency and in the smallest currency unit. * @property string $merchant_currency The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property \Stripe\StripeObject $merchant_data * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - * @property int $pending_authorized_amount The amount the user is requesting to be authorized. This field will only be non-zero during an issuing.authorization.request webhook. - * @property int $pending_held_amount The additional amount Stripe will hold if the authorization is approved. This field will only be non-zero during an issuing.authorization.request webhook. - * @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an issuing.authorization.request webhook. + * @property int $pending_authorized_amount [DEPRECATED] The amount the user is requesting to be authorized. This field will only be non-zero during an issuing_authorization.request webhook. + * @property int $pending_held_amount [DEPRECATED] The additional amount Stripe will hold if the authorization is approved. This field will only be non-zero during an issuing_authorization.request webhook. + * @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an issuing_authorization.request webhook. * @property \Stripe\StripeObject[] $request_history History of every time the authorization was approved/denied (whether approved/denied by you directly, or by Stripe based on your authorization_controls). If the merchant changes the authorization by performing an incremental authorization or partial capture, you can look at request_history to see the previous states of the authorization. * @property string $status The current status of the authorization in its lifecycle. * @property \Stripe\Issuing\Transaction[] $transactions List of transactions associated with this authorization. diff --git a/lib/Issuing/Card.php b/lib/Issuing/Card.php index 71c7be622..17bc07cb0 100644 --- a/lib/Issuing/Card.php +++ b/lib/Issuing/Card.php @@ -10,7 +10,8 @@ * @property string $object String representing the object's type. Objects of the same type share the same value. * @property \Stripe\StripeObject $authorization_controls * @property string $brand The brand of the card. - * @property null|\Stripe\Issuing\Cardholder $cardholder The Cardholder object to which the card belongs. + * @property null|string $cancellation_reason The reason why the card was canceled. + * @property \Stripe\Issuing\Cardholder $cardholder

An Issuing Cardholder object represents an individual or business entity who is issued cards.

Related guide: How to create a Cardholder

* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property int $exp_month The expiration month of the card. @@ -18,12 +19,13 @@ * @property string $last4 The last 4 digits of the card number. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - * @property string $name The name of the cardholder, printed on the card. + * @property string $name [DEPRECATED] The name of the cardholder, printed on the card. Refer to cardholder.name instead. * @property null|\Stripe\StripeObject $pin Metadata about the PIN on the card. * @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any. * @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any. * @property null|string $replacement_reason The reason why the previous card needed to be replaced. * @property null|\Stripe\StripeObject $shipping Where and how the card will be shipped. + * @property \Stripe\StripeObject $spending_controls * @property string $status Whether authorizations can be approved on this card. * @property string $type The type of the card. */ diff --git a/lib/Issuing/Cardholder.php b/lib/Issuing/Cardholder.php index 9a271cdc3..a0b421af9 100644 --- a/lib/Issuing/Cardholder.php +++ b/lib/Issuing/Cardholder.php @@ -12,7 +12,7 @@ * * @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 null|\Stripe\StripeObject $authorization_controls Spending rules that give you some control over how this cardholder's cards can be used. Refer to our authorizations documentation for more details. + * @property null|\Stripe\StripeObject $authorization_controls [DEPRECATED] Spending rules that give you some control over how this cardholder's cards can be used. Refer to our authorizations documentation for more details. * @property \Stripe\StripeObject $billing * @property null|\Stripe\StripeObject $company Additional information about a company cardholder. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. @@ -24,6 +24,7 @@ * @property string $name The cardholder's name. This will be printed on cards issued to them. * @property null|string $phone_number The cardholder's phone number. * @property \Stripe\StripeObject $requirements + * @property null|\Stripe\StripeObject $spending_controls Spending rules that give you some control over how this cardholder's cards can be used. Refer to our authorizations documentation for more details. * @property string $status Specifies whether to permit authorizations on this cardholder's cards. * @property string $type One of individual or company. */ diff --git a/lib/Issuing/Transaction.php b/lib/Issuing/Transaction.php index 8a1505d47..f51226e98 100644 --- a/lib/Issuing/Transaction.php +++ b/lib/Issuing/Transaction.php @@ -14,16 +14,16 @@ * * @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 int $amount The amount of this transaction in your currency. This is the amount that your balance will be updated by. + * @property int $amount The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit. * @property null|string|\Stripe\Issuing\Authorization $authorization The Authorization object that led to this transaction. * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction associated with this transaction. * @property string|\Stripe\Issuing\Card $card The card used to make this transaction. * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this transaction belongs. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. - * @property null|string|\Stripe\Issuing\Dispute $dispute If you've disputed the transaction, the ID of the dispute object. + * @property null|string|\Stripe\Issuing\Dispute $dispute If you've disputed the transaction, the ID of the dispute. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. - * @property int $merchant_amount The amount that the merchant will receive, denominated in merchant_currency. It will be different from amount if the merchant is taking payment in a different currency. + * @property int $merchant_amount The amount that the merchant will receive, denominated in merchant_currency and in the smallest currency unit. It will be different from amount if the merchant is taking payment in a different currency. * @property string $merchant_currency The currency with which the merchant is taking payment. * @property \Stripe\StripeObject $merchant_data * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. diff --git a/lib/Mandate.php b/lib/Mandate.php index 57a86046d..e53f877ba 100644 --- a/lib/Mandate.php +++ b/lib/Mandate.php @@ -14,8 +14,8 @@ * @property string|\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate. * @property \Stripe\StripeObject $payment_method_details * @property \Stripe\StripeObject $single_use - * @property string $status The status of the Mandate, one of pending, inactive, or active. The Mandate can be used to initiate a payment only if status=active. - * @property string $type The type of the mandate, one of single_use or multi_use + * @property string $status The status of the mandate, which indicates whether it can be used to initiate a payment. + * @property string $type The type of the mandate. */ class Mandate extends ApiResource { diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php index aae2fc637..ef4266464 100644 --- a/lib/PaymentIntent.php +++ b/lib/PaymentIntent.php @@ -44,7 +44,7 @@ * @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. * @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. * @property null|string|\Stripe\Review $review ID of the review associated with this PaymentIntent, if any. - * @property null|string $setup_future_usage

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.

For more, learn to save card details during payment.

Stripe uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by SCA, using off_session will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect off-session payments for this customer.

+ * @property null|string $setup_future_usage

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.

When processing card payments, Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.

* @property null|\Stripe\StripeObject $shipping Shipping information for this PaymentIntent. * @property null|string|\Stripe\StripeObject $source This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. * @property null|string $statement_descriptor For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. diff --git a/lib/Plan.php b/lib/Plan.php index b9ca68da2..da39a20b7 100644 --- a/lib/Plan.php +++ b/lib/Plan.php @@ -8,9 +8,11 @@ * provides limited access to your products, and a * <currency>15</currency>/month plan that allows full access. * - * Related guide: Managing - * Products and Plans. + * Related guides: Set up + * a subscription and more about products + * and plans. * * @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. diff --git a/lib/SubscriptionItem.php b/lib/SubscriptionItem.php index cfa12d4ba..6b40f6810 100644 --- a/lib/SubscriptionItem.php +++ b/lib/SubscriptionItem.php @@ -11,7 +11,7 @@ * @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 key-value pairs 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

Plans define the base price, currency, and billing cycle for subscriptions. For example, you might have a <currency>5</currency>/month plan that provides limited access to your products, and a <currency>15</currency>/month plan that allows full access.

Related guide: Managing Products and Plans.

+ * @property \Stripe\Plan $plan

Plans define the base price, currency, and billing cycle for subscriptions. For example, you might have a <currency>5</currency>/month plan that provides limited access to your products, and a <currency>15</currency>/month plan that allows full access.

Related guides: Set up a subscription and more about products and plans.

* @property int $quantity The quantity of the plan to which the customer should be subscribed. * @property string $subscription The subscription this subscription_item belongs to. * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item. diff --git a/lib/TaxId.php b/lib/TaxId.php index 70414e607..cf36d1547 100644 --- a/lib/TaxId.php +++ b/lib/TaxId.php @@ -16,7 +16,7 @@ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string|\Stripe\Customer $customer ID of the customer. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. - * @property string $type Type of the tax ID, one of au_abn, ca_bn, ca_qst, ch_vat, es_cif, eu_vat, hk_br, in_gst, jp_cn, kr_brn, li_uid, mx_rfc, my_itn, my_sst, no_vat, nz_gst, ru_inn, sg_uen, th_vat, tw_vat, us_ein, or za_vat. Note that some legacy tax IDs have type unknown + * @property string $type Type of the tax ID, one of au_abn, ca_bn, ca_qst, ch_vat, es_cif, eu_vat, hk_br, in_gst, jp_cn, kr_brn, li_uid, mx_rfc, my_itn, my_sst, no_vat, nz_gst, ru_inn, sg_gst, sg_uen, th_vat, tw_vat, us_ein, or za_vat. Note that some legacy tax IDs have type unknown * @property string $value Value of the tax ID. * @property \Stripe\StripeObject $verification */ @@ -43,6 +43,7 @@ class TaxId extends ApiResource const TYPE_NO_VAT = 'no_vat'; const TYPE_NZ_GST = 'nz_gst'; const TYPE_RU_INN = 'ru_inn'; + const TYPE_SG_GST = 'sg_gst'; const TYPE_SG_UEN = 'sg_uen'; const TYPE_TH_VAT = 'th_vat'; const TYPE_TW_VAT = 'tw_vat';