Actualización

This commit is contained in:
Xes
2025-04-10 12:24:57 +02:00
parent 8969cc929d
commit 45420b6f0d
39760 changed files with 4303286 additions and 0 deletions

View File

@@ -0,0 +1,154 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Issuing;
/**
* When an <a href="https://stripe.com/docs/issuing">issued card</a> is used to make a purchase, an Issuing <code>Authorization</code>
* object is created. <a href="https://stripe.com/docs/issuing/purchases/authorizations">Authorizations</a> must be approved for the
* purchase to be completed successfully.
*
* Related guide: <a href="https://stripe.com/docs/issuing/purchases/authorizations">Issued card authorizations</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 $amount The total amount that was authorized or rejected. This amount is in <code>currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. <code>amount</code> should be the same as <code>merchant_amount</code>, unless <code>currency</code> and <code>merchant_currency</code> are different.
* @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in <code>currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
* @property bool $approved Whether the authorization has been approved.
* @property string $authorization_method How the card details were provided.
* @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization.
* @property \Stripe\Issuing\Card $card You can <a href="https://stripe.com/docs/issuing/cards">create physical or virtual cards</a> that are issued to cardholders.
* @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency The currency of the cardholder. This currency can be different from the currency presented at authorization and the <code>merchant_currency</code> field on this authorization. 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|\Stripe\StripeObject $fleet Fleet-specific information for authorizations using Fleet cards.
* @property null|\Stripe\StripeObject $fuel Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed.
* @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 int $merchant_amount The total amount that was authorized or rejected. This amount is in the <code>merchant_currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. <code>merchant_amount</code> should be the same as <code>amount</code>, unless <code>merchant_currency</code> and <code>currency</code> are different.
* @property string $merchant_currency The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the <code>currency</code> field on this authorization. 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 \Stripe\StripeObject $merchant_data
* @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 authorization, such as identifiers, set by the card network.
* @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an <code>issuing_authorization.request</code> webhook.
* @property \Stripe\StripeObject[] $request_history History of every time a <code>pending_request</code> authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
* @property string $status The current status of the authorization in its lifecycle.
* @property null|string|\Stripe\Issuing\Token $token <a href="https://stripe.com/docs/api/issuing/tokens/object">Token</a> object used for this authorization. If a network token was not used for this authorization, this field will be null.
* @property \Stripe\Issuing\Transaction[] $transactions List of <a href="https://stripe.com/docs/api/issuing/transactions">transactions</a> associated with this authorization.
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this authorization if it was created on a <a href="https://stripe.com/docs/api/treasury/financial_accounts">FinancialAccount</a>.
* @property \Stripe\StripeObject $verification_data
* @property null|string $wallet The digital wallet used for this transaction. One of <code>apple_pay</code>, <code>google_pay</code>, or <code>samsung_pay</code>. Will populate as <code>null</code> when no digital wallet was utilized.
*/
class Authorization extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.authorization';
use \Stripe\ApiOperations\Update;
const AUTHORIZATION_METHOD_CHIP = 'chip';
const AUTHORIZATION_METHOD_CONTACTLESS = 'contactless';
const AUTHORIZATION_METHOD_KEYED_IN = 'keyed_in';
const AUTHORIZATION_METHOD_ONLINE = 'online';
const AUTHORIZATION_METHOD_SWIPE = 'swipe';
const STATUS_CLOSED = 'closed';
const STATUS_PENDING = 'pending';
const STATUS_REVERSED = 'reversed';
/**
* Returns a list of Issuing <code>Authorization</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\Authorization> 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>Authorization</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\Authorization
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
/**
* Updates the specified Issuing <code>Authorization</code> object by setting the
* values of the parameters passed. Any parameters not provided will be left
* unchanged.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Authorization the approved authorization
*/
public function approve($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/approve';
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\Issuing\Authorization the declined authorization
*/
public function decline($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/decline';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
}

View File

@@ -0,0 +1,140 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Issuing;
/**
* You can <a href="https://stripe.com/docs/issuing/cards">create physical or virtual cards</a> that are issued to cardholders.
*
* @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 $brand The brand of the card.
* @property null|string $cancellation_reason The reason why the card was canceled.
* @property \Stripe\Issuing\Cardholder $cardholder <p>An Issuing <code>Cardholder</code> object represents an individual or business entity who is <a href="https://stripe.com/docs/issuing">issued</a> cards.</p><p>Related guide: <a href="https://stripe.com/docs/issuing/cards#create-cardholder">How to create a cardholder</a></p>
* @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. Supported currencies are <code>usd</code> in the US, <code>eur</code> in the EU, and <code>gbp</code> in the UK.
* @property null|string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with <a href="https://stripe.com/docs/api/expanding_objects">the <code>expand</code> parameter</a>. Additionally, it's only available via the <a href="https://stripe.com/docs/api/issuing/cards/retrieve">&quot;Retrieve a card&quot; endpoint</a>, not via &quot;List all cards&quot; or any other endpoint.
* @property int $exp_month The expiration month of the card.
* @property int $exp_year The expiration year of the card.
* @property null|string $financial_account The financial account this card is attached to.
* @property string $last4 The last 4 digits of the card number.
* @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 null|string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with <a href="https://stripe.com/docs/api/expanding_objects">the <code>expand</code> parameter</a>. Additionally, it's only available via the <a href="https://stripe.com/docs/api/issuing/cards/retrieve">&quot;Retrieve a card&quot; endpoint</a>, not via &quot;List all cards&quot; or any other endpoint.
* @property null|string|\Stripe\Issuing\PersonalizationDesign $personalization_design The personalization design object belonging to this card.
* @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any.
* @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any.
* @property null|string $replacement_reason The reason why the previous card needed to be replaced.
* @property null|\Stripe\StripeObject $shipping Where and how the card will be shipped.
* @property \Stripe\StripeObject $spending_controls
* @property string $status Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to <code>inactive</code>.
* @property string $type The type of the card.
* @property null|\Stripe\StripeObject $wallets Information relating to digital wallets (like Apple Pay and Google Pay).
*/
class Card extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.card';
use \Stripe\ApiOperations\Update;
const CANCELLATION_REASON_DESIGN_REJECTED = 'design_rejected';
const CANCELLATION_REASON_LOST = 'lost';
const CANCELLATION_REASON_STOLEN = 'stolen';
const REPLACEMENT_REASON_DAMAGED = 'damaged';
const REPLACEMENT_REASON_EXPIRED = 'expired';
const REPLACEMENT_REASON_LOST = 'lost';
const REPLACEMENT_REASON_STOLEN = 'stolen';
const STATUS_ACTIVE = 'active';
const STATUS_CANCELED = 'canceled';
const STATUS_INACTIVE = 'inactive';
const TYPE_PHYSICAL = 'physical';
const TYPE_VIRTUAL = 'virtual';
/**
* Creates an Issuing <code>Card</code> object.
*
* @param null|array $params
* @param null|array|string $options
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Card the created resource
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* Returns a list of Issuing <code>Card</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\Card> 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>Card</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\Card
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
/**
* Updates the specified Issuing <code>Card</code> object by setting the values of
* the parameters passed. Any parameters not provided will be left unchanged.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Card the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace Stripe\Issuing;
/**
* Class CardDetails.
*
* @property string $id
* @property string $object
* @property Card $card
* @property string $cvc
* @property int $exp_month
* @property int $exp_year
* @property string $number
*/
class CardDetails extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.card_details';
}

View File

@@ -0,0 +1,126 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Issuing;
/**
* An Issuing <code>Cardholder</code> object represents an individual or business entity who is <a href="https://stripe.com/docs/issuing">issued</a> cards.
*
* Related guide: <a href="https://stripe.com/docs/issuing/cards#create-cardholder">How to create a cardholder</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 \Stripe\StripeObject $billing
* @property null|\Stripe\StripeObject $company Additional information about a <code>company</code> cardholder.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $email The cardholder's email address.
* @property null|\Stripe\StripeObject $individual Additional information about an <code>individual</code> cardholder.
* @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 string $name The cardholder's name. This will be printed on cards issued to them.
* @property null|string $phone_number The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the <a href="https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied">3D Secure documentation</a> for more details.
* @property null|string[] $preferred_locales The cardholders preferred locales (languages), ordered by preference. Locales can be <code>de</code>, <code>en</code>, <code>es</code>, <code>fr</code>, or <code>it</code>. This changes the language of the <a href="https://stripe.com/docs/issuing/3d-secure">3D Secure flow</a> and one-time password messages sent to the cardholder.
* @property \Stripe\StripeObject $requirements
* @property null|\Stripe\StripeObject $spending_controls Rules that control spending across this cardholder's cards. Refer to our <a href="https://stripe.com/docs/issuing/controls/spending-controls">documentation</a> for more details.
* @property string $status Specifies whether to permit authorizations on this cardholder's cards.
* @property string $type One of <code>individual</code> or <code>company</code>. See <a href="https://stripe.com/docs/issuing/other/choose-cardholder">Choose a cardholder type</a> for more details.
*/
class Cardholder extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.cardholder';
use \Stripe\ApiOperations\Update;
const STATUS_ACTIVE = 'active';
const STATUS_BLOCKED = 'blocked';
const STATUS_INACTIVE = 'inactive';
const TYPE_COMPANY = 'company';
const TYPE_INDIVIDUAL = 'individual';
/**
* Creates a new Issuing <code>Cardholder</code> object that can be issued cards.
*
* @param null|array $params
* @param null|array|string $options
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Cardholder the created resource
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* Returns a list of Issuing <code>Cardholder</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\Cardholder> 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>Cardholder</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\Cardholder
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
/**
* Updates the specified Issuing <code>Cardholder</code> object by setting the
* values of the parameters passed. Any parameters not provided will be left
* unchanged.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Cardholder the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
}

View File

@@ -0,0 +1,165 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Issuing;
/**
* As a <a href="https://stripe.com/docs/issuing">card issuer</a>, you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
*
* Related guide: <a href="https://stripe.com/docs/issuing/purchases/disputes">Issuing disputes</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 $amount Disputed amount in the card's currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. Usually the amount of the <code>transaction</code>, but can differ (usually because of currency fluctuation).
* @property null|\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with the dispute.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency The currency the <code>transaction</code> was made in.
* @property \Stripe\StripeObject $evidence
* @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 $loss_reason The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
* @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 string $status Current status of the dispute.
* @property string|\Stripe\Issuing\Transaction $transaction The transaction being disputed.
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
*/
class Dispute extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.dispute';
use \Stripe\ApiOperations\Update;
const LOSS_REASON_CARDHOLDER_AUTHENTICATION_ISSUER_LIABILITY = 'cardholder_authentication_issuer_liability';
const LOSS_REASON_ECI5_TOKEN_TRANSACTION_WITH_TAVV = 'eci5_token_transaction_with_tavv';
const LOSS_REASON_EXCESS_DISPUTES_IN_TIMEFRAME = 'excess_disputes_in_timeframe';
const LOSS_REASON_HAS_NOT_MET_THE_MINIMUM_DISPUTE_AMOUNT_REQUIREMENTS = 'has_not_met_the_minimum_dispute_amount_requirements';
const LOSS_REASON_INVALID_DUPLICATE_DISPUTE = 'invalid_duplicate_dispute';
const LOSS_REASON_INVALID_INCORRECT_AMOUNT_DISPUTE = 'invalid_incorrect_amount_dispute';
const LOSS_REASON_INVALID_NO_AUTHORIZATION = 'invalid_no_authorization';
const LOSS_REASON_INVALID_USE_OF_DISPUTES = 'invalid_use_of_disputes';
const LOSS_REASON_MERCHANDISE_DELIVERED_OR_SHIPPED = 'merchandise_delivered_or_shipped';
const LOSS_REASON_MERCHANDISE_OR_SERVICE_AS_DESCRIBED = 'merchandise_or_service_as_described';
const LOSS_REASON_NOT_CANCELLED = 'not_cancelled';
const LOSS_REASON_OTHER = 'other';
const LOSS_REASON_REFUND_ISSUED = 'refund_issued';
const LOSS_REASON_SUBMITTED_BEYOND_ALLOWABLE_TIME_LIMIT = 'submitted_beyond_allowable_time_limit';
const LOSS_REASON_TRANSACTION_3DS_REQUIRED = 'transaction_3ds_required';
const LOSS_REASON_TRANSACTION_APPROVED_AFTER_PRIOR_FRAUD_DISPUTE = 'transaction_approved_after_prior_fraud_dispute';
const LOSS_REASON_TRANSACTION_AUTHORIZED = 'transaction_authorized';
const LOSS_REASON_TRANSACTION_ELECTRONICALLY_READ = 'transaction_electronically_read';
const LOSS_REASON_TRANSACTION_QUALIFIES_FOR_VISA_EASY_PAYMENT_SERVICE = 'transaction_qualifies_for_visa_easy_payment_service';
const LOSS_REASON_TRANSACTION_UNATTENDED = 'transaction_unattended';
const STATUS_EXPIRED = 'expired';
const STATUS_LOST = 'lost';
const STATUS_SUBMITTED = 'submitted';
const STATUS_UNSUBMITTED = 'unsubmitted';
const STATUS_WON = 'won';
/**
* Creates an Issuing <code>Dispute</code> object. Individual pieces of evidence
* within the <code>evidence</code> object are optional at this point. Stripe only
* validates that required evidence is present during submission. Refer to <a
* href="/docs/issuing/purchases/disputes#dispute-reasons-and-evidence">Dispute
* reasons and evidence</a> for more details about evidence requirements.
*
* @param null|array $params
* @param null|array|string $options
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Dispute the created resource
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* Returns a list of Issuing <code>Dispute</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\Dispute> 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>Dispute</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\Dispute
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
/**
* Updates the specified Issuing <code>Dispute</code> object by setting the values
* of the parameters passed. Any parameters not provided will be left unchanged.
* Properties on the <code>evidence</code> object can be unset by passing in an
* empty string.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Dispute the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Dispute the submited dispute
*/
public function submit($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/submit';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
}

View File

@@ -0,0 +1,117 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Issuing;
/**
* A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line.
*
* @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 null|string|\Stripe\File $card_logo The file for the card logo to use with physical bundles that support card logos. Must have a <code>purpose</code> value of <code>issuing_logo</code>.
* @property null|\Stripe\StripeObject $carrier_text Hash containing carrier text, for use with physical bundles that support carrier text.
* @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|string $lookup_key A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
* @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|string $name Friendly display name.
* @property string|\Stripe\Issuing\PhysicalBundle $physical_bundle The physical bundle object belonging to this personalization design.
* @property \Stripe\StripeObject $preferences
* @property \Stripe\StripeObject $rejection_reasons
* @property string $status Whether this personalization design can be used to create cards.
*/
class PersonalizationDesign extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.personalization_design';
use \Stripe\ApiOperations\Update;
const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive';
const STATUS_REJECTED = 'rejected';
const STATUS_REVIEW = 'review';
/**
* Creates a personalization design object.
*
* @param null|array $params
* @param null|array|string $options
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign the created resource
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* Returns a list of personalization design 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\PersonalizationDesign> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}
/**
* Retrieves a personalization design 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\PersonalizationDesign
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
/**
* Updates a card personalization object.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\PersonalizationDesign the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
}

View File

@@ -0,0 +1,65 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Issuing;
/**
* A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card.
*
* @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 \Stripe\StripeObject $features
* @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 $name Friendly display name.
* @property string $status Whether this physical bundle can be used to create cards.
* @property string $type Whether this physical bundle is a standard Stripe offering or custom-made for you.
*/
class PhysicalBundle extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.physical_bundle';
const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive';
const STATUS_REVIEW = 'review';
const TYPE_CUSTOM = 'custom';
const TYPE_STANDARD = 'standard';
/**
* Returns a list of physical bundle 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\PhysicalBundle> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}
/**
* Retrieves a physical bundle 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\PhysicalBundle
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
}

View File

@@ -0,0 +1,100 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Issuing;
/**
* An issuing token object is created when an issued card is added to a digital wallet. As a <a href="https://stripe.com/docs/issuing">card issuer</a>, you can <a href="https://stripe.com/docs/issuing/controls/token-management">view and manage these tokens</a> through 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 string|\Stripe\Issuing\Card $card Card associated with this token.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $device_fingerprint The hashed ID derived from the device ID from the card network associated with the token.
* @property null|string $last4 The last four digits of the token.
* @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 token service provider / card network associated with the token.
* @property null|\Stripe\StripeObject $network_data
* @property int $network_updated_at Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
* @property string $status The usage state of the token.
* @property null|string $wallet_provider The digital wallet for this token, if one was used.
*/
class Token extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.token';
use \Stripe\ApiOperations\Update;
const NETWORK_MASTERCARD = 'mastercard';
const NETWORK_VISA = 'visa';
const STATUS_ACTIVE = 'active';
const STATUS_DELETED = 'deleted';
const STATUS_REQUESTED = 'requested';
const STATUS_SUSPENDED = 'suspended';
const WALLET_PROVIDER_APPLE_PAY = 'apple_pay';
const WALLET_PROVIDER_GOOGLE_PAY = 'google_pay';
const WALLET_PROVIDER_SAMSUNG_PAY = 'samsung_pay';
/**
* Lists all Issuing <code>Token</code> objects for a given card.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\Token> 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>Token</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\Token
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
/**
* Attempts to update the specified Issuing <code>Token</code> object to the status
* specified.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Token the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
}

View File

@@ -0,0 +1,112 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Issuing;
/**
* Any use of an <a href="https://stripe.com/docs/issuing">issued card</a> that results in funds entering or leaving
* your Stripe account, such as a completed purchase or refund, is represented by an Issuing
* <code>Transaction</code> object.
*
* Related guide: <a href="https://stripe.com/docs/issuing/purchases/transactions">Issued card transactions</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 $amount The transaction amount, which will be reflected in your balance. This amount is in your currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
* @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in <code>currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
* @property null|string|\Stripe\Issuing\Authorization $authorization The <code>Authorization</code> object that led to this transaction.
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the <a href="https://stripe.com/docs/api/balance_transactions">balance transaction</a> associated with this transaction.
* @property string|\Stripe\Issuing\Card $card The card used to make this transaction.
* @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this transaction belongs.
* @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 null|string|\Stripe\Issuing\Dispute $dispute If you've disputed the transaction, the ID of the dispute.
* @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 int $merchant_amount The amount that the merchant will receive, denominated in <code>merchant_currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. It will be different from <code>amount</code> if the merchant is taking payment in a different currency.
* @property string $merchant_currency The currency with which the merchant is taking payment.
* @property \Stripe\StripeObject $merchant_data
* @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\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.
* @property null|string $wallet The digital wallet used for this transaction. One of <code>apple_pay</code>, <code>google_pay</code>, or <code>samsung_pay</code>.
*/
class Transaction extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.transaction';
use \Stripe\ApiOperations\Update;
const TYPE_CAPTURE = 'capture';
const TYPE_REFUND = 'refund';
const WALLET_APPLE_PAY = 'apple_pay';
const WALLET_GOOGLE_PAY = 'google_pay';
const WALLET_SAMSUNG_PAY = 'samsung_pay';
/**
* Returns a list of Issuing <code>Transaction</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\Transaction> 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>Transaction</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\Transaction
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
/**
* Updates the specified Issuing <code>Transaction</code> object by setting the
* values of the parameters passed. Any parameters not provided will be left
* unchanged.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Transaction the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
}