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

stripe / stripe-php / 9287722801

29 May 2024 02:13PM UTC coverage: 65.291% (-0.8%) from 66.119%
9287722801

Pull #1702

github

web-flow
Merge 94af76f66 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/PaymentMethodDomain.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe;
6

7
/**
8
 * A payment method domain represents a web domain that you have registered with Stripe.
9
 * Stripe Elements use registered payment method domains to control where certain payment methods are shown.
10
 *
11
 * Related guides: <a href="https://stripe.com/docs/payments/payment-methods/pmd-registration">Payment method domains</a>.
12
 *
13
 * @property string $id Unique identifier for the object.
14
 * @property string $object String representing the object's type. Objects of the same type share the same value.
15
 * @property \Stripe\StripeObject $apple_pay Indicates the status of a specific payment method on a payment method domain.
16
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
17
 * @property string $domain_name The domain name that this payment method domain object represents.
18
 * @property bool $enabled Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
19
 * @property \Stripe\StripeObject $google_pay Indicates the status of a specific payment method on a payment method domain.
20
 * @property \Stripe\StripeObject $link Indicates the status of a specific payment method on a payment method domain.
21
 * @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.
22
 * @property \Stripe\StripeObject $paypal Indicates the status of a specific payment method on a payment method domain.
23
 */
24
class PaymentMethodDomain extends ApiResource
25
{
26
    const OBJECT_NAME = 'payment_method_domain';
27

28
    use ApiOperations\Update;
29

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

NEW
44
        return $obj;
×
45
    }
46

47
    /**
48
     * Lists the details of existing payment method domains.
49
     *
50
     * @param null|mixed $params
51
     * @param null|mixed $opts
52
     */
NEW
53
    public static function all($params = null, $opts = null)
×
54
    {
NEW
55
        return static::_requestPage('/v1/payment_method_domains', \Stripe\Collection::class, $params, $opts);
×
56
    }
57

58
    /**
59
     * Retrieves the details of an existing payment method domain.
60
     *
61
     * @param mixed $id
62
     * @param null|mixed $opts
63
     */
NEW
64
    public static function retrieve($id, $opts = null)
×
65
    {
NEW
66
        $opts = \Stripe\Util\RequestOptions::parse($opts);
×
NEW
67
        $instance = new static($id, $opts);
×
NEW
68
        $instance->refresh();
×
69

NEW
70
        return $instance;
×
71
    }
72

73
    /**
74
     * Updates an existing payment method domain.
75
     *
76
     * @param mixed $id
77
     * @param null|mixed $params
78
     * @param null|mixed $opts
79
     */
NEW
80
    public static function update($id, $params = null, $opts = null)
×
81
    {
NEW
82
        self::_validateParams($params);
×
NEW
83
        $url = static::resourceUrl($id);
×
NEW
84
        list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
×
NEW
85
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
NEW
86
        $obj->setLastResponse($response);
×
87

NEW
88
        return $obj;
×
89
    }
90

91
    /**
92
     * @param null|array $params
93
     * @param null|array|string $opts
94
     *
95
     * @throws \Stripe\Exception\ApiErrorException if the request fails
96
     *
97
     * @return \Stripe\PaymentMethodDomain the validated payment method domain
98
     */
99
    public function validate($params = null, $opts = null)
×
100
    {
101
        $url = $this->instanceUrl() . '/validate';
×
102
        list($response, $opts) = $this->_request('post', $url, $params, $opts);
×
103
        $this->refreshFrom($response, $opts);
×
104

105
        return $this;
×
106
    }
107
}
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