diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8f166ae2e..846b7ef32 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1268 \ No newline at end of file +v1278 \ No newline at end of file diff --git a/examples/ExampleTemplate.php b/examples/ExampleTemplate.php new file mode 100644 index 000000000..295d6ed8f --- /dev/null +++ b/examples/ExampleTemplate.php @@ -0,0 +1,40 @@ + + * + * In this example, we: + * - + * - + */ +require 'vendor/autoload.php'; // Make sure to include Composer's autoload file +// Use this require statement to import the SDK from this repo folder +// require '../init.php'; + +class ExampleTemplate +{ + private $apiKey; + + public function __construct($apiKey) + { + $this->apiKey = $apiKey; + } + + public function doSomethingGreat() + { + echo "Hello World\n"; + // $client = new \Stripe\StripeClient($this->apiKey); + } +} + +// Usage +$apiKey = '{{API_KEY}}'; + +$example = new ExampleTemplate($apiKey); +$example->doSomethingGreat(); diff --git a/examples/MeterEventStream.php b/examples/MeterEventStream.php index cce30a0d6..84a6b0711 100644 --- a/examples/MeterEventStream.php +++ b/examples/MeterEventStream.php @@ -1,5 +1,16 @@ apiKey = $apiKey; - } - - public function doSomethingGreat() - { - echo "Hello World\n"; - // $client = new \Stripe\StripeClient($this->apiKey); - } -} - -// Usage -$apiKey = '{{API_KEY}}'; - -$example = new NewExample($apiKey); -$example->doSomethingGreat(); diff --git a/examples/README.md b/examples/README.md index 8ba8046cb..ab6e9b736 100644 --- a/examples/README.md +++ b/examples/README.md @@ -3,9 +3,14 @@ From the examples folder, run: `php your_example.php` +e.g. + +`php ThinEventWebhookHandler.php` + ## Adding a new example -1. Clone new_example.php +1. Clone ExampleTemplate.php 2. Implement your example -3. Run it (as per above) -4. 👍 +3. Fill out the file comment. Include a description and key steps that are being demonstrated. +4. Run it (as per above) +5. 👍 diff --git a/examples/stripe_webhook_handler.php b/examples/ThinEventWebhookHandler.php similarity index 70% rename from examples/stripe_webhook_handler.php rename to examples/ThinEventWebhookHandler.php index b81ae2414..e1a3f87c1 100644 --- a/examples/stripe_webhook_handler.php +++ b/examples/ThinEventWebhookHandler.php @@ -1,5 +1,14 @@ Account Link or Account Session, this property is only returned for accounts where controller.requirement_collection is application, which includes Custom accounts. * @property null|\Stripe\StripeObject $capabilities - * @property null|bool $charges_enabled Whether the account can create live charges. + * @property null|bool $charges_enabled Whether the account can process charges. * @property null|\Stripe\StripeObject $company * @property null|\Stripe\StripeObject $controller * @property null|string $country The account's country. @@ -33,9 +33,10 @@ * @property null|string $email An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. * @property null|\Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where controller[is_controller] is true. * @property null|\Stripe\StripeObject $future_requirements + * @property null|\Stripe\StripeObject $groups The groups associated with the account. * @property null|\Stripe\Person $individual

This is an object representing a person associated with a Stripe account.

A platform cannot access a person for an account where account.controller.requirement_collection is stripe, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.

See the Standard onboarding or Express onboarding documentation for information about prefilling information and account onboarding steps. Learn more about handling identity verification with the API.

* @property null|\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|bool $payouts_enabled Whether Stripe can send payouts to this account. + * @property null|bool $payouts_enabled Whether the funds in this account can be paid out. * @property null|\Stripe\StripeObject $requirements * @property null|\Stripe\StripeObject $risk_controls * @property null|\Stripe\StripeObject $settings Options for customizing how the account functions within Stripe. diff --git a/lib/Billing/CreditGrant.php b/lib/Billing/CreditGrant.php index 76d91eb07..b78503e13 100644 --- a/lib/Billing/CreditGrant.php +++ b/lib/Billing/CreditGrant.php @@ -13,12 +13,12 @@ * @property \Stripe\StripeObject $applicability_config * @property string $category The category of this credit grant. * @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 to whom the credit was granted. + * @property string|\Stripe\Customer $customer ID of the customer to whom the credit was granted. * @property null|int $effective_at The time when the credit becomes effective i.e when it is eligible to be used. * @property null|int $expires_at The time when the credit will expire. If not present, the credit will never expire. * @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|string $name A descriptive name shown in dashboard and on invoices. + * @property null|string $name A descriptive name shown in dashboard. * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this credit grant belongs to. * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. * @property null|int $voided_at The time when this credit grant was voided. If not present, the credit grant hasn't been voided. diff --git a/lib/Billing/Meter.php b/lib/Billing/Meter.php index e89213981..7cee9d347 100644 --- a/lib/Billing/Meter.php +++ b/lib/Billing/Meter.php @@ -7,6 +7,8 @@ /** * A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. * + * Related guide: Usage based billing + * * @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 $created Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/lib/ErrorObject.php b/lib/ErrorObject.php index d032ab7d0..eaf19e1a1 100644 --- a/lib/ErrorObject.php +++ b/lib/ErrorObject.php @@ -173,6 +173,7 @@ class ErrorObject extends StripeObject const CODE_PAYMENT_METHOD_UNEXPECTED_STATE = 'payment_method_unexpected_state'; const CODE_PAYMENT_METHOD_UNSUPPORTED_TYPE = 'payment_method_unsupported_type'; const CODE_PAYOUT_RECONCILIATION_NOT_READY = 'payout_reconciliation_not_ready'; + const CODE_PAYOUT_STATEMENT_DESCRIPTOR_PROFANITY = 'payout_statement_descriptor_profanity'; const CODE_PAYOUTS_LIMIT_EXCEEDED = 'payouts_limit_exceeded'; const CODE_PAYOUTS_NOT_ALLOWED = 'payouts_not_allowed'; const CODE_PLATFORM_ACCOUNT_REQUIRED = 'platform_account_required'; diff --git a/lib/Event.php b/lib/Event.php index 02d538636..acdd1010b 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -247,6 +247,7 @@ class Event extends ApiResource const RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created'; const RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated'; const REFUND_CREATED = 'refund.created'; + const REFUND_FAILED = 'refund.failed'; const REFUND_UPDATED = 'refund.updated'; const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed'; const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded'; @@ -517,6 +518,7 @@ class Event extends ApiResource const TYPE_RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created'; const TYPE_RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated'; const TYPE_REFUND_CREATED = 'refund.created'; + const TYPE_REFUND_FAILED = 'refund.failed'; const TYPE_REFUND_UPDATED = 'refund.updated'; const TYPE_REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed'; const TYPE_REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded'; diff --git a/lib/Forwarding/Request.php b/lib/Forwarding/Request.php index f772c91bf..24efc5aa0 100644 --- a/lib/Forwarding/Request.php +++ b/lib/Forwarding/Request.php @@ -26,6 +26,7 @@ * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @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 $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 $payment_method The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. * @property string[] $replacements The field kinds to be replaced in the forwarded request. * @property null|\Stripe\StripeObject $request_context Context about the request from Stripe's servers to the destination endpoint. diff --git a/lib/Invoice.php b/lib/Invoice.php index 3b27ea64c..33387efac 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -122,7 +122,7 @@ * @property null|\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items. * @property null|int $total_excluding_tax The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. * @property null|\Stripe\StripeObject[] $total_margin_amounts The aggregate amounts calculated per margin across all line items. - * @property null|\Stripe\StripeObject[] $total_pretax_credit_amounts + * @property null|\Stripe\StripeObject[] $total_pretax_credit_amounts Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. * @property \Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items. * @property null|\Stripe\StripeObject $transfer_data The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. * @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. diff --git a/lib/InvoiceLineItem.php b/lib/InvoiceLineItem.php index d2bba32cf..f1138112f 100644 --- a/lib/InvoiceLineItem.php +++ b/lib/InvoiceLineItem.php @@ -26,7 +26,7 @@ * @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. Note that for line items with type=subscription, metadata reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. * @property \Stripe\StripeObject $period * @property null|\Stripe\Plan $plan The plan of the subscription, if the line item is a subscription or a proration. - * @property null|\Stripe\StripeObject[] $pretax_credit_amounts + * @property null|\Stripe\StripeObject[] $pretax_credit_amounts Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. * @property null|\Stripe\Price $price The price of the line item. * @property bool $proration Whether this is a proration. * @property null|\Stripe\StripeObject $proration_details Additional details for proration line items diff --git a/lib/Issuing/Authorization.php b/lib/Issuing/Authorization.php index ed14cd4e8..83d498664 100644 --- a/lib/Issuing/Authorization.php +++ b/lib/Issuing/Authorization.php @@ -52,6 +52,7 @@ class Authorization extends \Stripe\ApiResource const AUTHORIZATION_METHOD_SWIPE = 'swipe'; const STATUS_CLOSED = 'closed'; + const STATUS_EXPIRED = 'expired'; const STATUS_PENDING = 'pending'; const STATUS_REVERSED = 'reversed'; diff --git a/lib/PaymentMethod.php b/lib/PaymentMethod.php index 17e015a46..f0e248fb8 100644 --- a/lib/PaymentMethod.php +++ b/lib/PaymentMethod.php @@ -37,16 +37,20 @@ * @property null|\Stripe\StripeObject $grabpay * @property null|\Stripe\StripeObject $ideal * @property null|\Stripe\StripeObject $interac_present + * @property null|\Stripe\StripeObject $kakao_pay * @property null|\Stripe\StripeObject $klarna * @property null|\Stripe\StripeObject $konbini + * @property null|\Stripe\StripeObject $kr_card * @property null|\Stripe\StripeObject $link * @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 $mb_way * @property null|\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|\Stripe\StripeObject $mobilepay * @property null|\Stripe\StripeObject $multibanco + * @property null|\Stripe\StripeObject $naver_pay * @property null|\Stripe\StripeObject $oxxo * @property null|\Stripe\StripeObject $p24 + * @property null|\Stripe\StripeObject $payco * @property null|\Stripe\StripeObject $paynow * @property null|\Stripe\StripeObject $paypal * @property null|\Stripe\StripeObject $payto @@ -55,6 +59,7 @@ * @property null|\Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information. * @property null|\Stripe\StripeObject $rechnung * @property null|\Stripe\StripeObject $revolut_pay + * @property null|\Stripe\StripeObject $samsung_pay * @property null|\Stripe\StripeObject $sepa_debit * @property null|\Stripe\StripeObject $sofort * @property null|\Stripe\StripeObject $swish @@ -94,14 +99,18 @@ class PaymentMethod extends ApiResource const TYPE_GRABPAY = 'grabpay'; const TYPE_IDEAL = 'ideal'; const TYPE_INTERAC_PRESENT = 'interac_present'; + const TYPE_KAKAO_PAY = 'kakao_pay'; const TYPE_KLARNA = 'klarna'; const TYPE_KONBINI = 'konbini'; + const TYPE_KR_CARD = 'kr_card'; const TYPE_LINK = 'link'; const TYPE_MB_WAY = 'mb_way'; const TYPE_MOBILEPAY = 'mobilepay'; const TYPE_MULTIBANCO = 'multibanco'; + const TYPE_NAVER_PAY = 'naver_pay'; const TYPE_OXXO = 'oxxo'; const TYPE_P24 = 'p24'; + const TYPE_PAYCO = 'payco'; const TYPE_PAYNOW = 'paynow'; const TYPE_PAYPAL = 'paypal'; const TYPE_PAYTO = 'payto'; @@ -109,6 +118,7 @@ class PaymentMethod extends ApiResource const TYPE_PROMPTPAY = 'promptpay'; const TYPE_RECHNUNG = 'rechnung'; const TYPE_REVOLUT_PAY = 'revolut_pay'; + const TYPE_SAMSUNG_PAY = 'samsung_pay'; const TYPE_SEPA_DEBIT = 'sepa_debit'; const TYPE_SOFORT = 'sofort'; const TYPE_SWISH = 'swish'; diff --git a/lib/Person.php b/lib/Person.php index cd79aebf4..467295ed1 100644 --- a/lib/Person.php +++ b/lib/Person.php @@ -26,7 +26,7 @@ * @property null|string $first_name_kanji The Kanji variation of the person's first name (Japan only). * @property null|string[] $full_name_aliases A list of alternate names or aliases that the person is known by. * @property null|\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when. - * @property null|string $gender The person's gender (International regulations require either "male" or "female"). + * @property null|string $gender The person's gender. * @property null|bool $id_number_provided Whether the person's id_number was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by ssn_last_4_provided). * @property null|bool $id_number_secondary_provided Whether the person's id_number_secondary was provided. * @property null|string $last_name The person's last name. diff --git a/lib/QuotePreviewInvoice.php b/lib/QuotePreviewInvoice.php index 03dbac57e..525dffb7a 100644 --- a/lib/QuotePreviewInvoice.php +++ b/lib/QuotePreviewInvoice.php @@ -118,7 +118,7 @@ * @property null|\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items. * @property null|int $total_excluding_tax The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. * @property null|\Stripe\StripeObject[] $total_margin_amounts The aggregate amounts calculated per margin across all line items. - * @property null|\Stripe\StripeObject[] $total_pretax_credit_amounts + * @property null|\Stripe\StripeObject[] $total_pretax_credit_amounts Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. * @property \Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items. * @property null|\Stripe\StripeObject $transfer_data The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. * @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. diff --git a/lib/Service/TestHelpers/Issuing/CardService.php b/lib/Service/TestHelpers/Issuing/CardService.php index 78b7b18f5..6046119ef 100644 --- a/lib/Service/TestHelpers/Issuing/CardService.php +++ b/lib/Service/TestHelpers/Issuing/CardService.php @@ -77,4 +77,22 @@ public function shipCard($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/ship', $id), $params, $opts); } + + /** + * Updates the shipping status of the specified Issuing Card object to + * submitted. This method is only available with Stripe Version + * ‘2024-09-30.acacia’ or above. + * + * @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\Card + */ + public function submitCard($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/submit', $id), $params, $opts); + } } diff --git a/lib/TaxId.php b/lib/TaxId.php index e0b491178..b86befc41 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_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, hr_oib, 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, by_tin, 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, hr_oib, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kr_brn, kz_bin, li_uid, ma_vat, md_vat, 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, tz_vat, ua_vat, us_ein, uy_ruc, uz_tin, uz_vat, 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. */ @@ -35,6 +35,7 @@ class TaxId extends ApiResource const TYPE_BO_TIN = 'bo_tin'; const TYPE_BR_CNPJ = 'br_cnpj'; const TYPE_BR_CPF = 'br_cpf'; + const TYPE_BY_TIN = 'by_tin'; const TYPE_CA_BN = 'ca_bn'; const TYPE_CA_GST_HST = 'ca_gst_hst'; const TYPE_CA_PST_BC = 'ca_pst_bc'; @@ -70,6 +71,8 @@ class TaxId extends ApiResource const TYPE_KR_BRN = 'kr_brn'; const TYPE_KZ_BIN = 'kz_bin'; const TYPE_LI_UID = 'li_uid'; + const TYPE_MA_VAT = 'ma_vat'; + const TYPE_MD_VAT = 'md_vat'; const TYPE_MX_RFC = 'mx_rfc'; const TYPE_MY_FRP = 'my_frp'; const TYPE_MY_ITN = 'my_itn'; @@ -93,10 +96,13 @@ class TaxId extends ApiResource const TYPE_TH_VAT = 'th_vat'; const TYPE_TR_TIN = 'tr_tin'; const TYPE_TW_VAT = 'tw_vat'; + const TYPE_TZ_VAT = 'tz_vat'; const TYPE_UA_VAT = 'ua_vat'; const TYPE_UNKNOWN = 'unknown'; const TYPE_US_EIN = 'us_ein'; const TYPE_UY_RUC = 'uy_ruc'; + const TYPE_UZ_TIN = 'uz_tin'; + const TYPE_UZ_VAT = 'uz_vat'; const TYPE_VE_RIF = 've_rif'; const TYPE_VN_TIN = 'vn_tin'; const TYPE_ZA_VAT = 'za_vat'; diff --git a/lib/TaxRate.php b/lib/TaxRate.php index 976a6e0c6..bd52b3923 100644 --- a/lib/TaxRate.php +++ b/lib/TaxRate.php @@ -17,12 +17,14 @@ * @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. * @property null|float $effective_percentage Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction. + * @property null|\Stripe\StripeObject $flat_amount The amount of the tax rate when the rate_type is flat_amount. Tax rates with rate_type percentage can vary based on the transaction, resulting in this field being null. This field exposes the amount and currency of the flat tax rate. * @property bool $inclusive This specifies if the tax rate is inclusive or exclusive. * @property null|string $jurisdiction The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. * @property null|string $jurisdiction_level The level of the jurisdiction that imposes this tax rate. Will be null for manually defined tax rates. * @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 $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 float $percentage Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. + * @property null|string $rate_type Indicates the type of tax rate applied to the taxable amount. This value can be null when no tax applies to the location. * @property null|string $state ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States. * @property null|string $tax_type The high-level tax type, such as vat or sales_tax. */ @@ -39,6 +41,9 @@ class TaxRate extends ApiResource const JURISDICTION_LEVEL_MULTIPLE = 'multiple'; const JURISDICTION_LEVEL_STATE = 'state'; + const RATE_TYPE_FLAT_AMOUNT = 'flat_amount'; + const RATE_TYPE_PERCENTAGE = 'percentage'; + const TAX_TYPE_AMUSEMENT_TAX = 'amusement_tax'; const TAX_TYPE_COMMUNICATIONS_TAX = 'communications_tax'; const TAX_TYPE_GST = 'gst'; @@ -48,6 +53,7 @@ class TaxRate extends ApiResource const TAX_TYPE_LEASE_TAX = 'lease_tax'; const TAX_TYPE_PST = 'pst'; const TAX_TYPE_QST = 'qst'; + const TAX_TYPE_RETAIL_DELIVERY_FEE = 'retail_delivery_fee'; const TAX_TYPE_RST = 'rst'; const TAX_TYPE_SALES_TAX = 'sales_tax'; const TAX_TYPE_VAT = 'vat'; diff --git a/lib/Treasury/FinancialAccount.php b/lib/Treasury/FinancialAccount.php index 0cccf05d3..b77eb7e6a 100644 --- a/lib/Treasury/FinancialAccount.php +++ b/lib/Treasury/FinancialAccount.php @@ -22,7 +22,7 @@ * @property null|string[] $pending_features The array of paths to pending Features in the Features hash. * @property null|\Stripe\StripeObject $platform_restrictions The set of functionalities that the platform can restrict on the FinancialAccount. * @property null|string[] $restricted_features The array of paths to restricted Features in the Features hash. - * @property string $status The enum specifying what state the account is in. + * @property string $status Status of this FinancialAccount. * @property \Stripe\StripeObject $status_details * @property string[] $supported_currencies The currencies the FinancialAccount can hold a balance in. Three-letter ISO currency code, in lowercase. */ diff --git a/lib/UsageRecordSummary.php b/lib/UsageRecordSummary.php index 174e14e03..d9a983928 100644 --- a/lib/UsageRecordSummary.php +++ b/lib/UsageRecordSummary.php @@ -5,6 +5,8 @@ namespace Stripe; /** + * A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period. + * * @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|string $invoice The invoice in which this usage period has been billed for.