JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrissued card is used to make a purchase, an Issuing Authorization * object is created. Authorizations must be approved for the * purchase to be completed successfully. * * Related guide: Issued card authorizations * * @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 currency and in the smallest currency unit. amount should be the same as merchant_amount, unless currency and merchant_currency are different. * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit. * @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 create physical or virtual cards 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 merchant_currency field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. * @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 true if the object exists in live mode or the value false if the object exists in test mode. * @property int $merchant_amount The total amount that was authorized or rejected. This amount is in the merchant_currency and in the smallest currency unit. merchant_amount should be the same as amount, unless merchant_currency and currency 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 currency field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property \Stripe\StripeObject $merchant_data * @property \Stripe\StripeObject $metadata Set of key-value pairs 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 issuing_authorization.request webhook. * @property \Stripe\StripeObject[] $request_history History of every time a pending_request 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 Token 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 transactions associated with this authorization. * @property null|\Stripe\StripeObject $treasury Treasury details related to this authorization if it was created on a FinancialAccount. * @property \Stripe\StripeObject $verification_data * @property null|string $wallet The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay. Will populate as null 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 Authorization 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 Authorization 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 Authorization 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; } }