allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
This commit is contained in:
89
vendor/stripe/stripe-php/lib/Billing/Meter.php
vendored
Normal file
89
vendor/stripe/stripe-php/lib/Billing/Meter.php
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Billing;
|
||||
|
||||
/**
|
||||
* A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then use the billing meter to charge the user for the number of API calls they make.
|
||||
*
|
||||
* @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 $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\StripeObject $customer_mapping
|
||||
* @property \Stripe\StripeObject $default_aggregation
|
||||
* @property string $display_name The meter's name.
|
||||
* @property string $event_name The name of the usage event to record usage for. Corresponds with the <code>event_name</code> field on usage events.
|
||||
* @property null|string $event_time_window The time window to pre-aggregate usage events for, if any.
|
||||
* @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 string $status The meter's status.
|
||||
* @property \Stripe\StripeObject $status_transitions
|
||||
* @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\StripeObject $value_settings
|
||||
*/
|
||||
class Meter extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'billing.meter';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Create;
|
||||
use \Stripe\ApiOperations\NestedResource;
|
||||
use \Stripe\ApiOperations\Retrieve;
|
||||
use \Stripe\ApiOperations\Update;
|
||||
|
||||
const EVENT_TIME_WINDOW_DAY = 'day';
|
||||
const EVENT_TIME_WINDOW_HOUR = 'hour';
|
||||
|
||||
const STATUS_ACTIVE = 'active';
|
||||
const STATUS_INACTIVE = 'inactive';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Billing\Meter the deactivated meter
|
||||
*/
|
||||
public function deactivate($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/deactivate';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Billing\Meter the reactivated meter
|
||||
*/
|
||||
public function reactivate($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/reactivate';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
const PATH_EVENT_SUMMARIES = '/event_summaries';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the meter on which to retrieve the meter event summaries
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Billing\MeterEventSummary> the list of meter event summaries
|
||||
*/
|
||||
public static function allEventSummaries($id, $params = null, $opts = null)
|
||||
{
|
||||
return self::_allNestedResources($id, static::PATH_EVENT_SUMMARIES, $params, $opts);
|
||||
}
|
||||
}
|
||||
24
vendor/stripe/stripe-php/lib/Billing/MeterEvent.php
vendored
Normal file
24
vendor/stripe/stripe-php/lib/Billing/MeterEvent.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Billing;
|
||||
|
||||
/**
|
||||
* A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage.
|
||||
* Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing.
|
||||
*
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $event_name The name of the meter event. Corresponds with the <code>event_name</code> field on a meter.
|
||||
* @property string $identifier A unique identifier for the event.
|
||||
* @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 $payload The payload of the event.
|
||||
* @property int $timestamp The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
|
||||
*/
|
||||
class MeterEvent extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'billing.meter_event';
|
||||
|
||||
use \Stripe\ApiOperations\Create;
|
||||
}
|
||||
25
vendor/stripe/stripe-php/lib/Billing/MeterEventAdjustment.php
vendored
Normal file
25
vendor/stripe/stripe-php/lib/Billing/MeterEventAdjustment.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Billing;
|
||||
|
||||
/**
|
||||
* A billing meter event adjustment represents the status of a meter event adjustment.
|
||||
*
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $cancel
|
||||
* @property string $event_name The name of the meter event. Corresponds with the <code>event_name</code> field on a meter.
|
||||
* @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 string $status The meter event adjustment's status.
|
||||
* @property string $type Specifies whether to cancel a single event or a range of events for a time period.
|
||||
*/
|
||||
class MeterEventAdjustment extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'billing.meter_event_adjustment';
|
||||
|
||||
use \Stripe\ApiOperations\Create;
|
||||
|
||||
const STATUS_COMPLETE = 'complete';
|
||||
const STATUS_PENDING = 'pending';
|
||||
}
|
||||
22
vendor/stripe/stripe-php/lib/Billing/MeterEventSummary.php
vendored
Normal file
22
vendor/stripe/stripe-php/lib/Billing/MeterEventSummary.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Billing;
|
||||
|
||||
/**
|
||||
* A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much
|
||||
* usage was accrued by a customer for that period.
|
||||
*
|
||||
* @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 float $aggregated_value Aggregated value of all the events within start_time (inclusive) and end_time (inclusive). The aggregation strategy is defined on meter via `default_aggregation``.
|
||||
* @property int $end_time End timestamp for this usage summary (inclusive).
|
||||
* @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 string $meter The meter associated with this usage summary.
|
||||
* @property int $start_time Start timestamp for this usage summary (inclusive).
|
||||
*/
|
||||
class MeterEventSummary extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'billing.meter_event_summary';
|
||||
}
|
||||
Reference in New Issue
Block a user