Alert.php
7 months ago
AlertTriggered.php
7 months ago
CreditBalanceSummary.php
7 months ago
CreditBalanceTransaction.php
7 months ago
CreditGrant.php
7 months ago
Meter.php
7 months ago
MeterEvent.php
7 months ago
MeterEventAdjustment.php
7 months ago
MeterEventSummary.php
7 months ago
MeterEventAdjustment.php
46 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | |
| 5 | namespace AmeliaVendor\Stripe\Billing; |
| 6 | |
| 7 | /** |
| 8 | * A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. |
| 9 | * |
| 10 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 11 | * @property null|(object{identifier: null|string}&\AmeliaVendor\Stripe\StripeObject) $cancel Specifies which event to cancel. |
| 12 | * @property string $event_name The name of the meter event. Corresponds with the <code>event_name</code> field on a meter. |
| 13 | * @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. |
| 14 | * @property string $status The meter event adjustment's status. |
| 15 | * @property string $type Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. |
| 16 | */ |
| 17 | class MeterEventAdjustment extends \AmeliaVendor\Stripe\ApiResource |
| 18 | { |
| 19 | const OBJECT_NAME = 'billing.meter_event_adjustment'; |
| 20 | |
| 21 | const STATUS_COMPLETE = 'complete'; |
| 22 | const STATUS_PENDING = 'pending'; |
| 23 | |
| 24 | /** |
| 25 | * Creates a billing meter event adjustment. |
| 26 | * |
| 27 | * @param null|array{cancel?: array{identifier?: string}, event_name: string, expand?: string[], type: string} $params |
| 28 | * @param null|array|string $options |
| 29 | * |
| 30 | * @return MeterEventAdjustment the created resource |
| 31 | * |
| 32 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 33 | */ |
| 34 | public static function create($params = null, $options = null) |
| 35 | { |
| 36 | self::_validateParams($params); |
| 37 | $url = static::classUrl(); |
| 38 | |
| 39 | list($response, $opts) = static::_staticRequest('post', $url, $params, $options); |
| 40 | $obj = \AmeliaVendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); |
| 41 | $obj->setLastResponse($response); |
| 42 | |
| 43 | return $obj; |
| 44 | } |
| 45 | } |
| 46 |