• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-php / 9308533534

30 May 2024 08:07PM UTC coverage: 65.24% (-0.9%) from 66.176%
9308533534

push

github

web-flow
Added PHPDocs for `create`, `update`, `delete`, `all`, `retrieve` methods after moving them out of traits.  (#1701)

* Demagiced crudl operation

* Improvements from codegen#1452

* Updated override to fix indents

1080 of 1682 new or added lines in 106 files covered. (64.21%)

15 existing lines in 3 files now uncovered.

3444 of 5279 relevant lines covered (65.24%)

2.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/Billing/MeterEvent.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Billing;
6

7
/**
8
 * A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage.
9
 * Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing.
10
 *
11
 * @property string $object String representing the object's type. Objects of the same type share the same value.
12
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
13
 * @property string $event_name The name of the meter event. Corresponds with the <code>event_name</code> field on a meter.
14
 * @property string $identifier A unique identifier for the event.
15
 * @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.
16
 * @property \Stripe\StripeObject $payload The payload of the event. This contains the fields corresponding to a meter's <code>customer_mapping.event_payload_key</code> (default is <code>stripe_customer_id</code>) and <code>value_settings.event_payload_key</code> (default is <code>value</code>). Read more about the <a href="https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides">payload</a>.
17
 * @property int $timestamp The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
18
 */
19
class MeterEvent extends \Stripe\ApiResource
20
{
21
    const OBJECT_NAME = 'billing.meter_event';
22

23
    /**
24
     * Creates a billing meter event.
25
     *
26
     * @param null|array $params
27
     * @param null|array|string $options
28
     *
29
     * @throws \Stripe\Exception\ApiErrorException if the request fails
30
     *
31
     * @return \Stripe\Billing\MeterEvent the created resource
32
     */
NEW
33
    public static function create($params = null, $options = null)
×
34
    {
NEW
35
        self::_validateParams($params);
×
NEW
36
        $url = static::classUrl();
×
37

NEW
38
        list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
×
NEW
39
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
NEW
40
        $obj->setLastResponse($response);
×
41

NEW
42
        return $obj;
×
43
    }
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc