Skip to content

Commit 742c0c1

Browse files
Update generated code (#1804)
* Update generated code for v1441 * Update generated code for v1452 * Update generated code for v1455 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: helenye-stripe <[email protected]>
1 parent e81186f commit 742c0c1

10 files changed

+61
-4
lines changed

OPENAPI_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1412
1+
v1455

lib/Checkout/Session.php

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
* @property null|string $customer_creation Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
4444
* @property null|\Stripe\StripeObject $customer_details The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in <code>setup</code> mode.
4545
* @property null|string $customer_email If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the <code>customer</code> attribute.
46+
* @property null|\Stripe\StripeObject[] $discounts List of coupons and promotion codes attached to the Checkout Session.
4647
* @property int $expires_at The timestamp at which the Checkout Session will expire.
4748
* @property null|string|\Stripe\Invoice $invoice ID of the invoice created by the Checkout Session, if it exists.
4849
* @property null|\Stripe\StripeObject $invoice_creation Details on the state of invoice creation for the Checkout Session.

lib/CreditNote.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @property string $number A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
2929
* @property null|int $out_of_band_amount Amount that was credited outside of Stripe.
3030
* @property string $pdf The link to download the PDF of the credit note.
31-
* @property null|\Stripe\StripeObject[] $pretax_credit_amounts The pretax credit amounts (ex: discount, credit grants, etc) for all line items.
31+
* @property \Stripe\StripeObject[] $pretax_credit_amounts The pretax credit amounts (ex: discount, credit grants, etc) for all line items.
3232
* @property null|string $reason Reason for issuing this credit note, one of <code>duplicate</code>, <code>fraudulent</code>, <code>order_change</code>, or <code>product_unsatisfactory</code>
3333
* @property null|string|\Stripe\Refund $refund Refund related to this credit note.
3434
* @property null|\Stripe\StripeObject $shipping_cost The details of the cost of shipping, including the ShippingRate applied to the invoice.

lib/CreditNoteLineItem.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @property \Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item
1717
* @property null|string $invoice_line_item ID of the invoice line item being credited
1818
* @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.
19-
* @property null|\Stripe\StripeObject[] $pretax_credit_amounts The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
19+
* @property \Stripe\StripeObject[] $pretax_credit_amounts The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
2020
* @property null|int $quantity The number of units of product being credited.
2121
* @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
2222
* @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.

lib/PaymentMethod.php

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
* @property null|\Stripe\StripeObject $naver_pay
5151
* @property null|\Stripe\StripeObject $oxxo
5252
* @property null|\Stripe\StripeObject $p24
53+
* @property null|\Stripe\StripeObject $pay_by_bank
5354
* @property null|\Stripe\StripeObject $payco
5455
* @property null|\Stripe\StripeObject $paynow
5556
* @property null|\Stripe\StripeObject $paypal
@@ -111,6 +112,7 @@ class PaymentMethod extends ApiResource
111112
const TYPE_PAYCO = 'payco';
112113
const TYPE_PAYNOW = 'paynow';
113114
const TYPE_PAYPAL = 'paypal';
115+
const TYPE_PAY_BY_BANK = 'pay_by_bank';
114116
const TYPE_PIX = 'pix';
115117
const TYPE_PROMPTPAY = 'promptpay';
116118
const TYPE_REVOLUT_PAY = 'revolut_pay';

lib/PaymentMethodConfiguration.php

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
* @property null|\Stripe\StripeObject $oxxo
5959
* @property null|\Stripe\StripeObject $p24
6060
* @property null|string $parent For child configs, the configuration's parent configuration.
61+
* @property null|\Stripe\StripeObject $pay_by_bank
6162
* @property null|\Stripe\StripeObject $paynow
6263
* @property null|\Stripe\StripeObject $paypal
6364
* @property null|\Stripe\StripeObject $promptpay

lib/Service/Treasury/FinancialAccountService.php

+18
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,24 @@ public function all($params = null, $opts = null)
2525
return $this->requestCollection('get', '/v1/treasury/financial_accounts', $params, $opts);
2626
}
2727

28+
/**
29+
* Closes a FinancialAccount. A FinancialAccount can only be closed if it has a
30+
* zero balance, has no pending InboundTransfers, and has canceled all attached
31+
* Issuing cards.
32+
*
33+
* @param string $id
34+
* @param null|array $params
35+
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
36+
*
37+
* @throws \Stripe\Exception\ApiErrorException if the request fails
38+
*
39+
* @return \Stripe\Treasury\FinancialAccount
40+
*/
41+
public function close($id, $params = null, $opts = null)
42+
{
43+
return $this->request('post', $this->buildPath('/v1/treasury/financial_accounts/%s/close', $id), $params, $opts);
44+
}
45+
2846
/**
2947
* Creates a new FinancialAccount. For now, each connected account can only have
3048
* one FinancialAccount.

lib/Treasury/FinancialAccount.php

+19
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
1717
* @property null|\Stripe\Treasury\FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a <code>status</code> enum and associated <code>status_details</code>. Stripe or the platform can control Features via the requested field.
1818
* @property \Stripe\StripeObject[] $financial_addresses The set of credentials that resolve to a FinancialAccount.
19+
* @property null|bool $is_default
1920
* @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.
2021
* @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.
22+
* @property null|string $nickname The nickname for the FinancialAccount.
2123
* @property null|string[] $pending_features The array of paths to pending Features in the Features hash.
2224
* @property null|\Stripe\StripeObject $platform_restrictions The set of functionalities that the platform can restrict on the FinancialAccount.
2325
* @property null|string[] $restricted_features The array of paths to restricted Features in the Features hash.
@@ -116,6 +118,23 @@ public static function update($id, $params = null, $opts = null)
116118
return $obj;
117119
}
118120

121+
/**
122+
* @param null|array $params
123+
* @param null|array|string $opts
124+
*
125+
* @throws \Stripe\Exception\ApiErrorException if the request fails
126+
*
127+
* @return \Stripe\Treasury\FinancialAccount the closed financial account
128+
*/
129+
public function close($params = null, $opts = null)
130+
{
131+
$url = $this->instanceUrl() . '/close';
132+
list($response, $opts) = $this->_request('post', $url, $params, $opts);
133+
$this->refreshFrom($response, $opts);
134+
135+
return $this;
136+
}
137+
119138
/**
120139
* @param null|array $params
121140
* @param null|array|string $opts

lib/Util/ApiVersion.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
class ApiVersion
88
{
9-
const CURRENT = '2024-12-18.acacia';
9+
const CURRENT = '2025-01-27.acacia';
1010
}

tests/Stripe/GeneratedExamplesTest.php

+16
Original file line numberDiff line numberDiff line change
@@ -3595,6 +3595,22 @@ public function testTerminalReadersProcessPaymentIntentPost()
35953595
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
35963596
}
35973597

3598+
public function testTerminalReadersProcessSetupIntentPost()
3599+
{
3600+
$this->expectsRequest(
3601+
'post',
3602+
'/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent'
3603+
);
3604+
$result = $this->client->terminal->readers->processSetupIntent(
3605+
'tmr_xxxxxxxxxxxxx',
3606+
[
3607+
'setup_intent' => 'seti_xxxxxxxxxxxxx',
3608+
'allow_redisplay' => 'always',
3609+
]
3610+
);
3611+
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
3612+
}
3613+
35983614
public function testTestHelpersCustomersFundCashBalancePost()
35993615
{
36003616
$this->expectsRequest(

0 commit comments

Comments
 (0)