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 #1573

Merged
merged 8 commits into from
Sep 14, 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 @@
v510
v525
2 changes: 2 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@
require __DIR__ . '/lib/Service/Terminal/ReaderService.php';
require __DIR__ . '/lib/Service/Terminal/TerminalServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/CustomerService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/AuthorizationService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/CardService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/TransactionService.php';
require __DIR__ . '/lib/Service/TestHelpers/RefundService.php';
require __DIR__ . '/lib/Service/TestHelpers/Terminal/ReaderService.php';
require __DIR__ . '/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php';
Expand Down
8 changes: 4 additions & 4 deletions lib/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
* Related guide: <a href="https://stripe.com/docs/connect/account-balances">Understanding Connect account balances</a>
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property \Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the <a href="https://stripe.com/docs/api#transfers">Transfers API</a> or <a href="https://stripe.com/docs/api#payouts">Payouts API</a>. The available balance for each currency and payment type can be found in the <code>source_types</code> property.
* @property null|\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the <code>source_types</code> property.
* @property null|\Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts.
* @property \Stripe\StripeObject[] $available Available funds that you can transfer or pay out automatically by Stripe or explicitly through the <a href="https://stripe.com/docs/api#transfers">Transfers API</a> or <a href="https://stripe.com/docs/api#payouts">Payouts API</a>. You can find the available balance for each currency and payment type in the <code>source_types</code> property.
* @property null|\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. You can find the connect reserve balance for each currency and payment type in the <code>source_types</code> property.
* @property null|\Stripe\StripeObject[] $instant_available Funds that you can pay out using Instant Payouts.
* @property null|\Stripe\StripeObject $issuing
* @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[] $pending Funds that are not yet available in the balance. The pending balance for each currency, and for each payment type, can be found in the <code>source_types</code> property.
* @property \Stripe\StripeObject[] $pending Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the <code>source_types</code> property.
*/
class Balance extends SingletonApiResource
{
Expand Down
1 change: 1 addition & 0 deletions lib/ErrorObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ class ErrorObject extends StripeObject
const CODE_SKU_INACTIVE = 'sku_inactive';
const CODE_STATE_UNSUPPORTED = 'state_unsupported';
const CODE_STATUS_TRANSITION_INVALID = 'status_transition_invalid';
const CODE_STRIPE_TAX_INACTIVE = 'stripe_tax_inactive';
const CODE_TAX_ID_INVALID = 'tax_id_invalid';
const CODE_TAXES_CALCULATION_FAILED = 'taxes_calculation_failed';
const CODE_TERMINAL_LOCATION_COUNTRY_UNSUPPORTED = 'terminal_location_country_unsupported';
Expand Down
6 changes: 3 additions & 3 deletions lib/Service/CustomerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function createSource($parentId, $params = null, $opts = null)
}

/**
* Creates a new <code>TaxID</code> object for a customer.
* Creates a new <code>tax_id</code> object for a customer.
*
* @param string $parentId
* @param null|array $params
Expand Down Expand Up @@ -245,7 +245,7 @@ public function deleteSource($parentId, $id, $params = null, $opts = null)
}

/**
* Deletes an existing <code>TaxID</code> object.
* Deletes an existing <code>tax_id</code> object.
*
* @param string $parentId
* @param string $id
Expand Down Expand Up @@ -364,7 +364,7 @@ public function retrieveSource($parentId, $id, $params = null, $opts = null)
}

/**
* Retrieves the <code>TaxID</code> object with the given identifier.
* Retrieves the <code>tax_id</code> object with the given identifier.
*
* @param string $parentId
* @param string $id
Expand Down
10 changes: 5 additions & 5 deletions lib/Service/PaymentIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ public function incrementAuthorization($id, $params = null, $opts = null)
/**
* Retrieves the details of a PaymentIntent that has previously been created.
*
* Client-side retrieval using a publishable key is allowed when the
* <code>client_secret</code> is provided in the query string.
* You can retrieve a PaymentIntent client-side using a publishable key when the
* <code>client_secret</code> is in the query string.
*
* When retrieved with a publishable key, only a subset of properties will be
* returned. Please refer to the <a href="#payment_intent_object">payment
* intent</a> object reference for more details.
* If you retrieve a PaymentIntent with a publishable key, it only returns a subset
* of properties. Refer to the <a href="#payment_intent_object">payment intent</a>
* object reference for more details.
*
* @param string $id
* @param null|array $params
Expand Down
87 changes: 87 additions & 0 deletions lib/Service/TestHelpers/Issuing/AuthorizationService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\TestHelpers\Issuing;

class AuthorizationService extends \Stripe\Service\AbstractService
{
/**
* Capture a test-mode authorization.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*/
public function capture($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/capture', $id), $params, $opts);
}

/**
* Create a test-mode authorization.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v1/test_helpers/issuing/authorizations', $params, $opts);
}

/**
* Expire a test-mode Authorization.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*/
public function expire($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/expire', $id), $params, $opts);
}

/**
* Increment a test-mode Authorization.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*/
public function increment($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/increment', $id), $params, $opts);
}

/**
* Reverse a test-mode Authorization.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization
*/
public function reverse($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/reverse', $id), $params, $opts);
}
}
4 changes: 4 additions & 0 deletions lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
/**
* Service factory class for API resources in the Issuing namespace.
*
* @property AuthorizationService $authorizations
* @property CardService $cards
* @property TransactionService $transactions
*/
class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
{
/**
* @var array<string, string>
*/
private static $classMap = [
'authorizations' => AuthorizationService::class,
'cards' => CardService::class,
'transactions' => TransactionService::class,
];

protected function getServiceClass($name)
Expand Down
54 changes: 54 additions & 0 deletions lib/Service/TestHelpers/Issuing/TransactionService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\TestHelpers\Issuing;

class TransactionService extends \Stripe\Service\AbstractService
{
/**
* Allows the user to capture an arbitrary amount, also known as a forced capture.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Transaction
*/
public function createForceCapture($params = null, $opts = null)
{
return $this->request('post', '/v1/test_helpers/issuing/transactions/create_force_capture', $params, $opts);
}

/**
* Allows the user to refund an arbitrary amount, also known as a unlinked refund.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Transaction
*/
public function createUnlinkedRefund($params = null, $opts = null)
{
return $this->request('post', '/v1/test_helpers/issuing/transactions/create_unlinked_refund', $params, $opts);
}

/**
* Refund a test-mode Transaction.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Transaction
*/
public function refund($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/transactions/%s/refund', $id), $params, $opts);
}
}
Loading
Loading