Skip to content

Commit

Permalink
Update generated code for v841
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Feb 26, 2024
1 parent a381296 commit 18e0e8c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/Capability.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class Capability extends ApiResource
{
const OBJECT_NAME = 'capability';

use ApiOperations\Update;

const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive';
const STATUS_PENDING = 'pending';
const STATUS_UNREQUESTED = 'unrequested';

use ApiOperations\Update;

/**
* @return string the API URL for this Stripe account reversal
*/
Expand Down
32 changes: 32 additions & 0 deletions lib/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class Charge extends ApiResource

use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\NestedResource;
use ApiOperations\Retrieve;
use ApiOperations\Search;
use ApiOperations\Update;
Expand Down Expand Up @@ -157,4 +158,35 @@ public static function search($params = null, $opts = null)

return static::_requestPage($url, \Stripe\SearchResult::class, $params, $opts);
}

const PATH_REFUNDS = '/refunds';

/**
* @param string $id the ID of the charge on which to retrieve the refunds
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Refund> the list of refunds
*/
public static function allRefunds($id, $params = null, $opts = null)
{
return self::_allNestedResources($id, static::PATH_REFUNDS, $params, $opts);
}

/**
* @param string $id the ID of the charge to which the refund belongs
* @param string $refundId the ID of the refund to retrieve
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Refund
*/
public static function retrieveRefund($id, $refundId, $params = null, $opts = null)
{
return self::_retrieveNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts);
}
}
6 changes: 3 additions & 3 deletions lib/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ class Person extends ApiResource
{
const OBJECT_NAME = 'person';

use ApiOperations\Delete;
use ApiOperations\Update;

const GENDER_FEMALE = 'female';
const GENDER_MALE = 'male';

Expand All @@ -61,6 +58,9 @@ class Person extends ApiResource
const VERIFICATION_STATUS_UNVERIFIED = 'unverified';
const VERIFICATION_STATUS_VERIFIED = 'verified';

use ApiOperations\Delete;
use ApiOperations\Update;

/**
* @return string the API URL for this Stripe account reversal
*/
Expand Down

0 comments on commit 18e0e8c

Please sign in to comment.