Skip to content

Commit 3d9905c

Browse files
Update generated code for v2291 and 1d5fb9dc5cd047376b47f4bbb9af90300932ea60
1 parent 80d78c6 commit 3d9905c

35 files changed

Lines changed: 591 additions & 38 deletions

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5fab6377244519650455ed4213e07c477c0bfece
1+
1d5fb9dc5cd047376b47f4bbb9af90300932ea60

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2290
1+
v2291

init.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,8 @@
10831083
require __DIR__ . '/lib/FrMealVouchersOnboarding.php';
10841084
require __DIR__ . '/lib/FundingInstructions.php';
10851085
require __DIR__ . '/lib/FxQuote.php';
1086+
require __DIR__ . '/lib/GiftCard.php';
1087+
require __DIR__ . '/lib/GiftCardOperation.php';
10861088
require __DIR__ . '/lib/Identity/BlocklistEntry.php';
10871089
require __DIR__ . '/lib/Identity/VerificationReport.php';
10881090
require __DIR__ . '/lib/Identity/VerificationSession.php';
@@ -1218,6 +1220,8 @@
12181220
require __DIR__ . '/lib/Service/Forwarding/RequestService.php';
12191221
require __DIR__ . '/lib/Service/FrMealVouchersOnboardingService.php';
12201222
require __DIR__ . '/lib/Service/FxQuoteService.php';
1223+
require __DIR__ . '/lib/Service/GiftCardOperationService.php';
1224+
require __DIR__ . '/lib/Service/GiftCardService.php';
12211225
require __DIR__ . '/lib/Service/Identity/BlocklistEntryService.php';
12221226
require __DIR__ . '/lib/Service/Identity/IdentityServiceFactory.php';
12231227
require __DIR__ . '/lib/Service/Identity/VerificationReportService.php';
@@ -1301,6 +1305,7 @@
13011305
require __DIR__ . '/lib/Service/Tax/TaxServiceFactory.php';
13021306
require __DIR__ . '/lib/Service/Tax/TransactionService.php';
13031307
require __DIR__ . '/lib/Service/TaxCodeService.php';
1308+
require __DIR__ . '/lib/Service/TaxFundService.php';
13041309
require __DIR__ . '/lib/Service/TaxIdService.php';
13051310
require __DIR__ . '/lib/Service/TaxRateService.php';
13061311
require __DIR__ . '/lib/Service/Terminal/ConfigurationService.php';
@@ -1475,6 +1480,7 @@
14751480
require __DIR__ . '/lib/Tax/TransactionLineItem.php';
14761481
require __DIR__ . '/lib/TaxCode.php';
14771482
require __DIR__ . '/lib/TaxDeductedAtSource.php';
1483+
require __DIR__ . '/lib/TaxFund.php';
14781484
require __DIR__ . '/lib/TaxId.php';
14791485
require __DIR__ . '/lib/TaxRate.php';
14801486
require __DIR__ . '/lib/Terminal/Configuration.php';

lib/Charge.php

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

lib/Checkout/Session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
4343
* @property null|string $currency 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>.
4444
* @property null|(object{amount_subtotal: int, amount_total: int, fx_rate: string, source_currency: string}&\Stripe\StripeObject) $currency_conversion Currency conversion details for <a href="https://docs.stripe.com/payments/checkout/adaptive-pricing">Adaptive Pricing</a> sessions created before 2025-03-31.
45-
* @property null|(object{billing_details?: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), name: null|string}&\Stripe\StripeObject), email?: null|string, id: string, payment_method_details?: null|(object{allow_redisplay: string, au_becs_debit?: (object{fingerprint: null|string}&\Stripe\StripeObject), bacs_debit?: (object{fingerprint: null|string}&\Stripe\StripeObject), boleto?: (object{fingerprint: null|string}&\Stripe\StripeObject), card?: (object{brand: string, country: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: string, iin?: null|string, last4: string, wallet: null|(object{type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), link?: (object{fingerprint?: null|string}&\Stripe\StripeObject), sepa_debit?: (object{fingerprint: null|string}&\Stripe\StripeObject), type: string, us_bank_account?: (object{fingerprint: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject), phone?: null|string, shipping_details: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), name: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $current_attempt The customer's pending attempt to pay that requires your approval. Contains information about the customer and their payment details.
45+
* @property null|(object{billing_details?: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), name: null|string}&\Stripe\StripeObject), email?: null|string, id: string, payment_method_details?: null|(object{allow_redisplay: string, au_becs_debit?: (object{fingerprint: null|string}&\Stripe\StripeObject), bacs_debit?: (object{fingerprint: null|string}&\Stripe\StripeObject), boleto?: (object{fingerprint: null|string}&\Stripe\StripeObject), card?: (object{brand: string, country: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: string, iin?: null|string, last4: string, wallet: null|(object{type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), link?: (object{fingerprint?: null|string}&\Stripe\StripeObject), pix?: (object{fingerprint: null|string}&\Stripe\StripeObject), sepa_debit?: (object{fingerprint: null|string}&\Stripe\StripeObject), type: string, us_bank_account?: (object{fingerprint: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject), phone?: null|string, shipping_details: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), name: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $current_attempt The customer's pending attempt to pay that requires your approval. Contains information about the customer and their payment details.
4646
* @property ((object{dropdown?: (object{default_value: null|string, options: (object{label: string, value: string}&\Stripe\StripeObject)[], value: null|string}&\Stripe\StripeObject), key: string, label: (object{custom: null|string, type: string}&\Stripe\StripeObject), numeric?: (object{default_value: null|string, maximum_length: null|int, minimum_length: null|int, value: null|string}&\Stripe\StripeObject), optional: bool, text?: (object{default_value: null|string, maximum_length: null|int, minimum_length: null|int, value: null|string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject))[] $custom_fields Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if <code>ui_mode</code> is <code>custom</code>.
4747
* @property null|string[] $custom_payment_method_types A list of the types of <a href="https://docs.stripe.com/payments/payment-methods/custom-payment-methods">custom payment methods</a> (e.g. cpmt_123) this Checkout Session is allowed to accept.
4848
* @property (object{after_submit: null|(object{message: string}&\Stripe\StripeObject), shipping_address: null|(object{message: string}&\Stripe\StripeObject), submit: null|(object{message: string}&\Stripe\StripeObject), terms_of_service_acceptance: null|(object{message: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $custom_text

lib/ConfirmationToken.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/GiftCard.php

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
<?php
2+
3+
// File generated from our OpenAPI spec
4+
5+
namespace Stripe;
6+
7+
/**
8+
* Represents third-party gift cards that can be used as a payment method through Stripe.
9+
*
10+
* @property string $id Unique identifier for the object.
11+
* @property string $object String representing the object's type. Objects of the same type share the same value.
12+
* @property string $brand The brand of the gift card.
13+
* @property null|int $exp_month The expiration month of the gift card.
14+
* @property null|int $exp_year The expiration year of the gift card.
15+
* @property null|GiftCardOperation|string $last_operation The last operation performed on this gift card.
16+
* @property null|string $last4 The last four digits of the gift card number.
17+
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
18+
*/
19+
class GiftCard extends ApiResource
20+
{
21+
const OBJECT_NAME = 'gift_card';
22+
23+
const BRAND_FISERV_VALUELINK = 'fiserv_valuelink';
24+
const BRAND_GIVEX = 'givex';
25+
const BRAND_SVS = 'svs';
26+
27+
/**
28+
* Creates a gift card object.
29+
*
30+
* @param null|array{brand: string, exp_month?: int, exp_year?: int, expand?: string[], number?: string, pin?: string} $params
31+
* @param null|array|string $options
32+
*
33+
* @return GiftCard the created resource
34+
*
35+
* @throws Exception\ApiErrorException if the request fails
36+
*/
37+
public static function create($params = null, $options = null)
38+
{
39+
self::_validateParams($params);
40+
$url = static::classUrl();
41+
42+
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
43+
$obj = Util\Util::convertToStripeObject($response->json, $opts);
44+
$obj->setLastResponse($response);
45+
46+
return $obj;
47+
}
48+
49+
/**
50+
* Retrieves a third-party gift card object.
51+
*
52+
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
53+
* @param null|array|string $opts
54+
*
55+
* @return GiftCard
56+
*
57+
* @throws Exception\ApiErrorException if the request fails
58+
*/
59+
public static function retrieve($id, $opts = null)
60+
{
61+
$opts = Util\RequestOptions::parse($opts);
62+
$instance = new static($id, $opts);
63+
$instance->refresh();
64+
65+
return $instance;
66+
}
67+
68+
/**
69+
* @param null|array $params
70+
* @param null|array|string $opts
71+
*
72+
* @return GiftCardOperation the activated gift card operation
73+
*
74+
* @throws Exception\ApiErrorException if the request fails
75+
*/
76+
public function activate($params = null, $opts = null)
77+
{
78+
$url = $this->instanceUrl() . '/activate';
79+
list($response, $opts) = $this->_request('post', $url, $params, $opts);
80+
$this->refreshFrom($response, $opts);
81+
82+
return $this;
83+
}
84+
85+
/**
86+
* @param null|array $params
87+
* @param null|array|string $opts
88+
*
89+
* @return GiftCardOperation the cashouted gift card operation
90+
*
91+
* @throws Exception\ApiErrorException if the request fails
92+
*/
93+
public function cashout($params = null, $opts = null)
94+
{
95+
$url = $this->instanceUrl() . '/cashout';
96+
list($response, $opts) = $this->_request('post', $url, $params, $opts);
97+
$this->refreshFrom($response, $opts);
98+
99+
return $this;
100+
}
101+
102+
/**
103+
* @param null|array $params
104+
* @param null|array|string $opts
105+
*
106+
* @return GiftCardOperation the checked gift card operation
107+
*
108+
* @throws Exception\ApiErrorException if the request fails
109+
*/
110+
public function checkBalance($params = null, $opts = null)
111+
{
112+
$url = $this->instanceUrl() . '/check_balance';
113+
list($response, $opts) = $this->_request('post', $url, $params, $opts);
114+
$this->refreshFrom($response, $opts);
115+
116+
return $this;
117+
}
118+
119+
/**
120+
* @param null|array $params
121+
* @param null|array|string $opts
122+
*
123+
* @return GiftCardOperation the reloaded gift card operation
124+
*
125+
* @throws Exception\ApiErrorException if the request fails
126+
*/
127+
public function reload($params = null, $opts = null)
128+
{
129+
$url = $this->instanceUrl() . '/reload';
130+
list($response, $opts) = $this->_request('post', $url, $params, $opts);
131+
$this->refreshFrom($response, $opts);
132+
133+
return $this;
134+
}
135+
136+
/**
137+
* @param null|array $params
138+
* @param null|array|string $opts
139+
*
140+
* @return GiftCardOperation the voided gift card operation
141+
*
142+
* @throws Exception\ApiErrorException if the request fails
143+
*/
144+
public function voidOperation($params = null, $opts = null)
145+
{
146+
$url = $this->instanceUrl() . '/void_operation';
147+
list($response, $opts) = $this->_request('post', $url, $params, $opts);
148+
$this->refreshFrom($response, $opts);
149+
150+
return $this;
151+
}
152+
}

lib/GiftCardOperation.php

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?php
2+
3+
// File generated from our OpenAPI spec
4+
5+
namespace Stripe;
6+
7+
/**
8+
* A GiftCardOperation represents an operation performed on a third-party gift card,
9+
* such as activation, deactivation, reload, cashout, balance check, or void.
10+
*
11+
* @property string $id Unique identifier for the object.
12+
* @property string $object String representing the object's type. Objects of the same type share the same value.
13+
* @property null|(object{balance: (object{amount: int, currency: string}&StripeObject)}&StripeObject) $activation Details about a gift card activation operation.
14+
* @property null|(object{voided_operation: string}&StripeObject) $activation_void Details about a gift card activation void operation.
15+
* @property null|(object{balance: (object{amount: int, currency: string}&StripeObject)}&StripeObject) $balance_check Details about a gift card balance check operation.
16+
* @property null|(object{balance: (object{amount: int, currency: string}&StripeObject), previous_balance: null|(object{amount: int, currency: string}&StripeObject)}&StripeObject) $cashout Details about a gift card cashout operation.
17+
* @property null|(object{balance: (object{amount: int, currency: string}&StripeObject), voided_operation: string}&StripeObject) $cashout_void Details about a gift card cashout void operation.
18+
* @property int $completed_at The timestamp of when this operation was completed.
19+
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
20+
* @property null|(object{}&StripeObject) $deactivation Details about a gift card deactivation operation.
21+
* @property null|string $failure_code The failure code of the operation. Only present if the status is failed.
22+
* @property GiftCard|string $gift_card The gift card this operation was performed on.
23+
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
24+
* @property null|string $on_behalf_of The connected account whose credentials were used to perform this operation.
25+
* @property null|(object{balance: (object{amount: int, currency: string}&StripeObject), previous_balance: null|(object{amount: int, currency: string}&StripeObject)}&StripeObject) $reload Details about a gift card reload operation.
26+
* @property null|(object{balance: (object{amount: int, currency: string}&StripeObject), voided_operation: string}&StripeObject) $reload_void Details about a gift card reload void operation.
27+
* @property string $status The status of the operation.
28+
* @property string $type The type of operation performed.
29+
*/
30+
class GiftCardOperation extends ApiResource
31+
{
32+
const OBJECT_NAME = 'gift_card_operation';
33+
34+
const FAILURE_CODE_ACTION_NOT_SUPPORTED = 'action_not_supported';
35+
const FAILURE_CODE_CARD_ALREADY_ACTIVATED = 'card_already_activated';
36+
const FAILURE_CODE_CARD_EXPIRED = 'card_expired';
37+
const FAILURE_CODE_CARD_NOT_ACTIVATED = 'card_not_activated';
38+
const FAILURE_CODE_DO_NOT_HONOR = 'do_not_honor';
39+
const FAILURE_CODE_GENERIC_FAILURE = 'generic_failure';
40+
const FAILURE_CODE_INSUFFICIENT_BALANCE = 'insufficient_balance';
41+
const FAILURE_CODE_INVALID_AMOUNT = 'invalid_amount';
42+
const FAILURE_CODE_INVALID_CURRENCY = 'invalid_currency';
43+
const FAILURE_CODE_INVALID_NUMBER = 'invalid_number';
44+
const FAILURE_CODE_INVALID_PIN = 'invalid_pin';
45+
const FAILURE_CODE_INVALID_TRACK_DATA = 'invalid_track_data';
46+
const FAILURE_CODE_LOST_CARD = 'lost_card';
47+
const FAILURE_CODE_LOST_OR_STOLEN_CARD = 'lost_or_stolen_card';
48+
const FAILURE_CODE_PIN_REQUIRED = 'pin_required';
49+
const FAILURE_CODE_PIN_TRIES_EXCEEDED = 'pin_tries_exceeded';
50+
const FAILURE_CODE_PROCESSING_ERROR = 'processing_error';
51+
const FAILURE_CODE_PROVIDER_UNAVAILABLE = 'provider_unavailable';
52+
const FAILURE_CODE_STOLEN_CARD = 'stolen_card';
53+
const FAILURE_CODE_SUSPECTED_FRAUD = 'suspected_fraud';
54+
const FAILURE_CODE_TIMEOUT = 'timeout';
55+
56+
const STATUS_FAILED = 'failed';
57+
const STATUS_SUCCEEDED = 'succeeded';
58+
59+
const TYPE_ACTIVATION = 'activation';
60+
const TYPE_ACTIVATION_VOID = 'activation_void';
61+
const TYPE_BALANCE_CHECK = 'balance_check';
62+
const TYPE_CASHOUT = 'cashout';
63+
const TYPE_CASHOUT_VOID = 'cashout_void';
64+
const TYPE_DEACTIVATION = 'deactivation';
65+
const TYPE_RELOAD = 'reload';
66+
const TYPE_RELOAD_VOID = 'reload_void';
67+
68+
/**
69+
* Retrieves a third-party gift card operation object.
70+
*
71+
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
72+
* @param null|array|string $opts
73+
*
74+
* @return GiftCardOperation
75+
*
76+
* @throws Exception\ApiErrorException if the request fails
77+
*/
78+
public static function retrieve($id, $opts = null)
79+
{
80+
$opts = Util\RequestOptions::parse($opts);
81+
$instance = new static($id, $opts);
82+
$instance->refresh();
83+
84+
return $instance;
85+
}
86+
}

lib/Issuing/Dispute.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* @property null|string $loss_reason The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
2222
* @property \Stripe\StripeObject $metadata Set of <a href="https://docs.stripe.com/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.
2323
* @property null|(object{dispute_response: null|(object{error: null|string, merchant_evidence_files: null|string[]}&\Stripe\StripeObject), pre_arbitration_response: null|(object{error: null|string, merchant_evidence_files: null|string[]}&\Stripe\StripeObject), pre_arbitration_submission: null|(object{error: null|string, merchant_evidence_files: null|string[]}&\Stripe\StripeObject)}&\Stripe\StripeObject) $network_lifecycle Incoming information from the card network for this dispute. Includes the acquiring merchant's initial response, pre-arbitration submission, and pre-arbitration response to the dispute.
24+
* @property null|(object{grant_deadline: null|int, granted_at: null|int, revocable_after: null|int, revoked_at: null|int, status: string}&\Stripe\StripeObject) $provisional_credit Provisional credit details for this dispute.
2425
* @property string $status Current status of the dispute.
2526
* @property string|Transaction $transaction The transaction being disputed.
2627
* @property null|(object{debit_reversal: null|string, received_debit: string}&\Stripe\StripeObject) $treasury <a href="https://docs.stripe.com/api/treasury">Treasury</a> details related to this dispute if it was created on a <a href="https://docs.stripe.com/api/treasury/financial_accounts">FinancialAccount</a>

0 commit comments

Comments
 (0)