Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1743

Merged
merged 5 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1247
v1260
5 changes: 5 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,16 @@
require __DIR__ . '/lib/InvoiceItem.php';
require __DIR__ . '/lib/InvoiceLineItem.php';
require __DIR__ . '/lib/InvoicePayment.php';
require __DIR__ . '/lib/InvoiceRenderingTemplate.php';
require __DIR__ . '/lib/Issuing/Authorization.php';
require __DIR__ . '/lib/Issuing/Card.php';
require __DIR__ . '/lib/Issuing/Cardholder.php';
require __DIR__ . '/lib/Issuing/CreditUnderwritingRecord.php';
require __DIR__ . '/lib/Issuing/Dispute.php';
require __DIR__ . '/lib/Issuing/DisputeSettlementDetail.php';
require __DIR__ . '/lib/Issuing/PersonalizationDesign.php';
require __DIR__ . '/lib/Issuing/PhysicalBundle.php';
require __DIR__ . '/lib/Issuing/Settlement.php';
require __DIR__ . '/lib/Issuing/Token.php';
require __DIR__ . '/lib/Issuing/Transaction.php';
require __DIR__ . '/lib/LineItem.php';
Expand Down Expand Up @@ -249,12 +252,14 @@
require __DIR__ . '/lib/Service/Identity/VerificationReportService.php';
require __DIR__ . '/lib/Service/Identity/VerificationSessionService.php';
require __DIR__ . '/lib/Service/InvoiceItemService.php';
require __DIR__ . '/lib/Service/InvoiceRenderingTemplateService.php';
require __DIR__ . '/lib/Service/InvoiceService.php';
require __DIR__ . '/lib/Service/Issuing/AuthorizationService.php';
require __DIR__ . '/lib/Service/Issuing/CardService.php';
require __DIR__ . '/lib/Service/Issuing/CardholderService.php';
require __DIR__ . '/lib/Service/Issuing/CreditUnderwritingRecordService.php';
require __DIR__ . '/lib/Service/Issuing/DisputeService.php';
require __DIR__ . '/lib/Service/Issuing/DisputeSettlementDetailService.php';
require __DIR__ . '/lib/Service/Issuing/IssuingServiceFactory.php';
require __DIR__ . '/lib/Service/Issuing/PersonalizationDesignService.php';
require __DIR__ . '/lib/Service/Issuing/PhysicalBundleService.php';
Expand Down
8 changes: 8 additions & 0 deletions lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,16 @@ class Event extends ApiResource
const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
const ISSUING_DISPUTE_FUNDS_RESCINDED = 'issuing_dispute.funds_rescinded';
const ISSUING_DISPUTE_SETTLEMENT_DETAIL_CREATED = 'issuing_dispute_settlement_detail.created';
const ISSUING_DISPUTE_SETTLEMENT_DETAIL_UPDATED = 'issuing_dispute_settlement_detail.updated';
const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
const ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated';
const ISSUING_PERSONALIZATION_DESIGN_DEACTIVATED = 'issuing_personalization_design.deactivated';
const ISSUING_PERSONALIZATION_DESIGN_REJECTED = 'issuing_personalization_design.rejected';
const ISSUING_PERSONALIZATION_DESIGN_UPDATED = 'issuing_personalization_design.updated';
const ISSUING_SETTLEMENT_CREATED = 'issuing_settlement.created';
const ISSUING_SETTLEMENT_UPDATED = 'issuing_settlement.updated';
const ISSUING_TOKEN_CREATED = 'issuing_token.created';
const ISSUING_TOKEN_UPDATED = 'issuing_token.updated';
const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created';
Expand Down Expand Up @@ -451,12 +455,16 @@ class Event extends ApiResource
const TYPE_ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
const TYPE_ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
const TYPE_ISSUING_DISPUTE_FUNDS_RESCINDED = 'issuing_dispute.funds_rescinded';
const TYPE_ISSUING_DISPUTE_SETTLEMENT_DETAIL_CREATED = 'issuing_dispute_settlement_detail.created';
const TYPE_ISSUING_DISPUTE_SETTLEMENT_DETAIL_UPDATED = 'issuing_dispute_settlement_detail.updated';
const TYPE_ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
const TYPE_ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
const TYPE_ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated';
const TYPE_ISSUING_PERSONALIZATION_DESIGN_DEACTIVATED = 'issuing_personalization_design.deactivated';
const TYPE_ISSUING_PERSONALIZATION_DESIGN_REJECTED = 'issuing_personalization_design.rejected';
const TYPE_ISSUING_PERSONALIZATION_DESIGN_UPDATED = 'issuing_personalization_design.updated';
const TYPE_ISSUING_SETTLEMENT_CREATED = 'issuing_settlement.created';
const TYPE_ISSUING_SETTLEMENT_UPDATED = 'issuing_settlement.updated';
const TYPE_ISSUING_TOKEN_CREATED = 'issuing_token.created';
const TYPE_ISSUING_TOKEN_UPDATED = 'issuing_token.updated';
const TYPE_ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created';
Expand Down
4 changes: 2 additions & 2 deletions lib/InvoiceLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
* @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
* @property null|string|\Stripe\Subscription $subscription The subscription that the invoice item pertains to, if any.
* @property null|string|\Stripe\SubscriptionItem $subscription_item The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.
* @property null|\Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
* @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
* @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
* @property string $type A string identifying the type of the source of this line item, either an <code>invoiceitem</code> or a <code>subscription</code>.
* @property null|string $unit_amount_excluding_tax The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.
*/
Expand Down
96 changes: 96 additions & 0 deletions lib/InvoiceRenderingTemplate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;

/**
* @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 $created Time at which the object was created. 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|\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 $nickname A brief description of the template, hidden from customers
* @property string $status The status of the template, one of <code>active</code> or <code>archived</code>.
* @property int $version Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering
*/
class InvoiceRenderingTemplate extends ApiResource
{
const OBJECT_NAME = 'invoice_rendering_template';

const STATUS_ACTIVE = 'active';
const STATUS_ARCHIVED = 'archived';

/**
* List all templates, ordered by creation date, with the most recently created
* template appearing first.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\InvoiceRenderingTemplate> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();

return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}

/**
* Retrieves an invoice rendering template with the given ID. It by default returns
* the latest version of the template. Optionally, specify a version to see
* previous versions.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();

return $instance;
}

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate the archived invoice rendering template
*/
public function archive($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/archive';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);

return $this;
}

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceRenderingTemplate the unarchived invoice rendering template
*/
public function unarchive($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/unarchive';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);

return $this;
}
}
72 changes: 72 additions & 0 deletions lib/Issuing/DisputeSettlementDetail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Issuing;

/**
* Represents a record from the card network of a money movement or change in state for an Issuing dispute. These records are included in the settlement reports that we receive from networks and expose to users as Settlement objects.
*
* @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 Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation).
* @property string $card The card used to make the original transaction.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency The currency the original transaction was made in. 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 string $dispute The ID of the linked dispute.
* @property string $event_type The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle.
* @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 $network The card network for this dispute settlement detail. One of [&quot;visa&quot;, &quot;mastercard&quot;, &quot;maestro&quot;]
* @property null|string $settlement The ID of the linked card network settlement.
*/
class DisputeSettlementDetail extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.dispute_settlement_detail';

const EVENT_TYPE_FILING = 'filing';
const EVENT_TYPE_LOSS = 'loss';
const EVENT_TYPE_REPRESENTMENT = 'representment';
const EVENT_TYPE_WIN = 'win';

const NETWORK_MAESTRO = 'maestro';
const NETWORK_MASTERCARD = 'mastercard';
const NETWORK_VISA = 'visa';

/**
* Returns a list of Issuing <code>DisputeSettlementDetail</code> 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|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\DisputeSettlementDetail> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();

return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}

/**
* Retrieves an Issuing <code>DisputeSettlementDetail</code> object.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\DisputeSettlementDetail
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();

return $instance;
}
}
37 changes: 37 additions & 0 deletions lib/Issuing/Settlement.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Issuing;

/**
* When a non-stripe BIN is used, any use of an <a href="https://stripe.com/docs/issuing">issued card</a> must be settled directly with the card network. The net amount owed is represented by an Issuing <code>Settlement</code> object.
*
* @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 $bin The Bank Identification Number reflecting this settlement record.
* @property int $clearing_date The date that the transactions are cleared and posted to user's accounts.
* @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. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property int $interchange_fees The total interchange received as reimbursement for the transactions.
* @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 \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 $net_total The total net amount required to settle with the network.
* @property string $network The card network for this settlement report. One of [&quot;visa&quot;, &quot;maestro&quot;]
* @property int $network_fees The total amount of fees owed to the network.
* @property string $network_settlement_identifier The Settlement Identification Number assigned by the network.
* @property string $settlement_service One of <code>international</code> or <code>uk_national_net</code>.
* @property string $status The current processing status of this settlement.
* @property int $transaction_count The total number of transactions reflected in this settlement.
* @property int $transaction_volume The total transaction amount reflected in this settlement.
*/
class Settlement extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.settlement';

const NETWORK_MAESTRO = 'maestro';
const NETWORK_VISA = 'visa';

const STATUS_COMPLETE = 'complete';
const STATUS_PENDING = 'pending';
}
1 change: 1 addition & 0 deletions lib/Issuing/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* @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|\Stripe\StripeObject $network_data Details about the transaction, such as processing dates, set by the card network.
* @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant.
* @property null|string|\Stripe\Issuing\Settlement $settlement
* @property null|string|\Stripe\Issuing\Token $token <a href="https://stripe.com/docs/api/issuing/tokens/object">Token</a> object used for this transaction. If a network token was not used for this transaction, this field will be null.
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
* @property string $type The nature of the transaction.
Expand Down
17 changes: 0 additions & 17 deletions lib/QuotePhase.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,6 @@ class QuotePhase extends ApiResource
const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations';
const PRORATION_BEHAVIOR_NONE = 'none';

/**
* Returns a list of quote phases.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\QuotePhase> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();

return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}

/**
* Retrieves the quote phase with the given ID.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/Service/CoreServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* @property GiftCards\GiftCardsServiceFactory $giftCards
* @property Identity\IdentityServiceFactory $identity
* @property InvoiceItemService $invoiceItems
* @property InvoiceRenderingTemplateService $invoiceRenderingTemplates
* @property InvoiceService $invoices
* @property Issuing\IssuingServiceFactory $issuing
* @property MandateService $mandates
Expand Down Expand Up @@ -123,6 +124,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
'giftCards' => GiftCards\GiftCardsServiceFactory::class,
'identity' => Identity\IdentityServiceFactory::class,
'invoiceItems' => InvoiceItemService::class,
'invoiceRenderingTemplates' => InvoiceRenderingTemplateService::class,
'invoices' => InvoiceService::class,
'issuing' => Issuing\IssuingServiceFactory::class,
'mandates' => MandateService::class,
Expand Down
Loading
Loading