<?php
 namespace Stripe; class PaymentIntent extends ApiResource { const OBJECT_NAME = 'payment_intent'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Search; use ApiOperations\Update; const STATUS_CANCELED = 'canceled'; const STATUS_PROCESSING = 'processing'; const STATUS_REQUIRES_ACTION = 'requires_action'; const STATUS_REQUIRES_CAPTURE = 'requires_capture'; const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation'; const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method'; const STATUS_SUCCEEDED = 'succeeded'; public function applyCustomerBalance($params = null, $opts = null) { $url = $this->instanceUrl() . '/apply_customer_balance'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } public function cancel($params = null, $opts = null) { $url = $this->instanceUrl() . '/cancel'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } public function capture($params = null, $opts = null) { $url = $this->instanceUrl() . '/capture'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } public function confirm($params = null, $opts = null) { $url = $this->instanceUrl() . '/confirm'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } public function incrementAuthorization($params = null, $opts = null) { $url = $this->instanceUrl() . '/increment_authorization'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } public function verifyMicrodeposits($params = null, $opts = null) { $url = $this->instanceUrl() . '/verify_microdeposits'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } public static function search($params = null, $opts = null) { $url = '/v1/payment_intents/search'; return self::_searchResource($url, $params, $opts); } } 