Skip to content

Commit

Permalink
Update generated code (#1525)
Browse files Browse the repository at this point in the history
* Update generated code for v412

* Update generated code for v413

* Update generated code for v417

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Jul 13, 2023
1 parent 1f5d7a9 commit e9aa43d
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v406
v417
2 changes: 2 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
require __DIR__ . '/lib/Service/SubscriptionScheduleService.php';
require __DIR__ . '/lib/Service/SubscriptionService.php';
require __DIR__ . '/lib/Service/Tax/CalculationService.php';
require __DIR__ . '/lib/Service/Tax/SettingsService.php';
require __DIR__ . '/lib/Service/Tax/TaxServiceFactory.php';
require __DIR__ . '/lib/Service/Tax/TransactionService.php';
require __DIR__ . '/lib/Service/TaxCodeService.php';
Expand Down Expand Up @@ -263,6 +264,7 @@
require __DIR__ . '/lib/SubscriptionSchedule.php';
require __DIR__ . '/lib/Tax/Calculation.php';
require __DIR__ . '/lib/Tax/CalculationLineItem.php';
require __DIR__ . '/lib/Tax/Settings.php';
require __DIR__ . '/lib/Tax/Transaction.php';
require __DIR__ . '/lib/Tax/TransactionLineItem.php';
require __DIR__ . '/lib/TaxCode.php';
Expand Down
1 change: 1 addition & 0 deletions lib/ErrorObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class ErrorObject extends StripeObject
const CODE_INVALID_EXPIRY_YEAR = 'invalid_expiry_year';
const CODE_INVALID_NUMBER = 'invalid_number';
const CODE_INVALID_SOURCE_USAGE = 'invalid_source_usage';
const CODE_INVALID_TAX_LOCATION = 'invalid_tax_location';
const CODE_INVOICE_NO_CUSTOMER_LINE_ITEMS = 'invoice_no_customer_line_items';
const CODE_INVOICE_NO_PAYMENT_METHOD_TYPES = 'invoice_no_payment_method_types';
const CODE_INVOICE_NO_SUBSCRIPTION_LINE_ITEMS = 'invoice_no_subscription_line_items';
Expand Down
1 change: 1 addition & 0 deletions lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ class Event extends ApiResource
const SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring';
const SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released';
const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated';
const TAX_SETTINGS_UPDATED = 'tax.settings.updated';
const TAX_RATE_CREATED = 'tax_rate.created';
const TAX_RATE_UPDATED = 'tax_rate.updated';
const TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed';
Expand Down
39 changes: 39 additions & 0 deletions lib/Service/Tax/SettingsService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\Tax;

class SettingsService extends \Stripe\Service\AbstractService
{
/**
* Retrieves Tax <code>Settings</code> for a merchant.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Settings
*/
public function retrieve($params = null, $opts = null)
{
return $this->request('get', '/v1/tax/settings', $params, $opts);
}

/**
* Updates Tax <code>Settings</code> parameters used in tax calculations. All
* parameters are editable but none can be removed once set.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Tax\Settings
*/
public function update($params = null, $opts = null)
{
return $this->request('post', '/v1/tax/settings', $params, $opts);
}
}
2 changes: 2 additions & 0 deletions lib/Service/Tax/TaxServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Service factory class for API resources in the Tax namespace.
*
* @property CalculationService $calculations
* @property SettingsService $settings
* @property TransactionService $transactions
*/
class TaxServiceFactory extends \Stripe\Service\AbstractServiceFactory
Expand All @@ -17,6 +18,7 @@ class TaxServiceFactory extends \Stripe\Service\AbstractServiceFactory
*/
private static $classMap = [
'calculations' => CalculationService::class,
'settings' => SettingsService::class,
'transactions' => TransactionService::class,
];

Expand Down
2 changes: 1 addition & 1 deletion lib/Tax/CalculationLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @property int $amount The line item amount in integer cents. If <code>tax_behavior=inclusive</code>, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
* @property int $amount_tax The amount of tax calculated for this line item, in integer cents.
* @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 $product A Product ID.
* @property null|string $product The ID of an existing <a href="https://stripe.com/docs/api/products/object">Product</a>.
* @property int $quantity The number of units of the item being purchased. For reversals, this is the quantity reversed.
* @property null|string $reference A custom identifier for this line item.
* @property string $tax_behavior Specifies whether the <code>amount</code> includes taxes. If <code>tax_behavior=inclusive</code>, then the amount includes taxes.
Expand Down
28 changes: 28 additions & 0 deletions lib/Tax/Settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Tax;

/**
* You can use Tax <code>Settings</code> to manage configurations used by Stripe Tax calculations.
*
* Related guide: <a href="https://stripe.com/docs/tax/settings-api">Using the Settings API</a>
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property \Stripe\StripeObject $defaults
* @property null|\Stripe\StripeObject $head_office The place where your business is located.
* @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 $status The <code>active</code> status indicates you have all required settings to calculate tax. A status can transition out of <code>active</code> when new required settings are introduced.
* @property \Stripe\StripeObject $status_details
*/
class Settings extends \Stripe\SingletonApiResource
{
const OBJECT_NAME = 'tax.settings';

use \Stripe\ApiOperations\SingletonRetrieve;
use \Stripe\ApiOperations\Update;

const STATUS_ACTIVE = 'active';
const STATUS_PENDING = 'pending';
}
1 change: 1 addition & 0 deletions lib/Tax/TransactionLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @property int $amount_tax The amount of tax calculated for this line item, in integer cents.
* @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 $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 $product The ID of an existing <a href="https://stripe.com/docs/api/products/object">Product</a>.
* @property int $quantity The number of units of the item being purchased. For reversals, this is the quantity reversed.
* @property string $reference A custom identifier for this line item in the transaction.
* @property null|\Stripe\StripeObject $reversal If <code>type=reversal</code>, contains information about what was reversed.
Expand Down
1 change: 1 addition & 0 deletions lib/Util/ObjectTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class ObjectTypes
\Stripe\SubscriptionSchedule::OBJECT_NAME => \Stripe\SubscriptionSchedule::class,
\Stripe\Tax\Calculation::OBJECT_NAME => \Stripe\Tax\Calculation::class,
\Stripe\Tax\CalculationLineItem::OBJECT_NAME => \Stripe\Tax\CalculationLineItem::class,
\Stripe\Tax\Settings::OBJECT_NAME => \Stripe\Tax\Settings::class,
\Stripe\Tax\Transaction::OBJECT_NAME => \Stripe\Tax\Transaction::class,
\Stripe\Tax\TransactionLineItem::OBJECT_NAME => \Stripe\Tax\TransactionLineItem::class,
\Stripe\TaxCode::OBJECT_NAME => \Stripe\TaxCode::class,
Expand Down

0 comments on commit e9aa43d

Please sign in to comment.