-
Notifications
You must be signed in to change notification settings - Fork 853
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 #1743 from stripe/latest-codegen-beta
Update generated code for beta
- Loading branch information
Showing
17 changed files
with
358 additions
and
36 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 @@ | ||
v1247 | ||
v1260 |
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,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; | ||
} | ||
} |
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,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 ["visa", "mastercard", "maestro"] | ||
* @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; | ||
} | ||
} |
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,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 ["visa", "maestro"] | ||
* @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'; | ||
} |
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
Oops, something went wrong.