Skip to content

Commit

Permalink
Merge pull request #1448 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
API Updates for beta branch
  • Loading branch information
pakrym-stripe authored Mar 2, 2023
2 parents b1033df + 287ce73 commit 8f67138
Show file tree
Hide file tree
Showing 15 changed files with 234 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 10.8.0 - 2023-03-02
* [#1447](https://github.com/stripe/stripe-php/pull/1447) API Updates
* Add support for `reconciliation_status` on `Payout`
* Add support for new value `lease_tax` on enum `TaxRate.tax_type`

## 10.8.0-beta.1 - 2023-02-23
* [#1445](https://github.com/stripe/stripe-php/pull/1445) API Updates for beta branch
* Updated stable APIs to the latest version
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v232
v237
5 changes: 5 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
require __DIR__ . '/lib/InvoiceLineItem.php';
require __DIR__ . '/lib/Issuing/Authorization.php';
require __DIR__ . '/lib/Issuing/Card.php';
require __DIR__ . '/lib/Issuing/CardBundle.php';
require __DIR__ . '/lib/Issuing/CardDesign.php';
require __DIR__ . '/lib/Issuing/CardDetails.php';
require __DIR__ . '/lib/Issuing/Cardholder.php';
require __DIR__ . '/lib/Issuing/Dispute.php';
Expand Down Expand Up @@ -234,6 +236,8 @@
require __DIR__ . '/lib/Service/InvoiceItemService.php';
require __DIR__ . '/lib/Service/Issuing/AuthorizationService.php';
require __DIR__ . '/lib/Service/Issuing/CardService.php';
require __DIR__ . '/lib/Service/Issuing/CardBundleService.php';
require __DIR__ . '/lib/Service/Issuing/CardDesignService.php';
require __DIR__ . '/lib/Service/Issuing/CardholderService.php';
require __DIR__ . '/lib/Service/Issuing/DisputeService.php';
require __DIR__ . '/lib/Service/Issuing/TransactionService.php';
Expand Down Expand Up @@ -276,6 +280,7 @@
require __DIR__ . '/lib/Service/Terminal/ReaderService.php';
require __DIR__ . '/lib/Service/TestHelpers/CustomerService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/CardService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/CardDesignService.php';
require __DIR__ . '/lib/Service/TestHelpers/RefundService.php';
require __DIR__ . '/lib/Service/TestHelpers/Terminal/ReaderService.php';
require __DIR__ . '/lib/Service/TestHelpers/TestClockService.php';
Expand Down
3 changes: 3 additions & 0 deletions lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ class Event extends ApiResource
const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated';
const ISSUING_CARD_CREATED = 'issuing_card.created';
const ISSUING_CARD_UPDATED = 'issuing_card.updated';
const ISSUING_CARD_DESIGN_ACTIVATED = 'issuing_card_design.activated';
const ISSUING_CARD_DESIGN_DEACTIVATED = 'issuing_card_design.deactivated';
const ISSUING_CARD_DESIGN_UPDATED = 'issuing_card_design.updated';
const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created';
const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated';
const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
Expand Down
1 change: 1 addition & 0 deletions lib/Issuing/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property string $brand The brand of the card.
* @property null|string $cancellation_reason The reason why the card was canceled.
* @property null|string|\Stripe\Issuing\CardDesign $card_design The card design object belonging to this card.
* @property \Stripe\Issuing\Cardholder $cardholder <p>An Issuing <code>Cardholder</code> object represents an individual or business entity who is <a href="https://stripe.com/docs/issuing">issued</a> cards.</p><p>Related guide: <a href="https://stripe.com/docs/issuing/cards#create-cardholder">How to create a Cardholder</a></p>
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Supported currencies are <code>usd</code> in the US, <code>eur</code> in the EU, and <code>gbp</code> in the UK.
Expand Down
32 changes: 32 additions & 0 deletions lib/Issuing/CardBundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Issuing;

/**
* A Card 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 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 card bundle can be used to create cards.
* @property string $type Whether this card bundle is a standard Stripe offering or custom-made for you.
*/
class CardBundle extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.card_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';
}
35 changes: 35 additions & 0 deletions lib/Issuing/CardDesign.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Issuing;

/**
* A Card Design is a logical grouping of a Card 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 string|\Stripe\Issuing\CardBundle $card_bundle The card bundle object belonging to this card design.
* @property null|string $lookup_key A lookup key used to retrieve card 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 $preference Whether this card design is used to create cards when one is not specified.
* @property string $status Whether this card design can be used to create cards.
*/
class CardDesign extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.card_design';

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

const PREFERENCE_DEFAULT = 'default';
const PREFERENCE_NONE = 'none';

const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive';
const STATUS_REJECTED = 'rejected';
const STATUS_REVIEW = 'review';
}
5 changes: 5 additions & 0 deletions lib/Payout.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* @property null|\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 string $method The method used to send this payout, which can be <code>standard</code> or <code>instant</code>. <code>instant</code> is only supported for payouts to debit cards. (See <a href="https://stripe.com/blog/instant-payouts-for-marketplaces">Instant payouts for marketplaces</a> for more information.)
* @property null|string|\Stripe\Payout $original_payout If the payout reverses another, this is the ID of the original payout.
* @property string $reconciliation_status If <code>completed</code>, the <a href="https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout">Balance Transactions API</a> may be used to list all Balance Transactions that were paid out in this payout.
* @property null|string|\Stripe\Payout $reversed_by If the payout was reversed, this is the ID of the payout that reverses this payout.
* @property string $source_type The source balance this payout came from. One of <code>card</code>, <code>fpx</code>, or <code>bank_account</code>.
* @property null|string $statement_descriptor Extra information about a payout to be displayed on the user's bank statement.
Expand Down Expand Up @@ -65,6 +66,10 @@ class Payout extends ApiResource
const METHOD_INSTANT = 'instant';
const METHOD_STANDARD = 'standard';

const RECONCILIATION_STATUS_COMPLETED = 'completed';
const RECONCILIATION_STATUS_IN_PROGRESS = 'in_progress';
const RECONCILIATION_STATUS_NOT_APPLICABLE = 'not_applicable';

const STATUS_CANCELED = 'canceled';
const STATUS_FAILED = 'failed';
const STATUS_IN_TRANSIT = 'in_transit';
Expand Down
40 changes: 40 additions & 0 deletions lib/Service/Issuing/CardBundleService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\Issuing;

class CardBundleService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of card 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|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\CardBundle>
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/issuing/card_bundles', $params, $opts);
}

/**
* Retrieves a card bundle object.
*
* @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\CardBundle
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/issuing/card_bundles/%s', $id), $params, $opts);
}
}
56 changes: 56 additions & 0 deletions lib/Service/Issuing/CardDesignService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\Issuing;

class CardDesignService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of card 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|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\CardDesign>
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/issuing/card_designs', $params, $opts);
}

/**
* Retrieves a card design object.
*
* @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\CardDesign
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/issuing/card_designs/%s', $id), $params, $opts);
}

/**
* Updates a card design object.
*
* @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\CardDesign
*/
public function update($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/issuing/card_designs/%s', $id), $params, $opts);
}
}
4 changes: 4 additions & 0 deletions lib/Service/Issuing/IssuingServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Service factory class for API resources in the Issuing namespace.
*
* @property AuthorizationService $authorizations
* @property CardBundleService $cardBundles
* @property CardDesignService $cardDesigns
* @property CardholderService $cardholders
* @property CardService $cards
* @property DisputeService $disputes
Expand All @@ -20,6 +22,8 @@ class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
*/
private static $classMap = [
'authorizations' => AuthorizationService::class,
'cardBundles' => CardBundleService::class,
'cardDesigns' => CardDesignService::class,
'cardholders' => CardholderService::class,
'cards' => CardService::class,
'disputes' => DisputeService::class,
Expand Down
42 changes: 42 additions & 0 deletions lib/Service/TestHelpers/Issuing/CardDesignService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\TestHelpers\Issuing;

class CardDesignService extends \Stripe\Service\AbstractService
{
/**
* Updates the <code>status</code> of the specified testmode card design object to
* <code>active</code>.
*
* @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\CardDesign
*/
public function activateTestmode($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/card_designs/%s/status/activate', $id), $params, $opts);
}

/**
* Updates the <code>status</code> of the specified testmode card design object to
* <code>inactive</code>.
*
* @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\CardDesign
*/
public function deactivateTestmode($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/card_designs/%s/status/deactivate', $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 @@ -7,6 +7,7 @@
/**
* Service factory class for API resources in the Issuing namespace.
*
* @property CardDesignService $cardDesigns
* @property CardService $cards
*/
class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
Expand All @@ -15,6 +16,7 @@ class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
* @var array<string, string>
*/
private static $classMap = [
'cardDesigns' => CardDesignService::class,
'cards' => CardService::class,
];

Expand Down
1 change: 1 addition & 0 deletions lib/TaxRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class TaxRate extends ApiResource
const TAX_TYPE_HST = 'hst';
const TAX_TYPE_IGST = 'igst';
const TAX_TYPE_JCT = 'jct';
const TAX_TYPE_LEASE_TAX = 'lease_tax';
const TAX_TYPE_PST = 'pst';
const TAX_TYPE_QST = 'qst';
const TAX_TYPE_RST = 'rst';
Expand Down
2 changes: 2 additions & 0 deletions lib/Util/ObjectTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class ObjectTypes
\Stripe\InvoiceLineItem::OBJECT_NAME => \Stripe\InvoiceLineItem::class,
\Stripe\Issuing\Authorization::OBJECT_NAME => \Stripe\Issuing\Authorization::class,
\Stripe\Issuing\Card::OBJECT_NAME => \Stripe\Issuing\Card::class,
\Stripe\Issuing\CardBundle::OBJECT_NAME => \Stripe\Issuing\CardBundle::class,
\Stripe\Issuing\CardDesign::OBJECT_NAME => \Stripe\Issuing\CardDesign::class,
\Stripe\Issuing\CardDetails::OBJECT_NAME => \Stripe\Issuing\CardDetails::class,
\Stripe\Issuing\Cardholder::OBJECT_NAME => \Stripe\Issuing\Cardholder::class,
\Stripe\Issuing\Dispute::OBJECT_NAME => \Stripe\Issuing\Dispute::class,
Expand Down

0 comments on commit 8f67138

Please sign in to comment.