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

stripe / stripe-php / 7050356852

30 Nov 2023 05:54PM UTC coverage: 69.002% (-0.5%) from 69.503%
7050356852

push

github

web-flow
Update generated code (#1611)

* Update generated code for v681

* Update generated code for v682

* Update generated code for v684

* Update generated code for v685

* Update generated code for v686

* Update generated code for v689

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>

0 of 25 new or added lines in 5 files covered. (0.0%)

2393 of 3468 relevant lines covered (69.0%)

3.49 hits per line

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

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

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Climate;
6

7
/**
8
 * Orders represent your intent to purchase a particular Climate product. When you create an order, the
9
 * payment is deducted from your merchant balance.
10
 *
11
 * @property string $id Unique identifier for the object.
12
 * @property string $object String representing the object's type. Objects of the same type share the same value.
13
 * @property int $amount_fees Total amount of <a href="https://frontierclimate.com/">Frontier</a>'s service fees in the currency's smallest unit.
14
 * @property int $amount_subtotal Total amount of the carbon removal in the currency's smallest unit.
15
 * @property int $amount_total Total amount of the order including fees in the currency's smallest unit.
16
 * @property null|\Stripe\StripeObject $beneficiary
17
 * @property null|int $canceled_at Time at which the order was canceled. Measured in seconds since the Unix epoch.
18
 * @property null|string $cancellation_reason Reason for the cancellation of this order.
19
 * @property null|string $certificate For delivered orders, a URL to a delivery certificate for the order.
20
 * @property null|int $confirmed_at Time at which the order was confirmed. Measured in seconds since the Unix epoch.
21
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
22
 * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase, representing the currency for this order.
23
 * @property null|int $delayed_at Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.
24
 * @property null|int $delivered_at Time at which the order was delivered. Measured in seconds since the Unix epoch.
25
 * @property \Stripe\StripeObject[] $delivery_details Details about the delivery of carbon removal for this order.
26
 * @property int $expected_delivery_year The year this order is expected to be delivered.
27
 * @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.
28
 * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
29
 * @property string $metric_tons Quantity of carbon removal that is included in this order.
30
 * @property string|\Stripe\Climate\Product $product Unique ID for the Climate <code>Product</code> this order is purchasing.
31
 * @property null|int $product_substituted_at Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.
32
 * @property string $status The current status of this order.
33
 */
34
class Order extends \Stripe\ApiResource
35
{
36
    const OBJECT_NAME = 'climate.order';
37

38
    use \Stripe\ApiOperations\All;
39
    use \Stripe\ApiOperations\Create;
40
    use \Stripe\ApiOperations\Retrieve;
41
    use \Stripe\ApiOperations\Update;
42

43
    const CANCELLATION_REASON_EXPIRED = 'expired';
44
    const CANCELLATION_REASON_PRODUCT_UNAVAILABLE = 'product_unavailable';
45
    const CANCELLATION_REASON_REQUESTED = 'requested';
46

47
    const STATUS_AWAITING_FUNDS = 'awaiting_funds';
48
    const STATUS_CANCELED = 'canceled';
49
    const STATUS_CONFIRMED = 'confirmed';
50
    const STATUS_DELIVERED = 'delivered';
51
    const STATUS_OPEN = 'open';
52

53
    /**
54
     * @param null|array $params
55
     * @param null|array|string $opts
56
     *
57
     * @throws \Stripe\Exception\ApiErrorException if the request fails
58
     *
59
     * @return \Stripe\Climate\Order the canceled order
60
     */
NEW
61
    public function cancel($params = null, $opts = null)
×
62
    {
NEW
63
        $url = $this->instanceUrl() . '/cancel';
×
NEW
64
        list($response, $opts) = $this->_request('post', $url, $params, $opts);
×
NEW
65
        $this->refreshFrom($response, $opts);
×
66

NEW
67
        return $this;
×
68
    }
69
}
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