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

Merged
merged 4 commits into from
Mar 14, 2024
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 @@
v855
v878
5 changes: 5 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@
require __DIR__ . '/lib/Issuing/Card.php';
require __DIR__ . '/lib/Issuing/Cardholder.php';
require __DIR__ . '/lib/Issuing/Dispute.php';
require __DIR__ . '/lib/Issuing/PersonalizationDesign.php';
require __DIR__ . '/lib/Issuing/PhysicalBundle.php';
require __DIR__ . '/lib/Issuing/Token.php';
require __DIR__ . '/lib/Issuing/Transaction.php';
require __DIR__ . '/lib/LineItem.php';
Expand Down Expand Up @@ -204,6 +206,8 @@
require __DIR__ . '/lib/Service/Issuing/CardholderService.php';
require __DIR__ . '/lib/Service/Issuing/DisputeService.php';
require __DIR__ . '/lib/Service/Issuing/IssuingServiceFactory.php';
require __DIR__ . '/lib/Service/Issuing/PersonalizationDesignService.php';
require __DIR__ . '/lib/Service/Issuing/PhysicalBundleService.php';
require __DIR__ . '/lib/Service/Issuing/TokenService.php';
require __DIR__ . '/lib/Service/Issuing/TransactionService.php';
require __DIR__ . '/lib/Service/MandateService.php';
Expand Down Expand Up @@ -253,6 +257,7 @@
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/PersonalizationDesignService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/TransactionService.php';
require __DIR__ . '/lib/Service/TestHelpers/RefundService.php';
require __DIR__ . '/lib/Service/TestHelpers/Terminal/ReaderService.php';
Expand Down
1 change: 1 addition & 0 deletions lib/Issuing/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* @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 $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.
* @property null|string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with <a href="https://stripe.com/docs/api/expanding_objects">the <code>expand</code> parameter</a>. Additionally, it's only available via the <a href="https://stripe.com/docs/api/issuing/cards/retrieve">&quot;Retrieve a card&quot; endpoint</a>, not via &quot;List all cards&quot; or any other endpoint.
* @property null|string|\Stripe\Issuing\PersonalizationDesign $personalization_design The personalization design object belonging to this card.
* @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any.
* @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any.
* @property null|string $replacement_reason The reason why the previous card needed to be replaced.
Expand Down
37 changes: 37 additions & 0 deletions lib/Issuing/PersonalizationDesign.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Issuing;

/**
* A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string|\Stripe\File $card_logo The file for the card logo to use with physical bundles that support card logos. Must have a <code>purpose</code> value of <code>issuing_logo</code>.
* @property null|\Stripe\StripeObject $carrier_text Hash containing carrier text, for use with physical bundles that support carrier text.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @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 null|string $lookup_key A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
* @property \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.
* @property null|string $name Friendly display name.
* @property string|\Stripe\Issuing\PhysicalBundle $physical_bundle The physical bundle object belonging to this personalization design.
* @property \Stripe\StripeObject $preferences
* @property \Stripe\StripeObject $rejection_reasons
* @property string $status Whether this personalization design can be used to create cards.
*/
class PersonalizationDesign extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.personalization_design';

use \Stripe\ApiOperations\All;
use \Stripe\ApiOperations\Create;
use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;

const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive';
const STATUS_REJECTED = 'rejected';
const STATUS_REVIEW = 'review';
}
31 changes: 31 additions & 0 deletions lib/Issuing/PhysicalBundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Issuing;

/**
* A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|\Stripe\StripeObject $features
* @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 string $name Friendly display name.
* @property string $status Whether this physical bundle can be used to create cards.
* @property string $type Whether this physical bundle is a standard Stripe offering or custom-made for you.
*/
class PhysicalBundle extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.physical_bundle';

use \Stripe\ApiOperations\All;
use \Stripe\ApiOperations\Retrieve;

const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive';
const STATUS_REVIEW = 'review';

const TYPE_CUSTOM = 'custom';
const TYPE_STANDARD = 'standard';
}
4 changes: 4 additions & 0 deletions lib/Service/Issuing/IssuingServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* @property CardholderService $cardholders
* @property CardService $cards
* @property DisputeService $disputes
* @property PersonalizationDesignService $personalizationDesigns
* @property PhysicalBundleService $physicalBundles
* @property TokenService $tokens
* @property TransactionService $transactions
*/
Expand All @@ -24,6 +26,8 @@ class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
'cardholders' => CardholderService::class,
'cards' => CardService::class,
'disputes' => DisputeService::class,
'personalizationDesigns' => PersonalizationDesignService::class,
'physicalBundles' => PhysicalBundleService::class,
'tokens' => TokenService::class,
'transactions' => TransactionService::class,
];
Expand Down
78 changes: 78 additions & 0 deletions lib/Service/Issuing/PersonalizationDesignService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\Issuing;

/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
/**
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PersonalizationDesignService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of personalization design objects. The objects are sorted in
* descending order by creation date, with the most recently created object
* appearing first.
*
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\PersonalizationDesign>
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/issuing/personalization_designs', $params, $opts);
}

/**
* Creates a personalization design object.
*
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v1/issuing/personalization_designs', $params, $opts);
}

/**
* Retrieves a personalization design object.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/issuing/personalization_designs/%s', $id), $params, $opts);
}

/**
* Updates a card personalization object.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*/
public function update($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/issuing/personalization_designs/%s', $id), $params, $opts);
}
}
46 changes: 46 additions & 0 deletions lib/Service/Issuing/PhysicalBundleService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\Issuing;

/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
/**
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PhysicalBundleService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of physical bundle objects. The objects are sorted in descending
* order by creation date, with the most recently created object appearing first.
*
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\PhysicalBundle>
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/issuing/physical_bundles', $params, $opts);
}

/**
* Retrieves a physical bundle object.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PhysicalBundle
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/issuing/physical_bundles/%s', $id), $params, $opts);
}
}
2 changes: 2 additions & 0 deletions lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
* @property AuthorizationService $authorizations
* @property CardService $cards
* @property PersonalizationDesignService $personalizationDesigns
* @property TransactionService $transactions
*/
class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
Expand All @@ -19,6 +20,7 @@ class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
private static $classMap = [
'authorizations' => AuthorizationService::class,
'cards' => CardService::class,
'personalizationDesigns' => PersonalizationDesignService::class,
'transactions' => TransactionService::class,
];

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\TestHelpers\Issuing;

/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
/**
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PersonalizationDesignService extends \Stripe\Service\AbstractService
{
/**
* Updates the <code>status</code> of the specified testmode personalization design
* object to <code>active</code>.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*/
public function activate($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/personalization_designs/%s/activate', $id), $params, $opts);
}

/**
* Updates the <code>status</code> of the specified testmode personalization design
* object to <code>inactive</code>.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*/
public function deactivate($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/personalization_designs/%s/deactivate', $id), $params, $opts);
}

/**
* Updates the <code>status</code> of the specified testmode personalization design
* object to <code>rejected</code>.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign
*/
public function reject($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/personalization_designs/%s/reject', $id), $params, $opts);
}
}
2 changes: 2 additions & 0 deletions lib/Util/ObjectTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class ObjectTypes
\Stripe\Issuing\Card::OBJECT_NAME => \Stripe\Issuing\Card::class,
\Stripe\Issuing\Cardholder::OBJECT_NAME => \Stripe\Issuing\Cardholder::class,
\Stripe\Issuing\Dispute::OBJECT_NAME => \Stripe\Issuing\Dispute::class,
\Stripe\Issuing\PersonalizationDesign::OBJECT_NAME => \Stripe\Issuing\PersonalizationDesign::class,
\Stripe\Issuing\PhysicalBundle::OBJECT_NAME => \Stripe\Issuing\PhysicalBundle::class,
\Stripe\Issuing\Token::OBJECT_NAME => \Stripe\Issuing\Token::class,
\Stripe\Issuing\Transaction::OBJECT_NAME => \Stripe\Issuing\Transaction::class,
\Stripe\LineItem::OBJECT_NAME => \Stripe\LineItem::class,
Expand Down
Loading
Loading