Skip to content

Commit

Permalink
Merge pull request #1783 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Nov 7, 2024
2 parents 8735e04 + 6a20962 commit c53049c
Show file tree
Hide file tree
Showing 27 changed files with 516 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Add support for `gopay`, `qris`, and `shopeepay` on `PaymentMethodConfiguration`

## 16.2.0 - 2024-10-29
* [#1772](https://github.com/stripe/stripe-php/pull/1772) Update generated code
* [#1772](https://github.com/stripe/stripe-php/pull/1772) This release changes the pinned API version to `2024-10-28.acacia`.
* Add support for new resource `V2.EventDestinations`
* Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations`
* Add support for `submit_card` test helper method on resource `Issuing.Card`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1319
v1333
6 changes: 6 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
require __DIR__ . '/lib/Issuing/CreditUnderwritingRecord.php';
require __DIR__ . '/lib/Issuing/Dispute.php';
require __DIR__ . '/lib/Issuing/DisputeSettlementDetail.php';
require __DIR__ . '/lib/Issuing/FraudLiabilityDebit.php';
require __DIR__ . '/lib/Issuing/PersonalizationDesign.php';
require __DIR__ . '/lib/Issuing/PhysicalBundle.php';
require __DIR__ . '/lib/Issuing/Settlement.php';
Expand All @@ -181,11 +182,13 @@
require __DIR__ . '/lib/Mandate.php';
require __DIR__ . '/lib/Margin.php';
require __DIR__ . '/lib/Order.php';
require __DIR__ . '/lib/PaymentAttemptRecord.php';
require __DIR__ . '/lib/PaymentIntent.php';
require __DIR__ . '/lib/PaymentLink.php';
require __DIR__ . '/lib/PaymentMethod.php';
require __DIR__ . '/lib/PaymentMethodConfiguration.php';
require __DIR__ . '/lib/PaymentMethodDomain.php';
require __DIR__ . '/lib/PaymentRecord.php';
require __DIR__ . '/lib/Payout.php';
require __DIR__ . '/lib/Person.php';
require __DIR__ . '/lib/Plan.php';
Expand Down Expand Up @@ -275,6 +278,7 @@
require __DIR__ . '/lib/Service/Issuing/CreditUnderwritingRecordService.php';
require __DIR__ . '/lib/Service/Issuing/DisputeService.php';
require __DIR__ . '/lib/Service/Issuing/DisputeSettlementDetailService.php';
require __DIR__ . '/lib/Service/Issuing/FraudLiabilityDebitService.php';
require __DIR__ . '/lib/Service/Issuing/IssuingServiceFactory.php';
require __DIR__ . '/lib/Service/Issuing/PersonalizationDesignService.php';
require __DIR__ . '/lib/Service/Issuing/PhysicalBundleService.php';
Expand All @@ -283,11 +287,13 @@
require __DIR__ . '/lib/Service/MandateService.php';
require __DIR__ . '/lib/Service/MarginService.php';
require __DIR__ . '/lib/Service/OrderService.php';
require __DIR__ . '/lib/Service/PaymentAttemptRecordService.php';
require __DIR__ . '/lib/Service/PaymentIntentService.php';
require __DIR__ . '/lib/Service/PaymentLinkService.php';
require __DIR__ . '/lib/Service/PaymentMethodConfigurationService.php';
require __DIR__ . '/lib/Service/PaymentMethodDomainService.php';
require __DIR__ . '/lib/Service/PaymentMethodService.php';
require __DIR__ . '/lib/Service/PaymentRecordService.php';
require __DIR__ . '/lib/Service/PayoutService.php';
require __DIR__ . '/lib/Service/PlanService.php';
require __DIR__ . '/lib/Service/PriceService.php';
Expand Down
9 changes: 4 additions & 5 deletions lib/Billing/CreditGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@
* A credit grant is an API resource that documents the allocation of some billing credits to a customer.
*
* Related guide: <a href="https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits">Billing credits</a>
* end
*
* @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 \Stripe\StripeObject $amount
* @property \Stripe\StripeObject $applicability_config
* @property string $category The category of this credit grant. This is for tracking purposes and will not be displayed to the customer.
* @property string $category The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
* @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 billing credits are granted.
* @property null|int $effective_at The time when the billing credits become effective i.e when they are eligible to be used.
* @property null|int $expires_at The time when the billing credits will expire. If not present, the billing credits will never expire.
* @property string|\Stripe\Customer $customer ID of the customer receiving the billing credits.
* @property null|int $effective_at The time when the billing credits become effectivewhen they're eligible for use.
* @property null|int $expires_at The time when the billing credits expire. If not present, the billing credits don't expire.
* @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 \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 A descriptive name shown in dashboard.
Expand Down
1 change: 1 addition & 0 deletions lib/Checkout/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,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 null|\Stripe\StripeObject $adaptive_pricing Settings for price localization with <a href="https://docs.stripe.com/payments/checkout/adaptive-pricing">Adaptive Pricing</a>.
* @property null|\Stripe\StripeObject $after_expiration When set, provides configuration for actions to take if this Checkout Session expires.
* @property null|bool $allow_promotion_codes Enables user redeemable promotion codes.
* @property null|int $amount_subtotal Total of all items before discounts or taxes are applied.
Expand Down
4 changes: 4 additions & 0 deletions lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class Event extends ApiResource
const INVOICE_OVERDUE = 'invoice.overdue';
const INVOICE_PAID = 'invoice.paid';
const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
const INVOICE_PAYMENT_ATTEMPT_REQUIRED = 'invoice.payment_attempt_required';
const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
const INVOICE_PAYMENT_OVERPAID = 'invoice.payment.overpaid';
const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
Expand All @@ -189,6 +190,7 @@ class Event extends ApiResource
const ISSUING_DISPUTE_SETTLEMENT_DETAIL_UPDATED = 'issuing_dispute_settlement_detail.updated';
const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
const ISSUING_FRAUD_LIABILITY_DEBIT_CREATED = 'issuing_fraud_liability_debit.created';
const ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated';
const ISSUING_PERSONALIZATION_DESIGN_DEACTIVATED = 'issuing_personalization_design.deactivated';
const ISSUING_PERSONALIZATION_DESIGN_REJECTED = 'issuing_personalization_design.rejected';
Expand Down Expand Up @@ -438,6 +440,7 @@ class Event extends ApiResource
const TYPE_INVOICE_OVERDUE = 'invoice.overdue';
const TYPE_INVOICE_PAID = 'invoice.paid';
const TYPE_INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
const TYPE_INVOICE_PAYMENT_ATTEMPT_REQUIRED = 'invoice.payment_attempt_required';
const TYPE_INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
const TYPE_INVOICE_PAYMENT_OVERPAID = 'invoice.payment.overpaid';
const TYPE_INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
Expand All @@ -461,6 +464,7 @@ class Event extends ApiResource
const TYPE_ISSUING_DISPUTE_SETTLEMENT_DETAIL_UPDATED = 'issuing_dispute_settlement_detail.updated';
const TYPE_ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
const TYPE_ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
const TYPE_ISSUING_FRAUD_LIABILITY_DEBIT_CREATED = 'issuing_fraud_liability_debit.created';
const TYPE_ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated';
const TYPE_ISSUING_PERSONALIZATION_DESIGN_DEACTIVATED = 'issuing_personalization_design.deactivated';
const TYPE_ISSUING_PERSONALIZATION_DESIGN_REJECTED = 'issuing_personalization_design.rejected';
Expand Down
2 changes: 1 addition & 1 deletion lib/Identity/VerificationReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @property null|\Stripe\StripeObject $phone Result from a phone check
* @property null|\Stripe\StripeObject $selfie Result from a selfie check
* @property string $type Type of report.
* @property null|string $verification_flow The configuration token of a Verification Flow from the dashboard.
* @property null|string $verification_flow The configuration token of a verification flow from the dashboard.
* @property null|string $verification_session ID of the VerificationSession that created this report.
*/
class VerificationReport extends \Stripe\ApiResource
Expand Down
2 changes: 1 addition & 1 deletion lib/Identity/VerificationSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @property string $status Status of this VerificationSession. <a href="https://stripe.com/docs/identity/how-sessions-work">Learn more about the lifecycle of sessions</a>.
* @property string $type The type of <a href="https://stripe.com/docs/identity/verification-checks">verification check</a> to be performed.
* @property null|string $url The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on <a href="https://stripe.com/docs/identity/verify-identity-documents?platform=web&amp;type=redirect">verifying identity documents</a> to learn how to redirect users to Stripe.
* @property null|string $verification_flow The configuration token of a Verification Flow from the dashboard.
* @property null|string $verification_flow The configuration token of a verification flow from the dashboard.
* @property null|\Stripe\StripeObject $verified_outputs The user’s verified data.
*/
class VerificationSession extends \Stripe\ApiResource
Expand Down
1 change: 1 addition & 0 deletions lib/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* @property null|string $account_name The public name of the business associated with this invoice, most often the business creating the invoice.
* @property null|(string|\Stripe\TaxId)[] $account_tax_ids The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
* @property int $amount_due Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the <code>amount_due</code> may be 0. If there is a positive <code>starting_balance</code> for the invoice (the customer owes money), the <code>amount_due</code> will also take that into account. The charge that gets generated for the invoice will be for the amount specified in <code>amount_due</code>.
* @property null|int $amount_overpaid Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance.
* @property int $amount_paid The amount, in cents (or local equivalent), that was paid.
* @property int $amount_remaining The difference between amount_due and amount_paid, in cents (or local equivalent).
* @property int $amount_shipping This is the sum of all the shipping amounts.
Expand Down
2 changes: 1 addition & 1 deletion lib/Issuing/Authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @property bool $approved Whether the authorization has been approved.
* @property string $authorization_method How the card details were provided.
* @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization.
* @property \Stripe\Issuing\Card $card You can <a href="https://stripe.com/docs/issuing/cards">create physical or virtual cards</a> that are issued to cardholders.
* @property \Stripe\Issuing\Card $card You can <a href="https://stripe.com/docs/issuing">create physical or virtual cards</a> that are issued to cardholders.
* @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency The currency of the cardholder. This currency can be different from the currency presented at authorization and the <code>merchant_currency</code> field on this authorization. Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
Expand Down
2 changes: 1 addition & 1 deletion lib/Issuing/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Stripe\Issuing;

/**
* You can <a href="https://stripe.com/docs/issuing/cards">create physical or virtual cards</a> that are issued to cardholders.
* You can <a href="https://stripe.com/docs/issuing">create physical or virtual cards</a> that are issued to cardholders.
*
* @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.
Expand Down
60 changes: 60 additions & 0 deletions lib/Issuing/FraudLiabilityDebit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Issuing;

/**
* A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions.
*
* @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 $amount Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit.
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the <a href="https://stripe.com/docs/api/balance_transactions">balance transaction</a> associated with this debit.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency The currency of the debit. Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property string $dispute The ID of the linked dispute.
* @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.
*/
class FraudLiabilityDebit extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.fraud_liability_debit';

/**
* Returns a list of Issuing <code>FraudLiabilityDebit</code> objects. The objects
* are sorted in descending order by creation date, with the most recently created
* object appearing first.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\FraudLiabilityDebit> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();

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

/**
* Retrieves an Issuing <code>FraudLiabilityDebit</code> object.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\FraudLiabilityDebit
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();

return $instance;
}
}
72 changes: 72 additions & 0 deletions lib/PaymentAttemptRecord.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;

/**
* A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe.
* Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment
* method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment Record
* can have guaranteed funds.
*
* @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 \Stripe\StripeObject $amount_canceled A representation of an amount of money, consisting of an amount and a currency.
* @property \Stripe\StripeObject $amount_failed A representation of an amount of money, consisting of an amount and a currency.
* @property \Stripe\StripeObject $amount_guaranteed A representation of an amount of money, consisting of an amount and a currency.
* @property \Stripe\StripeObject $amount_requested A representation of an amount of money, consisting of an amount and a currency.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|\Stripe\StripeObject $customer_details Customer information for this payment.
* @property null|string $customer_presence Indicates whether the customer was present in your checkout flow during this payment.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
* @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 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 $payment_method_details Information about the Payment Method debited for this payment.
* @property string $payment_record ID of the Payment Record this Payment Attempt Record belongs to.
* @property null|string $payment_reference An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.
* @property null|\Stripe\StripeObject $shipping_details Shipping information for this payment.
*/
class PaymentAttemptRecord extends ApiResource
{
const OBJECT_NAME = 'payment_attempt_record';

const CUSTOMER_PRESENCE_OFF_SESSION = 'off_session';
const CUSTOMER_PRESENCE_ON_SESSION = 'on_session';

/**
* List all the Payment Attempt Records attached to the specified Payment Record.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\PaymentAttemptRecord> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();

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

/**
* Retrieves a Payment Attempt Record with the given ID.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentAttemptRecord
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();

return $instance;
}
}
Loading

0 comments on commit c53049c

Please sign in to comment.