diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ae2bb1461..a0025bd12 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v425 \ No newline at end of file +v432 \ No newline at end of file diff --git a/lib/Account.php b/lib/Account.php index 10d296c1e..ba060664d 100644 --- a/lib/Account.php +++ b/lib/Account.php @@ -29,7 +29,7 @@ * @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 * @property null|\Stripe\StripeObject $future_requirements - * @property null|\Stripe\Person $individual

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

A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps.

Related guide: Handling identity verification with the API

+ * @property null|\Stripe\Person $individual

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

A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform prefilling and account onboarding steps.

Related guide: 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|\Stripe\StripeObject $requirements diff --git a/lib/ApplicationFee.php b/lib/ApplicationFee.php index 2a53204a8..a03956a22 100644 --- a/lib/ApplicationFee.php +++ b/lib/ApplicationFee.php @@ -18,7 +18,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 null|string|\Stripe\Charge $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the destination parameter. * @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. - * @property \Stripe\Collection<\Stripe\StripeObject> $refunds A list of refunds that have been applied to the fee. + * @property \Stripe\Collection<\Stripe\ApplicationFeeRefund> $refunds A list of refunds that have been applied to the fee. */ class ApplicationFee extends ApiResource { diff --git a/lib/Apps/Secret.php b/lib/Apps/Secret.php index 7e73abdcc..d5577897c 100644 --- a/lib/Apps/Secret.php +++ b/lib/Apps/Secret.php @@ -18,6 +18,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 int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|bool $deleted If true, indicates that this secret has been deleted * @property null|int $expires_at The Unix timestamp for the expiry time of the secret, after which the secret deletes. * @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 $name A name for the secret that's unique within the scope. diff --git a/lib/BalanceTransaction.php b/lib/BalanceTransaction.php index 38684492f..551872b52 100644 --- a/lib/BalanceTransaction.php +++ b/lib/BalanceTransaction.php @@ -54,8 +54,8 @@ class BalanceTransaction extends ApiResource const TYPE_PAYOUT_FAILURE = 'payout_failure'; const TYPE_REFUND = 'refund'; const TYPE_REFUND_FAILURE = 'refund_failure'; - const TYPE_RESERVE_TRANSACTION = 'reserve_transaction'; const TYPE_RESERVED_FUNDS = 'reserved_funds'; + const TYPE_RESERVE_TRANSACTION = 'reserve_transaction'; const TYPE_STRIPE_FEE = 'stripe_fee'; const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee'; const TYPE_TAX_FEE = 'tax_fee'; diff --git a/lib/Card.php b/lib/Card.php index 38de620fe..e5cfe82c3 100644 --- a/lib/Card.php +++ b/lib/Card.php @@ -29,11 +29,14 @@ * @property null|string|\Stripe\Customer $customer The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. * @property null|string $cvc_check If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see Check if a card is valid without a charge. * @property null|bool $default_for_currency Whether this card is the default external account for its currency. + * @property null|string $description A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) * @property null|string $dynamic_last4 (For tokenized numbers only.) The last four digits of the device account number. * @property int $exp_month Two-digit number representing the card's expiration month. * @property int $exp_year Four-digit number representing the card's expiration year. * @property null|string $fingerprint

Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.

Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.

* @property string $funding Card funding type. Can be credit, debit, prepaid, or unknown. + * @property null|string $iin Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + * @property null|string $issuer The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) * @property string $last4 The last four digits of the card. * @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|string $name Cardholder name. diff --git a/lib/Charge.php b/lib/Charge.php index 6bcdc1a46..9fdcf74cc 100644 --- a/lib/Charge.php +++ b/lib/Charge.php @@ -152,7 +152,7 @@ public function capture($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\SearchResult the charge search results + * @return \Stripe\SearchResult<\Stripe\Charge> the charge search results */ public static function search($params = null, $opts = null) { diff --git a/lib/Checkout/Session.php b/lib/Checkout/Session.php index 111a9bdd9..44553d9f9 100644 --- a/lib/Checkout/Session.php +++ b/lib/Checkout/Session.php @@ -128,7 +128,7 @@ public function expire($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\LineItem> list of LineItems + * @return \Stripe\Collection<\Stripe\LineItem> list of line items */ public static function allLineItems($id, $params = null, $opts = null) { diff --git a/lib/CreditNote.php b/lib/CreditNote.php index 736fe1b2a..fbed84143 100644 --- a/lib/CreditNote.php +++ b/lib/CreditNote.php @@ -85,7 +85,7 @@ public static function preview($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\CreditNoteLineItem> list of CreditNoteLineItems + * @return \Stripe\Collection<\Stripe\CreditNoteLineItem> list of credit note line items */ public static function previewLines($params = null, $opts = null) { diff --git a/lib/Customer.php b/lib/Customer.php index 885533ab8..7d3f8983c 100644 --- a/lib/Customer.php +++ b/lib/Customer.php @@ -88,7 +88,7 @@ public function deleteDiscount($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\PaymentMethod> list of PaymentMethods + * @return \Stripe\Collection<\Stripe\PaymentMethod> list of payment methods */ public static function allPaymentMethods($id, $params = null, $opts = null) { @@ -107,7 +107,7 @@ public static function allPaymentMethods($id, $params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Customer the retrieved customer + * @return \Stripe\PaymentMethod the retrieved payment method */ public function retrievePaymentMethod($payment_method, $params = null, $opts = null) { @@ -125,7 +125,7 @@ public function retrievePaymentMethod($payment_method, $params = null, $opts = n * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\SearchResult the customer search results + * @return \Stripe\SearchResult<\Stripe\Customer> the customer search results */ public static function search($params = null, $opts = null) { diff --git a/lib/Event.php b/lib/Event.php index cae3e9f62..bbaa96ac6 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -63,8 +63,8 @@ class Event extends ApiResource const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated'; const ACCOUNT_UPDATED = 'account.updated'; const APPLICATION_FEE_CREATED = 'application_fee.created'; - const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated'; const APPLICATION_FEE_REFUNDED = 'application_fee.refunded'; + const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated'; const BALANCE_AVAILABLE = 'balance.available'; const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created'; const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated'; @@ -80,8 +80,8 @@ class Event extends ApiResource const CHARGE_EXPIRED = 'charge.expired'; const CHARGE_FAILED = 'charge.failed'; const CHARGE_PENDING = 'charge.pending'; - const CHARGE_REFUND_UPDATED = 'charge.refund.updated'; const CHARGE_REFUNDED = 'charge.refunded'; + const CHARGE_REFUND_UPDATED = 'charge.refund.updated'; const CHARGE_SUCCEEDED = 'charge.succeeded'; const CHARGE_UPDATED = 'charge.updated'; const CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed'; @@ -94,6 +94,7 @@ class Event extends ApiResource const CREDIT_NOTE_CREATED = 'credit_note.created'; const CREDIT_NOTE_UPDATED = 'credit_note.updated'; const CREDIT_NOTE_VOIDED = 'credit_note.voided'; + const CUSTOMER_CASH_BALANCE_TRANSACTION_CREATED = 'customer_cash_balance_transaction.created'; const CUSTOMER_CREATED = 'customer.created'; const CUSTOMER_DELETED = 'customer.deleted'; const CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created'; @@ -115,7 +116,6 @@ class Event extends ApiResource const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted'; const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated'; const CUSTOMER_UPDATED = 'customer.updated'; - const CUSTOMER_CASH_BALANCE_TRANSACTION_CREATED = 'customer_cash_balance_transaction.created'; const FILE_CREATED = 'file.created'; const FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created'; const FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated'; @@ -128,6 +128,9 @@ class Event extends ApiResource const IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted'; const IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input'; const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified'; + const INVOICEITEM_CREATED = 'invoiceitem.created'; + const INVOICEITEM_DELETED = 'invoiceitem.deleted'; + const INVOICEITEM_UPDATED = 'invoiceitem.updated'; const INVOICE_CREATED = 'invoice.created'; const INVOICE_DELETED = 'invoice.deleted'; const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed'; @@ -141,16 +144,13 @@ class Event extends ApiResource const INVOICE_UPCOMING = 'invoice.upcoming'; const INVOICE_UPDATED = 'invoice.updated'; const INVOICE_VOIDED = 'invoice.voided'; - const INVOICEITEM_CREATED = 'invoiceitem.created'; - const INVOICEITEM_DELETED = 'invoiceitem.deleted'; - const INVOICEITEM_UPDATED = 'invoiceitem.updated'; const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created'; const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request'; const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated'; - const ISSUING_CARD_CREATED = 'issuing_card.created'; - const ISSUING_CARD_UPDATED = 'issuing_card.updated'; const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created'; const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated'; + const ISSUING_CARD_CREATED = 'issuing_card.created'; + const ISSUING_CARD_UPDATED = 'issuing_card.updated'; const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed'; const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created'; const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated'; @@ -233,9 +233,9 @@ class Event extends ApiResource const SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring'; const SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released'; const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated'; - const TAX_SETTINGS_UPDATED = 'tax.settings.updated'; const TAX_RATE_CREATED = 'tax_rate.created'; const TAX_RATE_UPDATED = 'tax_rate.updated'; + const TAX_SETTINGS_UPDATED = 'tax.settings.updated'; const TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed'; const TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded'; const TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing'; diff --git a/lib/FinancialConnections/Account.php b/lib/FinancialConnections/Account.php index 306844437..70bc46306 100644 --- a/lib/FinancialConnections/Account.php +++ b/lib/FinancialConnections/Account.php @@ -72,7 +72,7 @@ public function disconnect($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\FinancialConnections\AccountOwner> list of BankConnectionsResourceOwners + * @return \Stripe\Collection<\Stripe\FinancialConnections\AccountOwner> list of account owners */ public static function allOwners($id, $params = null, $opts = null) { diff --git a/lib/Invoice.php b/lib/Invoice.php index 13d6b2558..05ab389f5 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -131,9 +131,6 @@ class Invoice extends ApiResource use ApiOperations\Search; use ApiOperations\Update; - const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically'; - const BILLING_SEND_INVOICE = 'send_invoice'; - const BILLING_REASON_AUTOMATIC_PENDING_INVOICE_ITEM_INVOICE = 'automatic_pending_invoice_item_invoice'; const BILLING_REASON_MANUAL = 'manual'; const BILLING_REASON_QUOTE_ACCEPT = 'quote_accept'; @@ -151,14 +148,18 @@ class Invoice extends ApiResource const CUSTOMER_TAX_EXEMPT_NONE = 'none'; const CUSTOMER_TAX_EXEMPT_REVERSE = 'reverse'; - /** @deprecated */ - const STATUS_DELETED = 'deleted'; const STATUS_DRAFT = 'draft'; const STATUS_OPEN = 'open'; const STATUS_PAID = 'paid'; const STATUS_UNCOLLECTIBLE = 'uncollectible'; const STATUS_VOID = 'void'; + const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically'; + const BILLING_SEND_INVOICE = 'send_invoice'; + + /** @deprecated */ + const STATUS_DELETED = 'deleted'; + /** * @param null|array $params * @param null|array|string $opts @@ -251,7 +252,7 @@ public static function upcoming($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\InvoiceLineItem> list of InvoiceLineItems + * @return \Stripe\Collection<\Stripe\InvoiceLineItem> list of invoice line items */ public static function upcomingLines($params = null, $opts = null) { @@ -286,7 +287,7 @@ public function voidInvoice($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\SearchResult the invoice search results + * @return \Stripe\SearchResult<\Stripe\Invoice> the invoice search results */ public static function search($params = null, $opts = null) { diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php index 29aa72b56..22c507613 100644 --- a/lib/PaymentIntent.php +++ b/lib/PaymentIntent.php @@ -201,7 +201,7 @@ public function verifyMicrodeposits($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\SearchResult the payment intent search results + * @return \Stripe\SearchResult<\Stripe\PaymentIntent> the payment intent search results */ public static function search($params = null, $opts = null) { diff --git a/lib/PaymentLink.php b/lib/PaymentLink.php index a4b8f246b..c006d9328 100644 --- a/lib/PaymentLink.php +++ b/lib/PaymentLink.php @@ -72,7 +72,7 @@ class PaymentLink extends ApiResource * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\LineItem> list of LineItems + * @return \Stripe\Collection<\Stripe\LineItem> list of line items */ public static function allLineItems($id, $params = null, $opts = null) { diff --git a/lib/Payout.php b/lib/Payout.php index 1a7599093..f34263752 100644 --- a/lib/Payout.php +++ b/lib/Payout.php @@ -47,22 +47,6 @@ class Payout extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; - const FAILURE_ACCOUNT_CLOSED = 'account_closed'; - const FAILURE_ACCOUNT_FROZEN = 'account_frozen'; - const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted'; - const FAILURE_BANK_OWNERSHIP_CHANGED = 'bank_ownership_changed'; - const FAILURE_COULD_NOT_PROCESS = 'could_not_process'; - const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; - const FAILURE_DECLINED = 'declined'; - const FAILURE_INCORRECT_ACCOUNT_HOLDER_ADDRESS = 'incorrect_account_holder_address'; - const FAILURE_INCORRECT_ACCOUNT_HOLDER_NAME = 'incorrect_account_holder_name'; - const FAILURE_INCORRECT_ACCOUNT_HOLDER_TAX_ID = 'incorrect_account_holder_tax_id'; - const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds'; - const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number'; - const FAILURE_INVALID_CURRENCY = 'invalid_currency'; - const FAILURE_NO_ACCOUNT = 'no_account'; - const FAILURE_UNSUPPORTED_CARD = 'unsupported_card'; - const METHOD_INSTANT = 'instant'; const METHOD_STANDARD = 'standard'; @@ -79,6 +63,22 @@ class Payout extends ApiResource const TYPE_BANK_ACCOUNT = 'bank_account'; const TYPE_CARD = 'card'; + const FAILURE_ACCOUNT_CLOSED = 'account_closed'; + const FAILURE_ACCOUNT_FROZEN = 'account_frozen'; + const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted'; + const FAILURE_BANK_OWNERSHIP_CHANGED = 'bank_ownership_changed'; + const FAILURE_COULD_NOT_PROCESS = 'could_not_process'; + const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; + const FAILURE_DECLINED = 'declined'; + const FAILURE_INCORRECT_ACCOUNT_HOLDER_ADDRESS = 'incorrect_account_holder_address'; + const FAILURE_INCORRECT_ACCOUNT_HOLDER_NAME = 'incorrect_account_holder_name'; + const FAILURE_INCORRECT_ACCOUNT_HOLDER_TAX_ID = 'incorrect_account_holder_tax_id'; + const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds'; + const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number'; + const FAILURE_INVALID_CURRENCY = 'invalid_currency'; + const FAILURE_NO_ACCOUNT = 'no_account'; + const FAILURE_UNSUPPORTED_CARD = 'unsupported_card'; + /** * @param null|array $params * @param null|array|string $opts diff --git a/lib/Person.php b/lib/Person.php index d303748e4..708e35880 100644 --- a/lib/Person.php +++ b/lib/Person.php @@ -8,7 +8,7 @@ * This is an object representing a person associated with a Stripe account. * * A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. - * See the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps. + * See the Standard onboarding or Express onboarding documentation for information about platform prefilling and account onboarding steps. * * Related guide: Handling identity verification with the API * diff --git a/lib/Price.php b/lib/Price.php index 78ed4fe55..2cb28f132 100644 --- a/lib/Price.php +++ b/lib/Price.php @@ -63,7 +63,7 @@ class Price extends ApiResource * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\SearchResult the price search results + * @return \Stripe\SearchResult<\Stripe\Price> the price search results */ public static function search($params = null, $opts = null) { diff --git a/lib/Product.php b/lib/Product.php index aad2e55a8..ca8dcaa92 100644 --- a/lib/Product.php +++ b/lib/Product.php @@ -56,7 +56,7 @@ class Product extends ApiResource * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\SearchResult the product search results + * @return \Stripe\SearchResult<\Stripe\Product> the product search results */ public static function search($params = null, $opts = null) { diff --git a/lib/Quote.php b/lib/Quote.php index 54872b5e8..88aea036a 100644 --- a/lib/Quote.php +++ b/lib/Quote.php @@ -119,7 +119,7 @@ public function finalizeQuote($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\LineItem> list of LineItems + * @return \Stripe\Collection<\Stripe\LineItem> list of line items */ public static function allComputedUpfrontLineItems($id, $params = null, $opts = null) { @@ -138,7 +138,7 @@ public static function allComputedUpfrontLineItems($id, $params = null, $opts = * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\LineItem> list of LineItems + * @return \Stripe\Collection<\Stripe\LineItem> list of line items */ public static function allLineItems($id, $params = null, $opts = null) { @@ -163,7 +163,7 @@ public function pdf($readBodyChunkCallable, $params = null, $opts = null) { $opts = \Stripe\Util\RequestOptions::parse($opts); if (!isset($opts->apiBase)) { - $opts->apiBase = Stripe::$apiUploadBase; + $opts->apiBase = \Stripe\Stripe::$apiUploadBase; } $url = $this->instanceUrl() . '/pdf'; $this->_requestStream('get', $url, $readBodyChunkCallable, $params, $opts); diff --git a/lib/Service/AccountService.php b/lib/Service/AccountService.php index a7ffbb38e..9cc5713df 100644 --- a/lib/Service/AccountService.php +++ b/lib/Service/AccountService.php @@ -81,9 +81,9 @@ public function allPersons($parentId, $params = null, $opts = null) * platform. * * If you’ve already collected information for your connected accounts, you can pre-fill that information - * when creating the account. Connect Onboarding won’t ask for the pre-filled - * information during account onboarding. You can pre-fill any information on the + * href="/docs/connect/best-practices#onboarding">can prefill that information + * when creating the account. Connect Onboarding won’t ask for the prefilled + * information during account onboarding. You can prefill any information on the * account. * * @param null|array $params diff --git a/lib/Service/CustomerService.php b/lib/Service/CustomerService.php index 978844253..3c13d008c 100644 --- a/lib/Service/CustomerService.php +++ b/lib/Service/CustomerService.php @@ -228,6 +228,8 @@ public function deleteDiscount($id, $params = null, $opts = null) } /** + * Delete a specified source for a given customer. + * * @param string $parentId * @param string $id * @param null|array $params @@ -461,6 +463,8 @@ public function updateCashBalance($parentId, $params = null, $opts = null) } /** + * Update a specified source for a given customer. + * * @param string $parentId * @param string $id * @param null|array $params @@ -476,6 +480,8 @@ public function updateSource($parentId, $id, $params = null, $opts = null) } /** + * Verify a specified bank account for a given customer. + * * @param string $parentId * @param string $id * @param null|array $params diff --git a/lib/Source.php b/lib/Source.php index 1093ac2ef..d03ede648 100644 --- a/lib/Source.php +++ b/lib/Source.php @@ -145,7 +145,7 @@ public function detach($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\SourceTransaction> list of SourceTransactions + * @return \Stripe\Collection<\Stripe\SourceTransaction> list of source transactions */ public static function allSourceTransactions($id, $params = null, $opts = null) { diff --git a/lib/Subscription.php b/lib/Subscription.php index 9253b2516..b99206750 100644 --- a/lib/Subscription.php +++ b/lib/Subscription.php @@ -66,15 +66,6 @@ class Subscription extends ApiResource const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; - const PAYMENT_BEHAVIOR_ALLOW_INCOMPLETE = 'allow_incomplete'; - const PAYMENT_BEHAVIOR_DEFAULT_INCOMPLETE = 'default_incomplete'; - const PAYMENT_BEHAVIOR_ERROR_IF_INCOMPLETE = 'error_if_incomplete'; - const PAYMENT_BEHAVIOR_PENDING_IF_INCOMPLETE = 'pending_if_incomplete'; - - const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice'; - const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations'; - const PRORATION_BEHAVIOR_NONE = 'none'; - const STATUS_ACTIVE = 'active'; const STATUS_CANCELED = 'canceled'; const STATUS_INCOMPLETE = 'incomplete'; @@ -117,6 +108,15 @@ public function deleteDiscount($params = null, $opts = null) return $this; } + const PAYMENT_BEHAVIOR_ALLOW_INCOMPLETE = 'allow_incomplete'; + const PAYMENT_BEHAVIOR_DEFAULT_INCOMPLETE = 'default_incomplete'; + const PAYMENT_BEHAVIOR_ERROR_IF_INCOMPLETE = 'error_if_incomplete'; + const PAYMENT_BEHAVIOR_PENDING_IF_INCOMPLETE = 'pending_if_incomplete'; + + const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice'; + const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations'; + const PRORATION_BEHAVIOR_NONE = 'none'; + /** * @param null|array $params * @param null|array|string $opts @@ -157,7 +157,7 @@ public function resume($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\SearchResult the subscription search results + * @return \Stripe\SearchResult<\Stripe\Subscription> the subscription search results */ public static function search($params = null, $opts = null) { diff --git a/lib/SubscriptionItem.php b/lib/SubscriptionItem.php index e70e357ec..a3f7c910d 100644 --- a/lib/SubscriptionItem.php +++ b/lib/SubscriptionItem.php @@ -33,7 +33,7 @@ class SubscriptionItem extends ApiResource const PATH_USAGE_RECORDS = '/usage_records'; /** - * @param null|string $id the ID of the subscription item on which to create the usage record + * @param string $id the ID of the subscription item on which to create the usage record * @param null|array $params * @param null|array|string $opts * @@ -45,7 +45,6 @@ public static function createUsageRecord($id, $params = null, $opts = null) { return self::_createNestedResource($id, static::PATH_USAGE_RECORDS, $params, $opts); } - const PATH_USAGE_RECORD_SUMMARIES = '/usage_record_summaries'; /** diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php index 86191feb9..db2f3480a 100644 --- a/lib/Tax/Calculation.php +++ b/lib/Tax/Calculation.php @@ -37,7 +37,7 @@ class Calculation extends \Stripe\ApiResource * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\Tax\CalculationLineItem> list of TaxProductResourceTaxCalculationLineItems + * @return \Stripe\Collection<\Stripe\Tax\CalculationLineItem> list of calculation line items */ public static function allLineItems($id, $params = null, $opts = null) { diff --git a/lib/Tax/Transaction.php b/lib/Tax/Transaction.php index ef0fc5b08..587a49bc2 100644 --- a/lib/Tax/Transaction.php +++ b/lib/Tax/Transaction.php @@ -76,7 +76,7 @@ public static function createReversal($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\Tax\TransactionLineItem> list of TaxProductResourceTaxTransactionLineItems + * @return \Stripe\Collection<\Stripe\Tax\TransactionLineItem> list of transaction line items */ public static function allLineItems($id, $params = null, $opts = null) { diff --git a/lib/Treasury/FinancialAccount.php b/lib/Treasury/FinancialAccount.php index 23f30a438..e7ae8982c 100644 --- a/lib/Treasury/FinancialAccount.php +++ b/lib/Treasury/FinancialAccount.php @@ -43,7 +43,7 @@ class FinancialAccount extends \Stripe\ApiResource * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Treasury\FinancialAccount the retrieved financial account + * @return \Stripe\Treasury\FinancialAccountFeatures the retrieved financial account features */ public function retrieveFeatures($params = null, $opts = null) { @@ -61,7 +61,7 @@ public function retrieveFeatures($params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Treasury\FinancialAccount the updated financial account + * @return \Stripe\Treasury\FinancialAccountFeatures the updated financial account features */ public function updateFeatures($params = null, $opts = null) { diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php index 792471ee2..ef5f49425 100644 --- a/tests/Stripe/GeneratedExamplesTest.php +++ b/tests/Stripe/GeneratedExamplesTest.php @@ -18,7 +18,7 @@ final class GeneratedExamplesTest extends \Stripe\TestCase /** @before */ protected function setUpService() { - $this->client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]); + $this->client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL, 'files_base' => MOCK_URL]); } public function testListSecret() @@ -4093,4 +4093,15 @@ public function testPreviewLinesCreditNote() static::assertInstanceOf(\Stripe\Collection::class, $result); static::assertInstanceOf(\Stripe\CreditNoteLineItem::class, $result->data[0]); } + + public function testPdfQuote() + { + $this->expectsRequestStream('get', '/v1/quotes/qt_xxxxxxxxxxxxx/pdf'); + $result = $this->client->quotes->pdf( + 'qt_xxxxxxxxxxxxx', + function () {}, + [] + ); + // TODO: assert proper instance, {"shape":"file"} + } }