Skip to content

Commit

Permalink
Update generated code for v276
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Mar 23, 2023
1 parent 70dd470 commit 667e584
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 4 deletions.
2 changes: 2 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@
require __DIR__ . '/lib/SubscriptionItem.php';
require __DIR__ . '/lib/SubscriptionSchedule.php';
require __DIR__ . '/lib/Tax/Calculation.php';
require __DIR__ . '/lib/Tax/CalculationLineItem.php';
require __DIR__ . '/lib/Tax/Transaction.php';
require __DIR__ . '/lib/Tax/TransactionLineItem.php';
require __DIR__ . '/lib/TaxCode.php';
require __DIR__ . '/lib/TaxId.php';
require __DIR__ . '/lib/TaxRate.php';
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/Tax/CalculationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CalculationService extends \Stripe\Service\AbstractService
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Tax\Calculation>
* @return \Stripe\Collection<\Stripe\Tax\CalculationLineItem>
*/
public function allLineItems($id, $params = null, $opts = null)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/Tax/TransactionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TransactionService extends \Stripe\Service\AbstractService
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Tax\Transaction>
* @return \Stripe\Collection<\Stripe\Tax\TransactionLineItem>
*/
public function allLineItems($id, $params = null, $opts = null)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Tax/Calculation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @property null|string $customer The ID of an existing <a href="https://stripe.com/docs/api/customers/object">Customer</a> used for the resource.
* @property \Stripe\StripeObject $customer_details
* @property null|int $expires_at Timestamp of date at which the tax calculation will expire.
* @property null|\Stripe\Collection<\Stripe\StripeObject> $line_items The list of items the customer is purchasing.
* @property null|\Stripe\Collection<\Stripe\Tax\CalculationLineItem> $line_items The list of items the customer is purchasing.
* @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 $shipping_cost The shipping cost details for the calculation.
* @property int $tax_amount_exclusive The amount of tax to be collected on top of the line item prices.
Expand Down
26 changes: 26 additions & 0 deletions lib/Tax/CalculationLineItem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Tax;

/**
* @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 $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 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.
* @property null|\Stripe\StripeObject[] $tax_breakdown Detailed account of taxes relevant to this line item.
* @property string $tax_code The <a href="https://stripe.com/docs/tax/tax-categories">tax code</a> ID used for this resource.
*/
class CalculationLineItem extends \Stripe\ApiResource
{
const OBJECT_NAME = 'tax.calculation_line_item';

const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
}
2 changes: 1 addition & 1 deletion lib/Tax/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property null|string $customer The ID of an existing <a href="https://stripe.com/docs/api/customers/object">Customer</a> used for the resource.
* @property \Stripe\StripeObject $customer_details
* @property null|\Stripe\Collection<\Stripe\StripeObject> $line_items The tax collected or refunded, by line item.
* @property null|\Stripe\Collection<\Stripe\Tax\TransactionLineItem> $line_items The tax collected or refunded, by line item.
* @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 string $reference A custom unique identifier, such as 'myOrder_123'.
Expand Down
30 changes: 30 additions & 0 deletions lib/Tax/TransactionLineItem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Tax;

/**
* @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 $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|\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 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.
* @property string $tax_behavior Specifies whether the <code>amount</code> includes taxes. If <code>tax_behavior=inclusive</code>, then the amount includes taxes.
* @property string $tax_code The <a href="https://stripe.com/docs/tax/tax-categories">tax code</a> ID used for this resource.
* @property string $type If <code>reversal</code>, this line item reverses an earlier transaction.
*/
class TransactionLineItem extends \Stripe\ApiResource
{
const OBJECT_NAME = 'tax.transaction_line_item';

const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';

const TYPE_REVERSAL = 'reversal';
const TYPE_TRANSACTION = 'transaction';
}
2 changes: 2 additions & 0 deletions lib/Util/ObjectTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ class ObjectTypes
\Stripe\SubscriptionItem::OBJECT_NAME => \Stripe\SubscriptionItem::class,
\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\Transaction::OBJECT_NAME => \Stripe\Tax\Transaction::class,
\Stripe\Tax\TransactionLineItem::OBJECT_NAME => \Stripe\Tax\TransactionLineItem::class,
\Stripe\TaxCode::OBJECT_NAME => \Stripe\TaxCode::class,
\Stripe\TaxId::OBJECT_NAME => \Stripe\TaxId::class,
\Stripe\TaxRate::OBJECT_NAME => \Stripe\TaxRate::class,
Expand Down

0 comments on commit 667e584

Please sign in to comment.