-
Notifications
You must be signed in to change notification settings - Fork 850
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 #1423 from stripe/latest-codegen-beta
API Updates for beta branch
- Loading branch information
Showing
9 changed files
with
113 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v217 | ||
v218 |
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,57 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Service\Tax; | ||
|
||
class RegistrationService extends \Stripe\Service\AbstractService | ||
{ | ||
/** | ||
* Returns a list of Tax <code>Registration</code> objects. | ||
* | ||
* @param null|array $params | ||
* @param null|array|\Stripe\Util\RequestOptions $opts | ||
* | ||
* @throws \Stripe\Exception\ApiErrorException if the request fails | ||
* | ||
* @return \Stripe\Collection<\Stripe\Tax\Registration> | ||
*/ | ||
public function all($params = null, $opts = null) | ||
{ | ||
return $this->requestCollection('get', '/v1/tax/registrations', $params, $opts); | ||
} | ||
|
||
/** | ||
* Creates a new Tax <code>Registration</code> object. | ||
* | ||
* @param null|array $params | ||
* @param null|array|\Stripe\Util\RequestOptions $opts | ||
* | ||
* @throws \Stripe\Exception\ApiErrorException if the request fails | ||
* | ||
* @return \Stripe\Tax\Registration | ||
*/ | ||
public function create($params = null, $opts = null) | ||
{ | ||
return $this->request('post', '/v1/tax/registrations', $params, $opts); | ||
} | ||
|
||
/** | ||
* Updates an existing Tax <code>Registration</code> object. | ||
* | ||
* A registration cannot be deleted after it has been created. If you wish to end a | ||
* registration you may do so by setting <code>expires_at</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\Tax\Registration | ||
*/ | ||
public function update($id, $params = null, $opts = null) | ||
{ | ||
return $this->request('post', $this->buildPath('/v1/tax/registrations/%s', $id), $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
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,45 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe\Tax; | ||
|
||
/** | ||
* A Tax <code>Registration</code> lets us know that your business is registered to | ||
* collect tax on payments within a region, enabling you to <a | ||
* href="https://stripe.com/docs/tax">automatically collect tax</a>. | ||
* | ||
* Stripe will not register on your behalf with the relevant authorities when you | ||
* create a Tax <code>Registration</code> object. For more information on how to | ||
* register to collect tax, see <a | ||
* href="https://stripe.com/docs/tax/registering">our guide</a>. | ||
* | ||
* @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 int $active_from Time at which the registration becomes active. Measured in seconds since the Unix epoch. | ||
* @property string $country Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a>). | ||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. | ||
* @property null|int $expires_at If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. 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 $state State, county, province, or region. | ||
* @property string $status The status of the registration. This field is present for convenience and can be deduced from <code>active_from</code> and <code>expires_at</code>. | ||
* @property string $type The type of the registration. See <a href="https://stripe.com/docs/tax/registering">our guide</a> for more information about registration types. | ||
*/ | ||
class Registration extends \Stripe\ApiResource | ||
{ | ||
const OBJECT_NAME = 'tax.registration'; | ||
|
||
use \Stripe\ApiOperations\All; | ||
use \Stripe\ApiOperations\Create; | ||
use \Stripe\ApiOperations\Update; | ||
|
||
const STATUS_ACTIVE = 'active'; | ||
const STATUS_EXPIRED = 'expired'; | ||
const STATUS_SCHEDULED = 'scheduled'; | ||
|
||
const TYPE_DOMESTIC_SMALL_SELLER = 'domestic_small_seller'; | ||
const TYPE_SIMPLIFIED = 'simplified'; | ||
const TYPE_STANDARD = 'standard'; | ||
const TYPE_VAT_OSS_NON_UNION = 'vat_oss_non_union'; | ||
const TYPE_VAT_OSS_UNION = 'vat_oss_union'; | ||
} |
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