-
Notifications
You must be signed in to change notification settings - Fork 863
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1637 from stripe/latest-codegen-beta
Update generated code for beta
- Loading branch information
Showing
24 changed files
with
303 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v796 | ||
v808 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe; | ||
|
||
/** | ||
* A entitlement for a customer describes access to a feature. | ||
* | ||
* @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 $feature The feature that the customer is entitled to. | ||
* @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 $lookup_key A unique key you provide as your own system identifier. This may be up to 80 characters. | ||
* @property null|\Stripe\StripeObject $quantity Contains information about entitlements relating to features with type=quantity. Required when the feature has type=quantity. | ||
* @property string $type The type of feature. | ||
*/ | ||
class CustomerEntitlement extends ApiResource | ||
{ | ||
const OBJECT_NAME = 'customer_entitlement'; | ||
|
||
use ApiOperations\All; | ||
|
||
const TYPE_QUANTITY = 'quantity'; | ||
const TYPE_SWITCH = 'switch'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe; | ||
|
||
/** | ||
* A summary of a customer's entitlements. | ||
* | ||
* @property string $object String representing the object's type. Objects of the same type share the same value. | ||
* @property string $customer The customer that is entitled to this feature. | ||
* @property \Stripe\Collection<\Stripe\CustomerEntitlement> $entitlements The list of entitlements this customer has. | ||
* @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. | ||
*/ | ||
class CustomerEntitlementSummary extends ApiResource | ||
{ | ||
const OBJECT_NAME = 'customer_entitlement_summary'; | ||
|
||
use ApiOperations\Retrieve; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Entitlements; | ||
|
||
/** | ||
* An entitlement event either grants or revokes an entitlement to a feature for a customer. | ||
* | ||
* @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 $customer The customer that is being granted or revoked entitlement to/from a feature. | ||
* @property string $feature The feature that the customer is being granted/revoked entitlement to/from. | ||
* @property null|\Stripe\StripeObject $grant Contains information about type=grant entitlement event. | ||
* @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|\Stripe\StripeObject $quantity Contains information about entitlement events relating to features with type=quantity. Required when the feature has type=quantity. | ||
* @property null|\Stripe\StripeObject $revoke Contains information about type=revoke entitlement event. | ||
* @property string $type Whether the event is a grant or revocation of the feature. | ||
*/ | ||
class Event extends \Stripe\ApiResource | ||
{ | ||
const OBJECT_NAME = 'entitlements.event'; | ||
|
||
use \Stripe\ApiOperations\Create; | ||
|
||
const TYPE_GRANT = 'grant'; | ||
const TYPE_REVOKE = 'revoke'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Entitlements; | ||
|
||
/** | ||
* A feature represents a monetizable ability or functionality in your system. | ||
* Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. | ||
* | ||
* @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 $lookup_key A unique key you provide as your own system identifier. This may be up to 80 characters. | ||
* @property string $name The feature's name, for your own purpose, not meant to be displayable to the customer. | ||
* @property null|\Stripe\StripeObject $quantity Contains information about type=quantity features. This is required when type=quantity. | ||
* @property string $type The type of feature. | ||
*/ | ||
class Feature extends \Stripe\ApiResource | ||
{ | ||
const OBJECT_NAME = 'entitlements.feature'; | ||
|
||
use \Stripe\ApiOperations\All; | ||
use \Stripe\ApiOperations\Create; | ||
|
||
const TYPE_QUANTITY = 'quantity'; | ||
const TYPE_SWITCH = 'switch'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Service\Entitlements; | ||
|
||
/** | ||
* Service factory class for API resources in the Entitlements namespace. | ||
* | ||
* @property EventService $events | ||
* @property FeatureService $features | ||
*/ | ||
class EntitlementsServiceFactory extends \Stripe\Service\AbstractServiceFactory | ||
{ | ||
/** | ||
* @var array<string, string> | ||
*/ | ||
private static $classMap = [ | ||
'events' => EventService::class, | ||
'features' => FeatureService::class, | ||
]; | ||
|
||
protected function getServiceClass($name) | ||
{ | ||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Service\Entitlements; | ||
|
||
class EventService extends \Stripe\Service\AbstractService | ||
{ | ||
/** | ||
* Create an entitlement event manually, outside of the entitlement events | ||
* automatically created by Stripe lifecycle events. | ||
* | ||
* @param null|array $params | ||
* @param null|array|\Stripe\Util\RequestOptions $opts | ||
* | ||
* @throws \Stripe\Exception\ApiErrorException if the request fails | ||
* | ||
* @return \Stripe\Entitlements\Event | ||
*/ | ||
public function create($params = null, $opts = null) | ||
{ | ||
return $this->request('post', '/v1/entitlements/events', $params, $opts); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Service\Entitlements; | ||
|
||
class FeatureService extends \Stripe\Service\AbstractService | ||
{ | ||
/** | ||
* Retrieve a list of features. | ||
* | ||
* @param null|array $params | ||
* @param null|array|\Stripe\Util\RequestOptions $opts | ||
* | ||
* @throws \Stripe\Exception\ApiErrorException if the request fails | ||
* | ||
* @return \Stripe\Collection<\Stripe\Entitlements\Feature> | ||
*/ | ||
public function all($params = null, $opts = null) | ||
{ | ||
return $this->requestCollection('get', '/v1/entitlements/features', $params, $opts); | ||
} | ||
|
||
/** | ||
* Creates a feature. | ||
* | ||
* @param null|array $params | ||
* @param null|array|\Stripe\Util\RequestOptions $opts | ||
* | ||
* @throws \Stripe\Exception\ApiErrorException if the request fails | ||
* | ||
* @return \Stripe\Entitlements\Feature | ||
*/ | ||
public function create($params = null, $opts = null) | ||
{ | ||
return $this->request('post', '/v1/entitlements/features', $params, $opts); | ||
} | ||
} |
Oops, something went wrong.