Alert.php
1 year ago
AlertTriggered.php
1 year ago
CreditBalanceSummary.php
1 year ago
CreditBalanceTransaction.php
1 year ago
CreditGrant.php
1 year ago
Meter.php
1 year ago
MeterEvent.php
1 year ago
MeterEventAdjustment.php
1 year ago
MeterEventSummary.php
1 year ago
MeterEventAdjustment.php
41 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | namespace WPForms\Vendor\Stripe\Billing; |
| 5 | |
| 6 | /** |
| 7 | * 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. |
| 8 | * |
| 9 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 10 | * @property null|\Stripe\StripeObject $cancel Specifies which event to cancel. |
| 11 | * @property string $event_name The name of the meter event. Corresponds with the <code>event_name</code> field on a meter. |
| 12 | * @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. |
| 13 | * @property string $status The meter event adjustment's status. |
| 14 | * @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. |
| 15 | */ |
| 16 | class MeterEventAdjustment extends \WPForms\Vendor\Stripe\ApiResource |
| 17 | { |
| 18 | const OBJECT_NAME = 'billing.meter_event_adjustment'; |
| 19 | const STATUS_COMPLETE = 'complete'; |
| 20 | const STATUS_PENDING = 'pending'; |
| 21 | /** |
| 22 | * Creates a billing meter event adjustment. |
| 23 | * |
| 24 | * @param null|array $params |
| 25 | * @param null|array|string $options |
| 26 | * |
| 27 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 28 | * |
| 29 | * @return \Stripe\Billing\MeterEventAdjustment the created resource |
| 30 | */ |
| 31 | public static function create($params = null, $options = null) |
| 32 | { |
| 33 | self::_validateParams($params); |
| 34 | $url = static::classUrl(); |
| 35 | list($response, $opts) = static::_staticRequest('post', $url, $params, $options); |
| 36 | $obj = \WPForms\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); |
| 37 | $obj->setLastResponse($response); |
| 38 | return $obj; |
| 39 | } |
| 40 | } |
| 41 |