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

stripe / stripe-php / 9276393583

28 May 2024 09:10PM UTC coverage: 65.291% (-0.8%) from 66.119%
9276393583

Pull #1702

github

web-flow
Merge 8a5208ad2 into 7038876e7
Pull Request #1702: Update generated code

1026 of 1594 new or added lines in 106 files covered. (64.37%)

15 existing lines in 3 files now uncovered.

3386 of 5186 relevant lines covered (65.29%)

2.26 hits per line

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

0.0
/lib/BillingPortal/Configuration.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\BillingPortal;
6

7
/**
8
 * A portal configuration describes the functionality and behavior of a portal session.
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 bool $active Whether the configuration is active and can be used to create portal sessions.
13
 * @property null|string|\Stripe\Application $application ID of the Connect Application that created the configuration.
14
 * @property \Stripe\StripeObject $business_profile
15
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
16
 * @property null|string $default_return_url The default URL to redirect customers to when they click on the portal's link to return to your website. This can be <a href="https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url">overriden</a> when creating the session.
17
 * @property \Stripe\StripeObject $features
18
 * @property bool $is_default Whether the configuration is the default. If <code>true</code>, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
19
 * @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.
20
 * @property \Stripe\StripeObject $login_page
21
 * @property null|\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.
22
 * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
23
 */
24
class Configuration extends \Stripe\ApiResource
25
{
26
    const OBJECT_NAME = 'billing_portal.configuration';
27

28
    use \Stripe\ApiOperations\Update;
29

30
    /**
31
     * Creates a configuration that describes the functionality and behavior of a
32
     * PortalSession.
33
     *
34
     * @param null|mixed $params
35
     * @param null|mixed $options
36
     */
NEW
37
    public static function create($params = null, $options = null)
×
38
    {
NEW
39
        self::_validateParams($params);
×
NEW
40
        $url = static::classUrl();
×
NEW
41
        list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
×
NEW
42
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
NEW
43
        $obj->setLastResponse($response);
×
44

NEW
45
        return $obj;
×
46
    }
47

48
    /**
49
     * Returns a list of configurations that describe the functionality of the customer
50
     * portal.
51
     *
52
     * @param null|mixed $params
53
     * @param null|mixed $opts
54
     */
NEW
55
    public static function all($params = null, $opts = null)
×
56
    {
NEW
57
        return static::_requestPage('/v1/billing_portal/configurations', \Stripe\Collection::class, $params, $opts);
×
58
    }
59

60
    /**
61
     * Retrieves a configuration that describes the functionality of the customer
62
     * portal.
63
     *
64
     * @param mixed $id
65
     * @param null|mixed $opts
66
     */
NEW
67
    public static function retrieve($id, $opts = null)
×
68
    {
NEW
69
        $opts = \Stripe\Util\RequestOptions::parse($opts);
×
NEW
70
        $instance = new static($id, $opts);
×
NEW
71
        $instance->refresh();
×
72

NEW
73
        return $instance;
×
74
    }
75

76
    /**
77
     * Updates a configuration that describes the functionality of the customer portal.
78
     *
79
     * @param mixed $id
80
     * @param null|mixed $params
81
     * @param null|mixed $opts
82
     */
NEW
83
    public static function update($id, $params = null, $opts = null)
×
84
    {
NEW
85
        self::_validateParams($params);
×
NEW
86
        $url = static::resourceUrl($id);
×
NEW
87
        list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
×
NEW
88
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
NEW
89
        $obj->setLastResponse($response);
×
90

NEW
91
        return $obj;
×
92
    }
93
}
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

© 2024 Coveralls, Inc