From 6fbac2b24b39fccaa8001f28ecebc6ade0e144a4 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Wed, 9 Nov 2022 13:02:59 -0800 Subject: [PATCH] New API version --- lib/Charge.php | 2 +- lib/PaymentIntent.php | 2 +- lib/Refund.php | 5 +++++ lib/Service/Issuing/AuthorizationService.php | 8 ++++++-- lib/Subscription.php | 1 + lib/TaxId.php | 5 ++++- lib/Util/ApiVersion.php | 2 +- 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/Charge.php b/lib/Charge.php index 3e265d8ed..8a084863a 100644 --- a/lib/Charge.php +++ b/lib/Charge.php @@ -53,7 +53,7 @@ * @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 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<\Stripe\Refund> $refunds A list of refunds that have been applied to the charge. + * @property null|\Stripe\Collection<\Stripe\Refund> $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. * @property null|\Stripe\StripeObject $shipping Shipping information for the charge. * @property null|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to payment_method or payment_method_details instead. diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php index 961802650..7fd577960 100644 --- a/lib/PaymentIntent.php +++ b/lib/PaymentIntent.php @@ -30,7 +30,6 @@ * @property null|int $canceled_at Populated when status is canceled, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. * @property null|string $cancellation_reason Reason for cancellation of this PaymentIntent, either user-provided (duplicate, fraudulent, requested_by_customer, or abandoned) or generated by Stripe internally (failed_invoice, void_invoice, or automatic). * @property string $capture_method Controls when the funds will be captured from the customer's account. - * @property \Stripe\Collection<\Stripe\Charge> $charges Charges that were created by this PaymentIntent, if any. * @property null|string $client_secret

The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.

The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.

Refer to our docs to accept a payment and learn about how client_secret should be handled.

* @property string $confirmation_method * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. @@ -39,6 +38,7 @@ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|string|\Stripe\Invoice $invoice ID of the invoice that created this PaymentIntent, if it exists. * @property null|\Stripe\StripeObject $last_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + * @property null|string|\Stripe\Charge $latest_charge The latest charge created by this payment intent. * @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. For more information, see the documentation. * @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. diff --git a/lib/Refund.php b/lib/Refund.php index 0ddabfc4e..fd7eef280 100644 --- a/lib/Refund.php +++ b/lib/Refund.php @@ -9,6 +9,11 @@ * been created but not yet refunded. Funds will be refunded to the credit or debit * card that was originally charged. * + * Stripe Tax users with recurring payments and invoices can create Credit Notes, which reduce + * overall tax liability because tax is correctly recalculated and apportioned to + * the related invoice. + * * Related guide: Refunds. * * @property string $id Unique identifier for the object. diff --git a/lib/Service/Issuing/AuthorizationService.php b/lib/Service/Issuing/AuthorizationService.php index 6517688f6..d36f48ed9 100644 --- a/lib/Service/Issuing/AuthorizationService.php +++ b/lib/Service/Issuing/AuthorizationService.php @@ -27,7 +27,9 @@ public function all($params = null, $opts = null) * Approves a pending Issuing Authorization object. This request * should be made within the timeout window of the real-time - * authorization flow. + * authorization flow. You can also respond directly to the webhook request to + * approve an authorization (preferred). More details can be found here. * * @param string $id * @param null|array $params @@ -46,7 +48,9 @@ public function approve($id, $params = null, $opts = null) * Declines a pending Issuing Authorization object. This request * should be made within the timeout window of the real time - * authorization flow. + * authorization flow. You can also respond directly to the webhook request to + * decline an authorization (preferred). More details can be found here. * * @param string $id * @param null|array $params diff --git a/lib/Subscription.php b/lib/Subscription.php index 6de61c0b5..0c7a8209b 100644 --- a/lib/Subscription.php +++ b/lib/Subscription.php @@ -39,6 +39,7 @@ * @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 null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at pending_invoice_item_interval. + * @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. * @property null|\Stripe\StripeObject $pause_collection If specified, payment collection for this subscription will be paused. * @property null|\Stripe\StripeObject $payment_settings Payment settings passed on to invoices created by the subscription. * @property null|\Stripe\StripeObject $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval. diff --git a/lib/TaxId.php b/lib/TaxId.php index 5ea4f27cb..0e2dd4acd 100644 --- a/lib/TaxId.php +++ b/lib/TaxId.php @@ -18,7 +18,7 @@ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|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 ae_trn, au_abn, au_arn, bg_uic, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_vat, cl_tin, es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, hk_br, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kr_brn, li_uid, mx_rfc, my_frp, my_itn, my_sst, no_vat, nz_gst, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, th_vat, tw_vat, ua_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 ae_trn, au_abn, au_arn, bg_uic, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_vat, cl_tin, eg_tin, es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, hk_br, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kr_brn, li_uid, mx_rfc, my_frp, my_itn, my_sst, no_vat, nz_gst, ph_tin, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, th_vat, tr_tin, tw_vat, ua_vat, us_ein, or za_vat. Note that some legacy tax IDs have type unknown * @property string $value Value of the tax ID. * @property null|\Stripe\StripeObject $verification Tax ID verification information. */ @@ -42,6 +42,7 @@ class TaxId extends ApiResource const TYPE_CA_QST = 'ca_qst'; const TYPE_CH_VAT = 'ch_vat'; const TYPE_CL_TIN = 'cl_tin'; + const TYPE_EG_TIN = 'eg_tin'; const TYPE_ES_CIF = 'es_cif'; const TYPE_EU_OSS_VAT = 'eu_oss_vat'; const TYPE_EU_VAT = 'eu_vat'; @@ -65,6 +66,7 @@ class TaxId extends ApiResource const TYPE_MY_SST = 'my_sst'; const TYPE_NO_VAT = 'no_vat'; const TYPE_NZ_GST = 'nz_gst'; + const TYPE_PH_TIN = 'ph_tin'; const TYPE_RU_INN = 'ru_inn'; const TYPE_RU_KPP = 'ru_kpp'; const TYPE_SA_VAT = 'sa_vat'; @@ -72,6 +74,7 @@ class TaxId extends ApiResource const TYPE_SG_UEN = 'sg_uen'; const TYPE_SI_TIN = 'si_tin'; const TYPE_TH_VAT = 'th_vat'; + const TYPE_TR_TIN = 'tr_tin'; const TYPE_TW_VAT = 'tw_vat'; const TYPE_UA_VAT = 'ua_vat'; const TYPE_UNKNOWN = 'unknown'; diff --git a/lib/Util/ApiVersion.php b/lib/Util/ApiVersion.php index 7cd0170ae..b671a4f32 100644 --- a/lib/Util/ApiVersion.php +++ b/lib/Util/ApiVersion.php @@ -6,5 +6,5 @@ class ApiVersion { - const CURRENT = '2022-08-01'; + const CURRENT = '2022-11-09'; }