Supplier.php
62 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | |
| 5 | namespace AmeliaVendor\Stripe\Climate; |
| 6 | |
| 7 | /** |
| 8 | * A supplier of carbon removal. |
| 9 | * |
| 10 | * @property string $id Unique identifier for the object. |
| 11 | * @property string $object String representing the object’s type. Objects of the same type share the same value. |
| 12 | * @property string $info_url Link to a webpage to learn more about the supplier. |
| 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 ((object{city: null|string, country: string, latitude: null|float, longitude: null|float, region: null|string}&\AmeliaVendor\Stripe\StripeObject))[] $locations The locations in which this supplier operates. |
| 15 | * @property string $name Name of this carbon removal supplier. |
| 16 | * @property string $removal_pathway The scientific pathway used for carbon removal. |
| 17 | */ |
| 18 | class Supplier extends \AmeliaVendor\Stripe\ApiResource |
| 19 | { |
| 20 | const OBJECT_NAME = 'climate.supplier'; |
| 21 | |
| 22 | const REMOVAL_PATHWAY_BIOMASS_CARBON_REMOVAL_AND_STORAGE = 'biomass_carbon_removal_and_storage'; |
| 23 | const REMOVAL_PATHWAY_DIRECT_AIR_CAPTURE = 'direct_air_capture'; |
| 24 | const REMOVAL_PATHWAY_ENHANCED_WEATHERING = 'enhanced_weathering'; |
| 25 | |
| 26 | /** |
| 27 | * Lists all available Climate supplier objects. |
| 28 | * |
| 29 | * @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params |
| 30 | * @param null|array|string $opts |
| 31 | * |
| 32 | * @return \AmeliaVendor\Stripe\Collection<Supplier> of ApiResources |
| 33 | * |
| 34 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 35 | */ |
| 36 | public static function all($params = null, $opts = null) |
| 37 | { |
| 38 | $url = static::classUrl(); |
| 39 | |
| 40 | return static::_requestPage($url, \AmeliaVendor\Stripe\Collection::class, $params, $opts); |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Retrieves a Climate supplier object. |
| 45 | * |
| 46 | * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key |
| 47 | * @param null|array|string $opts |
| 48 | * |
| 49 | * @return Supplier |
| 50 | * |
| 51 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 52 | */ |
| 53 | public static function retrieve($id, $opts = null) |
| 54 | { |
| 55 | $opts = \AmeliaVendor\Stripe\Util\RequestOptions::parse($opts); |
| 56 | $instance = new static($id, $opts); |
| 57 | $instance->refresh(); |
| 58 | |
| 59 | return $instance; |
| 60 | } |
| 61 | } |
| 62 |