Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/.././bootstrap/../vendor/egulias/../bin/../ralouphie/../stripe/stripe-php/lib
الملفات الموجودة في هذا الـ Path:
.
..
Account.php
AccountLink.php
ApiOperations
ApiRequestor.php
ApiResource.php
ApiResponse.php
ApplePayDomain.php
ApplicationFee.php
ApplicationFeeRefund.php
Apps
Balance.php
BalanceTransaction.php
BankAccount.php
BaseStripeClient.php
BaseStripeClientInterface.php
BillingPortal
Capability.php
Card.php
CashBalance.php
Charge.php
Checkout
Collection.php
CountrySpec.php
Coupon.php
CreditNote.php
CreditNoteLineItem.php
Customer.php
CustomerBalanceTransaction.php
CustomerCashBalanceTransaction.php
Discount.php
Dispute.php
EphemeralKey.php
ErrorObject.php
Event.php
Exception
ExchangeRate.php
File.php
FileLink.php
FinancialConnections
FundingInstructions.php
HttpClient
Identity
Invoice.php
InvoiceItem.php
InvoiceLineItem.php
Issuing
LineItem.php
LoginLink.php
Mandate.php
OAuth.php
OAuthErrorObject.php
PaymentIntent.php
PaymentLink.php
PaymentMethod.php
Payout.php
Person.php
Plan.php
Price.php
Product.php
PromotionCode.php
Quote.php
Radar
RecipientTransfer.php
Refund.php
Reporting
RequestTelemetry.php
Review.php
SearchResult.php
Service
SetupAttempt.php
SetupIntent.php
ShippingRate.php
Sigma
SingletonApiResource.php
Source.php
SourceTransaction.php
Stripe.php
StripeClient.php
StripeClientInterface.php
StripeObject.php
StripeStreamingClientInterface.php
Subscription.php
SubscriptionItem.php
SubscriptionSchedule.php
Tax
TaxCode.php
TaxId.php
TaxRate.php
Terminal
TestHelpers
Token.php
Topup.php
Transfer.php
TransferReversal.php
Treasury
UsageRecord.php
UsageRecordSummary.php
Util
Webhook.php
WebhookEndpoint.php
WebhookSignature.php

مشاهدة ملف: Topup.php

<?php

// File generated from our OpenAPI spec

namespace Stripe;

/**
 * To top up your Stripe balance, you create a top-up object. You can retrieve
 * individual top-ups, as well as list all top-ups. Top-ups are identified by a
 * unique, random ID.
 *
 * Related guide: <a href="https://stripe.com/docs/connect/top-ups">Topping up your platform account</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 Amount transferred.
 * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up.
 * @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 $description An arbitrary string attached to the object. Often useful for displaying to users.
 * @property null|int $expected_availability_date Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up.
 * @property null|string $failure_code Error code explaining reason for top-up failure if available (see <a href="https://stripe.com/docs/api#errors">the errors section</a> for a list of codes).
 * @property null|string $failure_message Message to user further explaining reason for top-up failure if available.
 * @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|\Stripe\Source $source For most Stripe users, the source of every top-up is a bank account. This hash is then the <a href="https://stripe.com/docs/api#source_object">source object</a> describing that bank account.
 * @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 either <code>canceled</code>, <code>failed</code>, <code>pending</code>, <code>reversed</code>, or <code>succeeded</code>.
 * @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;
    }
}