Skip to content

Commit

Permalink
Autogen from 87147ac526670f
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed Jan 29, 2020
1 parent 215a897 commit 308f6c1
Show file tree
Hide file tree
Showing 17 changed files with 162 additions and 170 deletions.
116 changes: 57 additions & 59 deletions lib/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ public function reject($params = null, $opts = null)
$this->refreshFrom($response, $opts);
return $this;
}


/*
* Capabilities methods
Expand All @@ -205,124 +206,122 @@ public function reject($params = null, $opts = null)
const PATH_CAPABILITIES = '/capabilities';

/**
* @param string $id The ID of the account to which the capability belongs.
* @param string $capabilityId The ID of the capability to retrieve.
* @param string $id The ID of the account on which to retrieve the capabilities.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Capability
* @return \Stripe\Collection The list of capabilities.
*/
public static function retrieveCapability($id, $capabilityId, $params = null, $opts = null)
public static function allCapabilities($id, $params = null, $opts = null)
{
return self::_retrieveNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts);
return self::_allNestedResources($id, static::PATH_CAPABILITIES, $params, $opts);
}

/**
* @param string $id The ID of the account to which the capability belongs.
* @param string $capabilityId The ID of the capability to update.
* @param string $capabilityId The ID of the capability to retrieve.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Capability
* @return \Stripe\Capability
*/
public static function updateCapability($id, $capabilityId, $params = null, $opts = null)
public static function retrieveCapability($id, $capabilityId, $params = null, $opts = null)
{
return self::_updateNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts);
return self::_retrieveNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts);
}

/**
* @param string $id The ID of the account on which to retrieve the capabilities.
* @param string $id The ID of the account to which the capability belongs.
* @param string $capabilityId The ID of the capability to update.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Collection The list of capabilities.
* @return \Stripe\Capability
*/
public static function allCapabilities($id, $params = null, $opts = null)
public static function updateCapability($id, $capabilityId, $params = null, $opts = null)
{
return self::_allNestedResources($id, static::PATH_CAPABILITIES, $params, $opts);
return self::_updateNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts);
}

const PATH_EXTERNAL_ACCOUNTS = '/external_accounts';

/**
* @param string $id The ID of the account on which to create the external account.
* @param string $id The ID of the account on which to retrieve the external accounts.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return BankAccount|Card
* @return \Stripe\Collection The list of external accounts (BankAccount or Card).
*/
public static function createExternalAccount($id, $params = null, $opts = null)
public static function allExternalAccounts($id, $params = null, $opts = null)
{
return self::_createNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts);
return self::_allNestedResources($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts);
}

/**
* @param string $id The ID of the account to which the external account belongs.
* @param string $externalAccountId The ID of the external account to retrieve.
* @param string $id The ID of the account on which to create the external account.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return BankAccount|Card
* @return \Stripe\BankAccount|\Stripe\Card
*/
public static function retrieveExternalAccount($id, $externalAccountId, $params = null, $opts = null)
public static function createExternalAccount($id, $params = null, $opts = null)
{
return self::_retrieveNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
return self::_createNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts);
}

/**
* @param string $id The ID of the account to which the external account belongs.
* @param string $externalAccountId The ID of the external account to update.
* @param string $externalAccountId The ID of the external account to delete.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return BankAccount|Card
* @return \Stripe\BankAccount|\Stripe\Card
*/
public static function updateExternalAccount($id, $externalAccountId, $params = null, $opts = null)
public static function deleteExternalAccount($id, $externalAccountId, $params = null, $opts = null)
{
return self::_updateNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
return self::_deleteNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
}

/**
* @param string $id The ID of the account to which the external account belongs.
* @param string $externalAccountId The ID of the external account to delete.
* @param string $externalAccountId The ID of the external account to retrieve.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return BankAccount|Card
* @return \Stripe\BankAccount|\Stripe\Card
*/
public static function deleteExternalAccount($id, $externalAccountId, $params = null, $opts = null)
public static function retrieveExternalAccount($id, $externalAccountId, $params = null, $opts = null)
{
return self::_deleteNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
return self::_retrieveNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
}

/**
* @param string $id The ID of the account on which to retrieve the external accounts.
* @param string $id The ID of the account to which the external account belongs.
* @param string $externalAccountId The ID of the external account to update.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Collection The list of external accounts (BankAccount or Card).
* @return \Stripe\BankAccount|\Stripe\Card
*/
public static function allExternalAccounts($id, $params = null, $opts = null)
public static function updateExternalAccount($id, $externalAccountId, $params = null, $opts = null)
{
return self::_allNestedResources($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts);
return self::_updateNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
}

const PATH_LOGIN_LINKS = '/login_links';

/**
Expand All @@ -332,13 +331,12 @@ public static function allExternalAccounts($id, $params = null, $opts = null)
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return LoginLink
* @return \Stripe\LoginLink
*/
public static function createLoginLink($id, $params = null, $opts = null)
{
return self::_createNestedResource($id, static::PATH_LOGIN_LINKS, $params, $opts);
}

const PATH_PERSONS = '/persons';

/**
Expand All @@ -360,75 +358,75 @@ public function persons($params = null, $opts = null)


/**
* @param string $id The ID of the account on which to create the person.
* @param string $id The ID of the account on which to retrieve the persons.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Person
* @return \Stripe\Collection The list of persons.
*/
public static function createPerson($id, $params = null, $opts = null)
public static function allPersons($id, $params = null, $opts = null)
{
return self::_createNestedResource($id, static::PATH_PERSONS, $params, $opts);
return self::_allNestedResources($id, static::PATH_PERSONS, $params, $opts);
}

/**
* @param string $id The ID of the account to which the person belongs.
* @param string $personId The ID of the person to retrieve.
* @param string $id The ID of the account on which to create the person.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Person
* @return \Stripe\Person
*/
public static function retrievePerson($id, $personId, $params = null, $opts = null)
public static function createPerson($id, $params = null, $opts = null)
{
return self::_retrieveNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts);
return self::_createNestedResource($id, static::PATH_PERSONS, $params, $opts);
}

/**
* @param string $id The ID of the account to which the person belongs.
* @param string $personId The ID of the person to update.
* @param string $personId The ID of the person to delete.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Person
* @return \Stripe\Person
*/
public static function updatePerson($id, $personId, $params = null, $opts = null)
public static function deletePerson($id, $personId, $params = null, $opts = null)
{
return self::_updateNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts);
return self::_deleteNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts);
}

/**
* @param string $id The ID of the account to which the person belongs.
* @param string $personId The ID of the person to delete.
* @param string $personId The ID of the person to retrieve.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Person
* @return \Stripe\Person
*/
public static function deletePerson($id, $personId, $params = null, $opts = null)
public static function retrievePerson($id, $personId, $params = null, $opts = null)
{
return self::_deleteNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts);
return self::_retrieveNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts);
}

/**
* @param string $id The ID of the account on which to retrieve the persons.
* @param string $id The ID of the account to which the person belongs.
* @param string $personId The ID of the person to update.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Collection The list of persons.
* @return \Stripe\Person
*/
public static function allPersons($id, $params = null, $opts = null)
public static function updatePerson($id, $personId, $params = null, $opts = null)
{
return self::_allNestedResources($id, static::PATH_PERSONS, $params, $opts);
return self::_updateNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts);
}
}
34 changes: 17 additions & 17 deletions lib/ApplicationFee.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,60 +34,60 @@ class ApplicationFee extends ApiResource
const PATH_REFUNDS = '/refunds';

/**
* @param string $id The ID of the application fee on which to create the fee refund.
* @param string $id The ID of the application fee on which to retrieve the fee refunds.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return ApplicationFeeRefund
* @return \Stripe\Collection The list of fee refunds.
*/
public static function createRefund($id, $params = null, $opts = null)
public static function allRefunds($id, $params = null, $opts = null)
{
return self::_createNestedResource($id, static::PATH_REFUNDS, $params, $opts);
return self::_allNestedResources($id, static::PATH_REFUNDS, $params, $opts);
}

/**
* @param string $id The ID of the application fee to which the fee refund belongs.
* @param string $refundId The ID of the fee refund to retrieve.
* @param string $id The ID of the application fee on which to create the fee refund.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return ApplicationFeeRefund
* @return \Stripe\ApplicationFeeRefund
*/
public static function retrieveRefund($id, $refundId, $params = null, $opts = null)
public static function createRefund($id, $params = null, $opts = null)
{
return self::_retrieveNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts);
return self::_createNestedResource($id, static::PATH_REFUNDS, $params, $opts);
}

/**
* @param string $id The ID of the application fee to which the fee refund belongs.
* @param string $refundId The ID of the fee refund to update.
* @param string $refundId The ID of the fee refund to retrieve.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return ApplicationFeeRefund
* @return \Stripe\ApplicationFeeRefund
*/
public static function updateRefund($id, $refundId, $params = null, $opts = null)
public static function retrieveRefund($id, $refundId, $params = null, $opts = null)
{
return self::_updateNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts);
return self::_retrieveNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts);
}

/**
* @param string $id The ID of the application fee on which to retrieve the fee refunds.
* @param string $id The ID of the application fee to which the fee refund belongs.
* @param string $refundId The ID of the fee refund to update.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Collection The list of fee refunds.
* @return \Stripe\ApplicationFeeRefund
*/
public static function allRefunds($id, $params = null, $opts = null)
public static function updateRefund($id, $refundId, $params = null, $opts = null)
{
return self::_allNestedResources($id, static::PATH_REFUNDS, $params, $opts);
return self::_updateNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts);
}
}
2 changes: 1 addition & 1 deletion lib/CountrySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @property string $id
* @property string $object
* @property string $default_currency
* @property mixed $supported_bank_account_currencies
* @property \Stripe\StripeObject $supported_bank_account_currencies
* @property string[] $supported_payment_currencies
* @property string[] $supported_payment_methods
* @property string[] $supported_transfer_countries
Expand Down
Loading

0 comments on commit 308f6c1

Please sign in to comment.