Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1599

Merged
merged 7 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v623
v645
2 changes: 2 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
require __DIR__ . '/lib/Service/SubscriptionScheduleService.php';
require __DIR__ . '/lib/Service/SubscriptionService.php';
require __DIR__ . '/lib/Service/Tax/CalculationService.php';
require __DIR__ . '/lib/Service/Tax/RegistrationService.php';
require __DIR__ . '/lib/Service/Tax/SettingsService.php';
require __DIR__ . '/lib/Service/Tax/TaxServiceFactory.php';
require __DIR__ . '/lib/Service/Tax/TransactionService.php';
Expand Down Expand Up @@ -274,6 +275,7 @@
require __DIR__ . '/lib/SubscriptionSchedule.php';
require __DIR__ . '/lib/Tax/Calculation.php';
require __DIR__ . '/lib/Tax/CalculationLineItem.php';
require __DIR__ . '/lib/Tax/Registration.php';
require __DIR__ . '/lib/Tax/Settings.php';
require __DIR__ . '/lib/Tax/Transaction.php';
require __DIR__ . '/lib/Tax/TransactionLineItem.php';
Expand Down
3 changes: 2 additions & 1 deletion lib/BalanceTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @property string $reporting_category Learn more about how <a href="https://stripe.com/docs/reports/reporting-categories">reporting categories</a> can help you understand balance transactions from an accounting perspective.
* @property null|string|\Stripe\ApplicationFee|\Stripe\ApplicationFeeRefund|\Stripe\Charge|\Stripe\CustomerCashBalanceTransaction|\Stripe\Dispute|\Stripe\Issuing\Authorization|\Stripe\Issuing\Dispute|\Stripe\Issuing\Transaction|\Stripe\Payout|\Stripe\Refund|\Stripe\StripeObject|\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 <code>available</code> or <code>pending</code>.
* @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>anticipation_repayment</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>connect_collection_transfer</code>, <code>contribution</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_dispute</code>, <code>issuing_transaction</code>, <code>obligation_inbound</code>, <code>obligation_outbound</code>, <code>obligation_reversal_inbound</code>, <code>obligation_reversal_outbound</code>, <code>obligation_payout</code>, <code>obligation_payout_failure</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_refund</code>, <code>payment_reversal</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. Learn more about <a href="https://stripe.com/docs/reports/balance-transaction-types">balance transaction types and what they represent</a>. To classify transactions for accounting purposes, consider <code>reporting_category</code> instead.
* @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>anticipation_repayment</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>connect_collection_transfer</code>, <code>contribution</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_dispute</code>, <code>issuing_transaction</code>, <code>obligation_inbound</code>, <code>obligation_outbound</code>, <code>obligation_reversal_inbound</code>, <code>obligation_reversal_outbound</code>, <code>obligation_payout</code>, <code>obligation_payout_failure</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_refund</code>, <code>payment_reversal</code>, <code>payment_unreconciled</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. Learn more about <a href="https://stripe.com/docs/reports/balance-transaction-types">balance transaction types and what they represent</a>. To classify transactions for accounting purposes, consider <code>reporting_category</code> instead.
*/
class BalanceTransaction extends ApiResource
{
Expand Down Expand Up @@ -56,6 +56,7 @@ class BalanceTransaction extends ApiResource
const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund';
const TYPE_PAYMENT_REFUND = 'payment_refund';
const TYPE_PAYMENT_REVERSAL = 'payment_reversal';
const TYPE_PAYMENT_UNRECONCILED = 'payment_unreconciled';
const TYPE_PAYOUT = 'payout';
const TYPE_PAYOUT_CANCEL = 'payout_cancel';
const TYPE_PAYOUT_FAILURE = 'payout_failure';
Expand Down
2 changes: 1 addition & 1 deletion lib/BankAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> 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 $requirements Information about the requirements for the bank account, including what information needs to be collected.
* @property null|string $routing_number The routing transit number for the bank account.
* @property string $status <p>For bank accounts, possible values are <code>new</code>, <code>validated</code>, <code>verified</code>, <code>verification_failed</code>, or <code>errored</code>. A bank account that hasn't had any activity or validation performed is <code>new</code>. If Stripe can determine that the bank account exists, its status will be <code>validated</code>. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be <code>verified</code>. If the verification failed for any reason, such as microdeposit failure, the status will be <code>verification_failed</code>. If a transfer sent to this bank account fails, we'll set the status to <code>errored</code> and will not continue to send transfers until the bank details are updated.</p><p>For external accounts, possible values are <code>new</code>, <code>errored</code> and <code>verification_failed</code>. If a transfer fails, the status is set to <code>errored</code> and transfers are stopped until account details are updated. In India, if we can't <a href="https://support.stripe.com/questions/bank-account-ownership-verification">verify the owner of the bank account</a>, we'll set the status to <code>verification_failed</code>. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.</p>
* @property string $status <p>For bank accounts, possible values are <code>new</code>, <code>validated</code>, <code>verified</code>, <code>verification_failed</code>, or <code>errored</code>. A bank account that hasn't had any activity or validation performed is <code>new</code>. If Stripe can determine that the bank account exists, its status will be <code>validated</code>. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be <code>verified</code>. If the verification failed for any reason, such as microdeposit failure, the status will be <code>verification_failed</code>. If a payout sent to this bank account fails, we'll set the status to <code>errored</code> and will not continue to send <a href="https://stripe.com/docs/payouts#payout-schedule">scheduled payouts</a> until the bank details are updated.</p><p>For external accounts, possible values are <code>new</code>, <code>errored</code> and <code>verification_failed</code>. If a payouts fails, the status is set to <code>errored</code> and scheduled payouts are stopped until account details are updated. In India, if we can't <a href="https://support.stripe.com/questions/bank-account-ownership-verification">verify the owner of the bank account</a>, we'll set the status to <code>verification_failed</code>. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.</p>
*/
class BankAccount extends ApiResource
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @property string $last4 The last four digits of the card.
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> 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.
* @property null|string $status For external accounts, possible values are <code>new</code> and <code>errored</code>. If a transfer fails, the status is set to <code>errored</code> and transfers are stopped until account details are updated.
* @property null|string $status For external accounts that are cards, possible values are <code>new</code> and <code>errored</code>. If a payout fails, the status is set to <code>errored</code> and <a href="https://stripe.com/docs/payouts#payout-schedule">scheduled payouts</a> are stopped until account details are updated.
* @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be <code>android_pay</code> (includes Google Pay), <code>apple_pay</code>, <code>masterpass</code>, <code>visa_checkout</code>, or null.
*/
class Card extends ApiResource
Expand Down
1 change: 1 addition & 0 deletions lib/CustomerCashBalanceTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ class CustomerCashBalanceTransaction extends ApiResource
const TYPE_REFUNDED_FROM_PAYMENT = 'refunded_from_payment';
const TYPE_RETURN_CANCELED = 'return_canceled';
const TYPE_RETURN_INITIATED = 'return_initiated';
const TYPE_TRANSFERRED_TO_BALANCE = 'transferred_to_balance';
const TYPE_UNAPPLIED_FROM_PAYMENT = 'unapplied_from_payment';
}
1 change: 1 addition & 0 deletions lib/ErrorObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class ErrorObject extends StripeObject
const CODE_TESTMODE_CHARGES_ONLY = 'testmode_charges_only';
const CODE_TLS_VERSION_UNSUPPORTED = 'tls_version_unsupported';
const CODE_TOKEN_ALREADY_USED = 'token_already_used';
const CODE_TOKEN_CARD_NETWORK_INVALID = 'token_card_network_invalid';
const CODE_TOKEN_IN_USE = 'token_in_use';
const CODE_TRANSFER_SOURCE_BALANCE_PARAMETERS_MISMATCH = 'transfer_source_balance_parameters_mismatch';
const CODE_TRANSFERS_NOT_ALLOWED = 'transfers_not_allowed';
Expand Down
37 changes: 26 additions & 11 deletions lib/ExchangeRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,32 @@
namespace Stripe;

/**
* <code>Exchange Rate</code> objects allow you to determine the rates that Stripe is
* currently using to convert from one currency to another. Since this number is
* variable throughout the day, there are various reasons why you might want to
* know the current rate (for example, to dynamically price an item for a user
* with a default payment in a foreign currency).
*
* If you want a guarantee that the charge is made with a certain exchange rate
* you expect is current, you can pass in <code>exchange_rate</code> to charges endpoints.
* If the value is no longer up to date, the charge won't go through. Please
* refer to our <a href="https://stripe.com/docs/exchange-rates">Exchange Rates API</a> guide for more
* details.
* <code>ExchangeRate</code> objects allow you to determine the rates that Stripe is currently
* using to convert from one currency to another. Since this number is variable
* throughout the day, there are various reasons why you might want to know the current
* rate (for example, to dynamically price an item for a user with a default
* payment in a foreign currency).
*
* Please refer to our <a href="https://stripe.com/docs/fx-rates">Exchange Rates API</a> guide for more details.
*
* <em>[Note: this integration path is supported but no longer recommended]</em> Additionally,
* you can guarantee that a charge is made with an exchange rate that you expect is
* current. To do so, you must pass in the exchange_rate to charges endpoints. If the
* value is no longer up to date, the charge won't go through. Please refer to our
* <a href="https://stripe.com/docs/exchange-rates">Using with charges</a> guide for more details.
*
* -----
*
*
*
* <em>This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:</em>
*
* - <em>localize prices for processing payments on Stripe</em>
* - <em>reconcile Stripe transactions</em>
* - <em>determine how much money to send to a connected account</em>
* - <em>determine app fees to charge a connected account</em>
*
* <em>Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.</em>
*
* @property string $id Unique identifier for the object. Represented as the three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> in lowercase.
* @property string $object String representing the object's type. Objects of the same type share the same value.
Expand Down
2 changes: 2 additions & 0 deletions lib/PaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
* @property null|\Stripe\StripeObject $pix
* @property null|\Stripe\StripeObject $promptpay
* @property null|\Stripe\StripeObject $radar_options Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> for more information.
* @property null|\Stripe\StripeObject $revolut_pay
* @property null|\Stripe\StripeObject $sepa_debit
* @property null|\Stripe\StripeObject $sofort
* @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
Expand Down Expand Up @@ -91,6 +92,7 @@ class PaymentMethod extends ApiResource
const TYPE_PAYPAL = 'paypal';
const TYPE_PIX = 'pix';
const TYPE_PROMPTPAY = 'promptpay';
const TYPE_REVOLUT_PAY = 'revolut_pay';
const TYPE_SEPA_DEBIT = 'sepa_debit';
const TYPE_SOFORT = 'sofort';
const TYPE_US_BANK_ACCOUNT = 'us_bank_account';
Expand Down
57 changes: 57 additions & 0 deletions lib/Service/Tax/RegistrationService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\Tax;

class RegistrationService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of Tax <code>Registration</code> objects.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Tax\Registration>
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/tax/registrations', $params, $opts);
}

/**
* Creates a new Tax <code>Registration</code> object.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Registration
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v1/tax/registrations', $params, $opts);
}

/**
* Updates an existing Tax <code>Registration</code> object.
*
* A registration cannot be deleted after it has been created. If you wish to end a
* registration you may do so by setting <code>expires_at</code>.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Registration
*/
public function update($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/tax/registrations/%s', $id), $params, $opts);
}
}
2 changes: 2 additions & 0 deletions lib/Service/Tax/TaxServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Service factory class for API resources in the Tax namespace.
*
* @property CalculationService $calculations
* @property RegistrationService $registrations
* @property SettingsService $settings
* @property TransactionService $transactions
*/
Expand All @@ -18,6 +19,7 @@ class TaxServiceFactory extends \Stripe\Service\AbstractServiceFactory
*/
private static $classMap = [
'calculations' => CalculationService::class,
'registrations' => RegistrationService::class,
'settings' => SettingsService::class,
'transactions' => TransactionService::class,
];
Expand Down
35 changes: 35 additions & 0 deletions lib/Tax/Registration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Tax;

/**
* A Tax <code>Registration</code> lets us know that your business is registered to collect tax on payments within a region, enabling you to <a href="https://stripe.com/docs/tax">automatically collect tax</a>.
*
* Stripe doesn't register on your behalf with the relevant authorities when you create a Tax <code>Registration</code> object. For more information on how to register to collect tax, see <a href="https://stripe.com/docs/tax/registering">our guide</a>.
*
* Related guide: <a href="https://stripe.com/docs/tax/registrations-api">Using the Registrations API</a>
*
* @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 $active_from Time at which the registration becomes active. Measured in seconds since the Unix epoch.
* @property string $country Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a>).
* @property \Stripe\StripeObject $country_options
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|int $expires_at If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property string $status The status of the registration. This field is present for convenience and can be deduced from <code>active_from</code> and <code>expires_at</code>.
*/
class Registration extends \Stripe\ApiResource
{
const OBJECT_NAME = 'tax.registration';

use \Stripe\ApiOperations\All;
use \Stripe\ApiOperations\Create;
use \Stripe\ApiOperations\Update;

const STATUS_ACTIVE = 'active';
const STATUS_EXPIRED = 'expired';
const STATUS_SCHEDULED = 'scheduled';
}
1 change: 1 addition & 0 deletions lib/Util/ObjectTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class ObjectTypes
\Stripe\SubscriptionSchedule::OBJECT_NAME => \Stripe\SubscriptionSchedule::class,
\Stripe\Tax\Calculation::OBJECT_NAME => \Stripe\Tax\Calculation::class,
\Stripe\Tax\CalculationLineItem::OBJECT_NAME => \Stripe\Tax\CalculationLineItem::class,
\Stripe\Tax\Registration::OBJECT_NAME => \Stripe\Tax\Registration::class,
\Stripe\Tax\Settings::OBJECT_NAME => \Stripe\Tax\Settings::class,
\Stripe\Tax\Transaction::OBJECT_NAME => \Stripe\Tax\Transaction::class,
\Stripe\Tax\TransactionLineItem::OBJECT_NAME => \Stripe\Tax\TransactionLineItem::class,
Expand Down
Loading
Loading