/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/vendor/stripe/stripe-php/lib/Topup.php (4003B)
true if the object exists in live mode or the value false if the object exists in test mode.
* @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 \Stripe\Source $source Source objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like a Card object: once chargeable, they can be charged, or can be attached to customers.
Related guides: Sources API and Sources & Customers.
* @property null|string $statement_descriptor Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. * @property string $status The status of the top-up is eithercanceled, failed, pending, reversed, or succeeded.
* @property null|string $transfer_group A string that identifies this top-up as part of a group.
*/
class Topup extends ApiResource
{
const OBJECT_NAME = 'topup';
use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\Retrieve;
use ApiOperations\Update;
const STATUS_CANCELED = 'canceled';
const STATUS_FAILED = 'failed';
const STATUS_PENDING = 'pending';
const STATUS_REVERSED = 'reversed';
const STATUS_SUCCEEDED = 'succeeded';
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Topup the canceled topup
*/
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;
}
}