From 482778f3c449112ff1ab8fa663b427bbb93fc7aa Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:21:31 +0000 Subject: [PATCH] Update generated code for v1094 --- OPENAPI_VERSION | 2 +- init.php | 1 - lib/BalanceTransaction.php | 2 +- lib/Charge.php | 1 - lib/Customer.php | 1 - lib/Invoice.php | 1 - lib/Issuing/Authorization.php | 2 ++ lib/PaymentIntent.php | 1 - lib/PlatformTaxFee.php | 17 ----------------- lib/Price.php | 1 - lib/Product.php | 1 - lib/Service/Tax/CalculationService.php | 3 ++- .../Issuing/AuthorizationService.php | 17 +++++++++++++++++ lib/Subscription.php | 1 - lib/Tax/Calculation.php | 3 ++- lib/TaxId.php | 3 ++- lib/Util/ApiVersion.php | 2 +- lib/Util/ObjectTypes.php | 1 - tests/Stripe/GeneratedExamplesTest.php | 6 +++--- 19 files changed, 31 insertions(+), 35 deletions(-) delete mode 100644 lib/PlatformTaxFee.php diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ac0cc575d..ef0925653 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1079 \ No newline at end of file +v1094 \ No newline at end of file diff --git a/init.php b/init.php index 9f2a11ebc..58131a84f 100644 --- a/init.php +++ b/init.php @@ -157,7 +157,6 @@ require __DIR__ . '/lib/Payout.php'; require __DIR__ . '/lib/Person.php'; require __DIR__ . '/lib/Plan.php'; -require __DIR__ . '/lib/PlatformTaxFee.php'; require __DIR__ . '/lib/Price.php'; require __DIR__ . '/lib/Product.php'; require __DIR__ . '/lib/ProductFeature.php'; diff --git a/lib/BalanceTransaction.php b/lib/BalanceTransaction.php index d88cf9b52..5691d9573 100644 --- a/lib/BalanceTransaction.php +++ b/lib/BalanceTransaction.php @@ -22,7 +22,7 @@ * @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. * @property int $net Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by amount - fee * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective. - * @property null|string|\Stripe\ApplicationFee|\Stripe\ApplicationFeeRefund|\Stripe\Charge|\Stripe\ConnectCollectionTransfer|\Stripe\CustomerCashBalanceTransaction|\Stripe\Dispute|\Stripe\Issuing\Authorization|\Stripe\Issuing\Dispute|\Stripe\Issuing\Transaction|\Stripe\Payout|\Stripe\PlatformTaxFee|\Stripe\Refund|\Stripe\ReserveTransaction|\Stripe\TaxDeductedAtSource|\Stripe\Topup|\Stripe\Transfer|\Stripe\TransferReversal $source This transaction relates to the Stripe object. + * @property null|string|\Stripe\ApplicationFee|\Stripe\ApplicationFeeRefund|\Stripe\Charge|\Stripe\ConnectCollectionTransfer|\Stripe\CustomerCashBalanceTransaction|\Stripe\Dispute|\Stripe\Issuing\Authorization|\Stripe\Issuing\Dispute|\Stripe\Issuing\Transaction|\Stripe\Payout|\Stripe\Refund|\Stripe\ReserveTransaction|\Stripe\TaxDeductedAtSource|\Stripe\Topup|\Stripe\Transfer|\Stripe\TransferReversal $source This transaction relates to the Stripe object. * @property string $status The transaction's net funds status in the Stripe balance, which are either available or pending. * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, climate_order_purchase, climate_order_refund, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, obligation_outbound, obligation_reversal_inbound, payment, payment_failure_refund, payment_network_reserve_hold, payment_network_reserve_release, payment_refund, payment_reversal, payment_unreconciled, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category instead. */ diff --git a/lib/Charge.php b/lib/Charge.php index 4b1d575ec..7c4a47fdc 100644 --- a/lib/Charge.php +++ b/lib/Charge.php @@ -64,7 +64,6 @@ class Charge extends ApiResource const OBJECT_NAME = 'charge'; use ApiOperations\NestedResource; - use ApiOperations\Search; use ApiOperations\Update; const STATUS_FAILED = 'failed'; diff --git a/lib/Customer.php b/lib/Customer.php index a89347462..00ef44342 100644 --- a/lib/Customer.php +++ b/lib/Customer.php @@ -43,7 +43,6 @@ class Customer extends ApiResource const OBJECT_NAME = 'customer'; use ApiOperations\NestedResource; - use ApiOperations\Search; use ApiOperations\Update; const TAX_EXEMPT_EXEMPT = 'exempt'; diff --git a/lib/Invoice.php b/lib/Invoice.php index ad158fc3f..d054acf38 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -126,7 +126,6 @@ class Invoice extends ApiResource const OBJECT_NAME = 'invoice'; use ApiOperations\NestedResource; - use ApiOperations\Search; use ApiOperations\Update; const BILLING_REASON_AUTOMATIC_PENDING_INVOICE_ITEM_INVOICE = 'automatic_pending_invoice_item_invoice'; diff --git a/lib/Issuing/Authorization.php b/lib/Issuing/Authorization.php index f675cb167..ed14cd4e8 100644 --- a/lib/Issuing/Authorization.php +++ b/lib/Issuing/Authorization.php @@ -22,6 +22,8 @@ * @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 The currency of the cardholder. This currency can be different from the currency presented at authorization and the merchant_currency field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|\Stripe\StripeObject $fleet Fleet-specific information for authorizations using Fleet cards. + * @property null|\Stripe\StripeObject $fuel Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. * @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. This amount is in the merchant_currency and in the smallest currency unit. merchant_amount should be the same as amount, unless merchant_currency and currency are different. * @property string $merchant_currency The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the currency field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php index f3b122237..b5fc22a58 100644 --- a/lib/PaymentIntent.php +++ b/lib/PaymentIntent.php @@ -62,7 +62,6 @@ class PaymentIntent extends ApiResource { const OBJECT_NAME = 'payment_intent'; - use ApiOperations\Search; use ApiOperations\Update; const CANCELLATION_REASON_ABANDONED = 'abandoned'; diff --git a/lib/PlatformTaxFee.php b/lib/PlatformTaxFee.php deleted file mode 100644 index cb9fea7db..000000000 --- a/lib/PlatformTaxFee.php +++ /dev/null @@ -1,17 +0,0 @@ -Calculation object. + * Calculates tax based on the input and returns a Tax Calculation + * object. * * @param null|array $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts diff --git a/lib/Service/TestHelpers/Issuing/AuthorizationService.php b/lib/Service/TestHelpers/Issuing/AuthorizationService.php index 50db7c836..82faeff47 100644 --- a/lib/Service/TestHelpers/Issuing/AuthorizationService.php +++ b/lib/Service/TestHelpers/Issuing/AuthorizationService.php @@ -57,6 +57,23 @@ public function expire($id, $params = null, $opts = null) return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/expire', $id), $params, $opts); } + /** + * Finalize the amount on an Authorization prior to capture, when the initial + * authorization was for an estimated amount. + * + * @param string $id + * @param null|array $params + * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Authorization + */ + public function finalizeAmount($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/finalize_amount', $id), $params, $opts); + } + /** * Increment a test-mode Authorization. * diff --git a/lib/Subscription.php b/lib/Subscription.php index ea78481c7..89233a9b0 100644 --- a/lib/Subscription.php +++ b/lib/Subscription.php @@ -60,7 +60,6 @@ class Subscription extends ApiResource { const OBJECT_NAME = 'subscription'; - use ApiOperations\Search; use ApiOperations\Update; const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php index f70b46593..d9155267d 100644 --- a/lib/Tax/Calculation.php +++ b/lib/Tax/Calculation.php @@ -30,7 +30,8 @@ class Calculation extends \Stripe\ApiResource const OBJECT_NAME = 'tax.calculation'; /** - * Calculates tax based on input and returns a Tax Calculation object. + * Calculates tax based on the input and returns a Tax Calculation + * object. * * @param null|array $params * @param null|array|string $options diff --git a/lib/TaxId.php b/lib/TaxId.php index 18a214c83..e69a22a88 100644 --- a/lib/TaxId.php +++ b/lib/TaxId.php @@ -17,7 +17,7 @@ * @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 null|\Stripe\StripeObject $owner The account or customer the tax ID belongs to. - * @property string $type Type of the tax ID, one of ad_nrt, ae_trn, ar_cuit, au_abn, au_arn, bg_uic, bh_vat, bo_tin, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_vat, cl_tin, cn_tin, co_nit, cr_tin, de_stn, do_rcn, ec_ruc, 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, kz_bin, li_uid, mx_rfc, my_frp, my_itn, my_sst, ng_tin, no_vat, no_voec, nz_gst, om_vat, pe_ruc, ph_tin, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sv_nit, th_vat, tr_tin, tw_vat, ua_vat, us_ein, uy_ruc, ve_rif, vn_tin, or za_vat. Note that some legacy tax IDs have type unknown + * @property string $type Type of the tax ID, one of ad_nrt, ae_trn, ar_cuit, au_abn, au_arn, bg_uic, bh_vat, bo_tin, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_uid, ch_vat, cl_tin, cn_tin, co_nit, cr_tin, de_stn, do_rcn, ec_ruc, 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, kz_bin, li_uid, mx_rfc, my_frp, my_itn, my_sst, ng_tin, no_vat, no_voec, nz_gst, om_vat, pe_ruc, ph_tin, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sv_nit, th_vat, tr_tin, tw_vat, ua_vat, us_ein, uy_ruc, ve_rif, vn_tin, 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. */ @@ -41,6 +41,7 @@ class TaxId extends ApiResource const TYPE_CA_PST_MB = 'ca_pst_mb'; const TYPE_CA_PST_SK = 'ca_pst_sk'; const TYPE_CA_QST = 'ca_qst'; + const TYPE_CH_UID = 'ch_uid'; const TYPE_CH_VAT = 'ch_vat'; const TYPE_CL_TIN = 'cl_tin'; const TYPE_CN_TIN = 'cn_tin'; diff --git a/lib/Util/ApiVersion.php b/lib/Util/ApiVersion.php index 1c5578dc2..ccf8dc380 100644 --- a/lib/Util/ApiVersion.php +++ b/lib/Util/ApiVersion.php @@ -6,5 +6,5 @@ class ApiVersion { - const CURRENT = '2024-04-10'; + const CURRENT = '2024-06-20'; } diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php index 4bcda072c..07d750092 100644 --- a/lib/Util/ObjectTypes.php +++ b/lib/Util/ObjectTypes.php @@ -90,7 +90,6 @@ class ObjectTypes \Stripe\Payout::OBJECT_NAME => \Stripe\Payout::class, \Stripe\Person::OBJECT_NAME => \Stripe\Person::class, \Stripe\Plan::OBJECT_NAME => \Stripe\Plan::class, - \Stripe\PlatformTaxFee::OBJECT_NAME => \Stripe\PlatformTaxFee::class, \Stripe\Price::OBJECT_NAME => \Stripe\Price::class, \Stripe\Product::OBJECT_NAME => \Stripe\Product::class, \Stripe\ProductFeature::OBJECT_NAME => \Stripe\ProductFeature::class, diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php index de9c2ef01..e7c8eabcc 100644 --- a/tests/Stripe/GeneratedExamplesTest.php +++ b/tests/Stripe/GeneratedExamplesTest.php @@ -3645,7 +3645,7 @@ public function testTestHelpersIssuingAuthorizationsCapturePost() 'type' => 'diesel', 'unit' => 'liter', 'unit_cost_decimal' => '3.5', - 'volume_decimal' => '10', + 'quantity_decimal' => '10', ], 'lodging' => [ 'check_in_at' => 1633651200, @@ -3878,7 +3878,7 @@ public function testTestHelpersIssuingTransactionsCreateForceCapturePost() 'type' => 'diesel', 'unit' => 'liter', 'unit_cost_decimal' => '3.5', - 'volume_decimal' => '10', + 'quantity_decimal' => '10', ], 'lodging' => [ 'check_in_at' => 1533651200, @@ -3939,7 +3939,7 @@ public function testTestHelpersIssuingTransactionsCreateUnlinkedRefundPost() 'type' => 'diesel', 'unit' => 'liter', 'unit_cost_decimal' => '3.5', - 'volume_decimal' => '10', + 'quantity_decimal' => '10', ], 'lodging' => [ 'check_in_at' => 1533651200,