Skip to content

Commit

Permalink
Update generated code for v1055
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed May 29, 2024
1 parent 3533dc3 commit 5dab331
Show file tree
Hide file tree
Showing 118 changed files with 5,639 additions and 325 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1044
v1055
105 changes: 102 additions & 3 deletions lib/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ class Account extends ApiResource
{
const OBJECT_NAME = 'account';

use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\Delete;
use ApiOperations\NestedResource;
use ApiOperations\Update;

Expand All @@ -62,6 +59,108 @@ class Account extends ApiResource
const TYPE_NONE = 'none';
const TYPE_STANDARD = 'standard';

/**
* With <a href="/docs/connect">Connect</a>, you can create Stripe accounts for
* your users. To do this, you’ll first need to <a
* href="https://dashboard.stripe.com/account/applications/settings">register your
* platform</a>.
*
* If you’ve already collected information for your connected accounts, you <a
* href="/docs/connect/best-practices#onboarding">can prefill that information</a>
* when creating the account. Connect Onboarding won’t ask for the prefilled
* information during account onboarding. You can prefill any information on the
* account.
*
* @param null|mixed $params
* @param null|mixed $options
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);

return $obj;
}

/**
* With <a href="/connect">Connect</a>, you can delete accounts you manage.
*
* Test-mode accounts can be deleted at any time.
*
* Live-mode accounts where Stripe is responsible for negative account balances
* cannot be deleted, which includes Standard accounts. Live-mode accounts where
* your platform is liable for negative account balances, which includes Custom and
* Express accounts, can be deleted when all <a
* href="/api/balance/balanace_object">balances</a> are zero.
*
* If you want to delete your own account, use the <a
* href="https://dashboard.stripe.com/settings/account">account information tab in
* your account settings</a> instead.
*
* @param null|mixed $params
* @param null|mixed $opts
*/
public function delete($params = null, $opts = null)
{
self::_validateParams($params);
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);

return $this;
}

/**
* Returns a list of accounts connected to your platform via <a
* href="/docs/connect">Connect</a>. If you’re not a platform, the list is empty.
*
* @param null|mixed $params
* @param null|mixed $opts
*/
public static function all($params = null, $opts = null)
{
return static::_requestPage('/v1/accounts', \Stripe\Collection::class, $params, $opts);
}

/**
* Updates a <a href="/connect/accounts">connected account</a> by setting the
* values of the parameters passed. Any parameters not provided are left unchanged.
*
* For accounts where <a
* href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is <code>application</code>, which includes Custom accounts, you can update any
* information on the account.
*
* For accounts where <a
* href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is <code>stripe</code>, which includes Standard and Express accounts, you can
* update all information until you create an <a href="/api/account_links">Account
* Link</a> or <a href="/api/account_sessions">Account Session</a> to start Connect
* onboarding, after which some properties can no longer be updated.
*
* To update your own account, use the <a
* href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our
* <a href="/docs/connect/updating-accounts">Connect</a> documentation to learn
* more about updating accounts.
*
* @param mixed $id
* @param null|mixed $params
* @param null|mixed $opts
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);

return $obj;
}

use ApiOperations\Retrieve {
retrieve as protected _retrieve;
}
Expand Down
19 changes: 18 additions & 1 deletion lib/AccountLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,22 @@ class AccountLink extends ApiResource
{
const OBJECT_NAME = 'account_link';

use ApiOperations\Create;
/**
* Creates an AccountLink object that includes a single-use Stripe URL that the
* platform can redirect their user to in order to take them through the Connect
* Onboarding flow.
*
* @param null|mixed $params
* @param null|mixed $options
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);

return $obj;
}
}
48 changes: 46 additions & 2 deletions lib/AccountNotice.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class AccountNotice extends ApiResource
{
const OBJECT_NAME = 'account_notice';

use ApiOperations\All;
use ApiOperations\Retrieve;
use ApiOperations\Update;

const REASON_ISSUING_ACCOUNT_CLOSED_FOR_INACTIVITY = 'issuing.account_closed_for_inactivity';
Expand All @@ -38,4 +36,50 @@ class AccountNotice extends ApiResource
const REASON_ISSUING_DISPUTE_LOST = 'issuing.dispute_lost';
const REASON_ISSUING_DISPUTE_SUBMITTED = 'issuing.dispute_submitted';
const REASON_ISSUING_DISPUTE_WON = 'issuing.dispute_won';

/**
* Retrieves a list of <code>AccountNotice</code> objects. The objects are sorted
* in descending order by creation date, with the most-recently-created object
* appearing first.
*
* @param null|mixed $params
* @param null|mixed $opts
*/
public static function all($params = null, $opts = null)
{
return static::_requestPage('/v1/account_notices', \Stripe\Collection::class, $params, $opts);
}

/**
* Retrieves an <code>AccountNotice</code> object.
*
* @param mixed $id
* @param null|mixed $opts
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();

return $instance;
}

/**
* Updates an <code>AccountNotice</code> object.
*
* @param mixed $id
* @param null|mixed $params
* @param null|mixed $opts
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);

return $obj;
}
}
18 changes: 17 additions & 1 deletion lib/AccountSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,21 @@ class AccountSession extends ApiResource
{
const OBJECT_NAME = 'account_session';

use ApiOperations\Create;
/**
* Creates a AccountSession object that includes a single-use token that the
* platform can use on their front-end to grant client-side API access.
*
* @param null|mixed $params
* @param null|mixed $options
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);

return $obj;
}
}
62 changes: 58 additions & 4 deletions lib/ApplePayDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,64 @@ class ApplePayDomain extends ApiResource
{
const OBJECT_NAME = 'apple_pay_domain';

use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\Delete;
use ApiOperations\Retrieve;
/**
* Create an apple pay domain.
*
* @param null|mixed $params
* @param null|mixed $options
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);

return $obj;
}

/**
* Delete an apple pay domain.
*
* @param null|mixed $params
* @param null|mixed $opts
*/
public function delete($params = null, $opts = null)
{
self::_validateParams($params);
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);

return $this;
}

/**
* List apple pay domains.
*
* @param null|mixed $params
* @param null|mixed $opts
*/
public static function all($params = null, $opts = null)
{
return static::_requestPage('/v1/apple_pay/domains', \Stripe\Collection::class, $params, $opts);
}

/**
* Retrieve an apple pay domain.
*
* @param mixed $id
* @param null|mixed $opts
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();

return $instance;
}

/**
* @return string The class URL for this resource. It needs to be special
Expand Down
30 changes: 28 additions & 2 deletions lib/ApplicationFee.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,35 @@ class ApplicationFee extends ApiResource
{
const OBJECT_NAME = 'application_fee';

use ApiOperations\All;
use ApiOperations\NestedResource;
use ApiOperations\Retrieve;

/**
* Returns a list of application fees you’ve previously collected. The application
* fees are returned in sorted order, with the most recent fees appearing first.
*
* @param null|mixed $params
* @param null|mixed $opts
*/
public static function all($params = null, $opts = null)
{
return static::_requestPage('/v1/application_fees', \Stripe\Collection::class, $params, $opts);
}

/**
* Retrieves the details of an application fee that your account has collected. The
* same information is returned when refunding the application fee.
*
* @param mixed $id
* @param null|mixed $opts
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();

return $instance;
}

const PATH_REFUNDS = '/refunds';

Expand Down
29 changes: 27 additions & 2 deletions lib/Apps/Secret.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,33 @@ class Secret extends \Stripe\ApiResource
{
const OBJECT_NAME = 'apps.secret';

use \Stripe\ApiOperations\All;
use \Stripe\ApiOperations\Create;
/**
* Create or replace a secret in the secret store.
*
* @param null|mixed $params
* @param null|mixed $options
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);

return $obj;
}

/**
* List all secrets stored on the given scope.
*
* @param null|mixed $params
* @param null|mixed $opts
*/
public static function all($params = null, $opts = null)
{
return static::_requestPage('/v1/apps/secrets', \Stripe\Collection::class, $params, $opts);
}

/**
* @param null|array $params
Expand Down
17 changes: 16 additions & 1 deletion lib/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,20 @@ class Balance extends SingletonApiResource
{
const OBJECT_NAME = 'balance';

use ApiOperations\SingletonRetrieve;
/**
* Retrieves the current account balance, based on the authentication that was used
* to make the request. For a sample request, see <a
* href="/docs/connect/account-balances#accounting-for-negative-balances">Accounting
* for negative balances</a>.
*
* @param null|mixed $opts
*/
public static function retrieve($opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static(null, $opts);
$instance->refresh();

return $instance;
}
}
Loading

0 comments on commit 5dab331

Please sign in to comment.