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

stripe / stripe-php / 9308609267

30 May 2024 08:13PM UTC coverage: 60.343% (-1.0%) from 61.377%
9308609267

push

github

web-flow
Merge pull request #1699 from stripe/latest-codegen-beta

Update generated code for beta

1080 of 1830 new or added lines in 117 files covered. (59.02%)

15 existing lines in 3 files now uncovered.

3486 of 5777 relevant lines covered (60.34%)

2.19 hits per line

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

0.0
/lib/Climate/Product.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Climate;
6

7
/**
8
 * A Climate product represents a type of carbon removal unit available for reservation.
9
 * You can retrieve it to see the current price and availability.
10
 *
11
 * @property string $id Unique identifier for the object. For convenience, Climate product IDs are human-readable strings that start with <code>climsku_</code>. See <a href="https://stripe.com/docs/climate/orders/carbon-removal-inventory">carbon removal inventory</a> for a list of available carbon removal products.
12
 * @property string $object String representing the object's type. Objects of the same type share the same value.
13
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
14
 * @property \Stripe\StripeObject $current_prices_per_metric_ton Current prices for a metric ton of carbon removal in a currency's smallest unit.
15
 * @property null|int $delivery_year The year in which the carbon removal is expected to be delivered.
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 string $metric_tons_available The quantity of metric tons available for reservation.
18
 * @property string $name The Climate product's name.
19
 * @property \Stripe\Climate\Supplier[] $suppliers The carbon removal suppliers that fulfill orders for this Climate product.
20
 */
21
class Product extends \Stripe\ApiResource
22
{
23
    const OBJECT_NAME = 'climate.product';
24

25
    /**
26
     * Lists all available Climate product objects.
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\Climate\Product> of ApiResources
34
     */
NEW
35
    public static function all($params = null, $opts = null)
×
36
    {
NEW
37
        $url = static::classUrl();
×
38

NEW
39
        return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
×
40
    }
41

42
    /**
43
     * Retrieves the details of a Climate product with the given ID.
44
     *
45
     * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
46
     * @param null|array|string $opts
47
     *
48
     * @throws \Stripe\Exception\ApiErrorException if the request fails
49
     *
50
     * @return \Stripe\Climate\Product
51
     */
NEW
52
    public static function retrieve($id, $opts = null)
×
53
    {
NEW
54
        $opts = \Stripe\Util\RequestOptions::parse($opts);
×
NEW
55
        $instance = new static($id, $opts);
×
NEW
56
        $instance->refresh();
×
57

NEW
58
        return $instance;
×
59
    }
60
}
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