Skip to content

Commit

Permalink
Update generated code (#1654)
Browse files Browse the repository at this point in the history
* Update generated code for v840

* Update generated code for v841

* Update generated code for v849

* Update generated code for v851

* Update generated code for v852

* Update generated code for v853

* Update generated code for v855

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: anniel-stripe <97691964+anniel-stripe@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] and anniel-stripe authored Feb 29, 2024
1 parent dd82995 commit 0cfa628
Show file tree
Hide file tree
Showing 27 changed files with 184 additions and 28 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v840
v855
6 changes: 6 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
require __DIR__ . '/lib/AccountLink.php';
require __DIR__ . '/lib/AccountSession.php';
require __DIR__ . '/lib/ApplePayDomain.php';
require __DIR__ . '/lib/Application.php';
require __DIR__ . '/lib/ApplicationFee.php';
require __DIR__ . '/lib/ApplicationFeeRefund.php';
require __DIR__ . '/lib/Apps/Secret.php';
Expand All @@ -101,6 +102,7 @@
require __DIR__ . '/lib/Climate/Order.php';
require __DIR__ . '/lib/Climate/Product.php';
require __DIR__ . '/lib/Climate/Supplier.php';
require __DIR__ . '/lib/ConnectCollectionTransfer.php';
require __DIR__ . '/lib/CountrySpec.php';
require __DIR__ . '/lib/Coupon.php';
require __DIR__ . '/lib/CreditNote.php';
Expand Down Expand Up @@ -144,6 +146,7 @@
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/PromotionCode.php';
Expand All @@ -154,6 +157,7 @@
require __DIR__ . '/lib/Refund.php';
require __DIR__ . '/lib/Reporting/ReportRun.php';
require __DIR__ . '/lib/Reporting/ReportType.php';
require __DIR__ . '/lib/ReserveTransaction.php';
require __DIR__ . '/lib/Review.php';
require __DIR__ . '/lib/Service/AccountLinkService.php';
require __DIR__ . '/lib/Service/AccountService.php';
Expand Down Expand Up @@ -281,6 +285,7 @@
require __DIR__ . '/lib/ShippingRate.php';
require __DIR__ . '/lib/Sigma/ScheduledQueryRun.php';
require __DIR__ . '/lib/Source.php';
require __DIR__ . '/lib/SourceMandateNotification.php';
require __DIR__ . '/lib/SourceTransaction.php';
require __DIR__ . '/lib/Subscription.php';
require __DIR__ . '/lib/SubscriptionItem.php';
Expand All @@ -292,6 +297,7 @@
require __DIR__ . '/lib/Tax/Transaction.php';
require __DIR__ . '/lib/Tax/TransactionLineItem.php';
require __DIR__ . '/lib/TaxCode.php';
require __DIR__ . '/lib/TaxDeductedAtSource.php';
require __DIR__ . '/lib/TaxId.php';
require __DIR__ . '/lib/TaxRate.php';
require __DIR__ . '/lib/Terminal/Configuration.php';
Expand Down
15 changes: 15 additions & 0 deletions lib/Application.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;

/**
* @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 $name The name of the application.
*/
class Application extends ApiResource
{
const OBJECT_NAME = 'application';
}
2 changes: 1 addition & 1 deletion lib/ApplicationFee.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @property string|\Stripe\Account $account ID of the Stripe account this fee was taken from.
* @property int $amount Amount earned, in cents (or local equivalent).
* @property int $amount_refunded Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued)
* @property string|\Stripe\StripeObject $application ID of the Connect application that earned the fee.
* @property string|\Stripe\Application $application ID of the Connect application that earned the fee.
* @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).
* @property string|\Stripe\Charge $charge ID of the charge that the application fee was taken from.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down
2 changes: 1 addition & 1 deletion lib/BalanceTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>amount</code> - <code>fee</code>
* @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 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 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>climate_order_purchase</code>, <code>climate_order_refund</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_outbound</code>, <code>obligation_reversal_inbound</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_network_reserve_hold</code>, <code>payment_network_reserve_release</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.
*/
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 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>
* @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 payout fails, the status is set to <code>errored</code> and scheduled payouts are stopped until account details are updated. In the US and 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/BillingPortal/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,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 bool $active Whether the configuration is active and can be used to create portal sessions.
* @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the configuration.
* @property null|string|\Stripe\Application $application ID of the Connect Application that created the configuration.
* @property \Stripe\StripeObject $business_profile
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $default_return_url The default URL to redirect customers to when they click on the portal's link to return to your website. This can be <a href="https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url">overriden</a> when creating the session.
Expand Down
4 changes: 2 additions & 2 deletions lib/Capability.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class Capability extends ApiResource
{
const OBJECT_NAME = 'capability';

use ApiOperations\Update;

const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive';
const STATUS_PENDING = 'pending';
const STATUS_UNREQUESTED = 'unrequested';

use ApiOperations\Update;

/**
* @return string the API URL for this Stripe account reversal
*/
Expand Down
34 changes: 33 additions & 1 deletion lib/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @property int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or <a href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
* @property int $amount_captured Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
* @property int $amount_refunded Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
* @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the charge.
* @property null|string|\Stripe\Application $application ID of the Connect application that created the charge.
* @property null|string|\Stripe\ApplicationFee $application_fee The application fee (if any) for the charge. <a href="https://stripe.com/docs/connect/direct-charges#collecting-fees">See the Connect documentation</a> for details.
* @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. <a href="https://stripe.com/docs/connect/direct-charges#collecting-fees">See the Connect documentation</a> for details.
* @property null|string $authorization_code Authorization code on the charge.
Expand Down Expand Up @@ -65,6 +65,7 @@ class Charge extends ApiResource

use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\NestedResource;
use ApiOperations\Retrieve;
use ApiOperations\Search;
use ApiOperations\Update;
Expand Down Expand Up @@ -157,4 +158,35 @@ public static function search($params = null, $opts = null)

return static::_requestPage($url, \Stripe\SearchResult::class, $params, $opts);
}

const PATH_REFUNDS = '/refunds';

/**
* @param string $id the ID of the charge on which to retrieve the refunds
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Refund> the list of refunds
*/
public static function allRefunds($id, $params = null, $opts = null)
{
return self::_allNestedResources($id, static::PATH_REFUNDS, $params, $opts);
}

/**
* @param string $id the ID of the charge to which the refund belongs
* @param string $refundId the ID of the refund to retrieve
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Refund
*/
public static function retrieveRefund($id, $refundId, $params = null, $opts = null)
{
return self::_retrieveNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts);
}
}
Loading

0 comments on commit 0cfa628

Please sign in to comment.