wp-user-avatar
/
third-party
/
vendor
/
stripe
/
stripe-php
/
lib
/
Billing
/
CreditBalanceTransaction.php
Alert.php
2 months ago
AlertTriggered.php
2 months ago
CreditBalanceSummary.php
2 months ago
CreditBalanceTransaction.php
2 months ago
CreditGrant.php
2 months ago
Meter.php
2 months ago
MeterEvent.php
2 months ago
MeterEventAdjustment.php
2 months ago
MeterEventSummary.php
2 months ago
CreditBalanceTransaction.php
58 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | namespace ProfilePressVendor\Stripe\Billing; |
| 5 | |
| 6 | /** |
| 7 | * A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. |
| 8 | * |
| 9 | * @property string $id Unique identifier for the object. |
| 10 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 11 | * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. |
| 12 | * @property null|\Stripe\StripeObject $credit Credit details for this credit balance transaction. Only present if type is <code>credit</code>. |
| 13 | * @property string|\Stripe\Billing\CreditGrant $credit_grant The credit grant associated with this credit balance transaction. |
| 14 | * @property null|\Stripe\StripeObject $debit Debit details for this credit balance transaction. Only present if type is <code>debit</code>. |
| 15 | * @property int $effective_at The effective time of this credit balance transaction. |
| 16 | * @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. |
| 17 | * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this credit balance transaction belongs to. |
| 18 | * @property null|string $type The type of credit balance transaction (credit or debit). |
| 19 | */ |
| 20 | class CreditBalanceTransaction extends \ProfilePressVendor\Stripe\ApiResource |
| 21 | { |
| 22 | const OBJECT_NAME = 'billing.credit_balance_transaction'; |
| 23 | const TYPE_CREDIT = 'credit'; |
| 24 | const TYPE_DEBIT = 'debit'; |
| 25 | /** |
| 26 | * Retrieve a list of credit balance transactions. |
| 27 | * |
| 28 | * @param null|array $params |
| 29 | * @param null|array|string $opts |
| 30 | * |
| 31 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 32 | * |
| 33 | * @return \Stripe\Collection<\Stripe\Billing\CreditBalanceTransaction> of ApiResources |
| 34 | */ |
| 35 | public static function all($params = null, $opts = null) |
| 36 | { |
| 37 | $url = static::classUrl(); |
| 38 | return static::_requestPage($url, \ProfilePressVendor\Stripe\Collection::class, $params, $opts); |
| 39 | } |
| 40 | /** |
| 41 | * Retrieves a credit balance transaction. |
| 42 | * |
| 43 | * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key |
| 44 | * @param null|array|string $opts |
| 45 | * |
| 46 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 47 | * |
| 48 | * @return \Stripe\Billing\CreditBalanceTransaction |
| 49 | */ |
| 50 | public static function retrieve($id, $opts = null) |
| 51 | { |
| 52 | $opts = \ProfilePressVendor\Stripe\Util\RequestOptions::parse($opts); |
| 53 | $instance = new static($id, $opts); |
| 54 | $instance->refresh(); |
| 55 | return $instance; |
| 56 | } |
| 57 | } |
| 58 |