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

stripe / stripe-php / 11409488101

18 Oct 2024 07:03PM UTC coverage: 58.28%. Remained the same
11409488101

push

github

xavdid-stripe
Bump version to 16.2.0-beta.3

3558 of 6105 relevant lines covered (58.28%)

2.29 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 guide: <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 $amazon_pay Indicates the status of a specific payment method on a payment method domain.
16
 * @property \Stripe\StripeObject $apple_pay Indicates the status of a specific payment method on a payment method domain.
17
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
18
 * @property string $domain_name The domain name that this payment method domain object represents.
19
 * @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.
20
 * @property \Stripe\StripeObject $google_pay Indicates the status of a specific payment method on a payment method domain.
21
 * @property \Stripe\StripeObject $link Indicates the status of a specific payment method on a payment method domain.
22
 * @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.
23
 * @property \Stripe\StripeObject $paypal Indicates the status of a specific payment method on a payment method domain.
24
 */
25
class PaymentMethodDomain extends ApiResource
26
{
27
    const OBJECT_NAME = 'payment_method_domain';
28

29
    use ApiOperations\Update;
30

31
    /**
32
     * Creates a payment method domain.
33
     *
34
     * @param null|array $params
35
     * @param null|array|string $options
36
     *
37
     * @throws \Stripe\Exception\ApiErrorException if the request fails
38
     *
39
     * @return \Stripe\PaymentMethodDomain the created resource
40
     */
41
    public static function create($params = null, $options = null)
×
42
    {
43
        self::_validateParams($params);
×
44
        $url = static::classUrl();
×
45

46
        list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
×
47
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
48
        $obj->setLastResponse($response);
×
49

50
        return $obj;
×
51
    }
52

53
    /**
54
     * Lists the details of existing payment method domains.
55
     *
56
     * @param null|array $params
57
     * @param null|array|string $opts
58
     *
59
     * @throws \Stripe\Exception\ApiErrorException if the request fails
60
     *
61
     * @return \Stripe\Collection<\Stripe\PaymentMethodDomain> of ApiResources
62
     */
63
    public static function all($params = null, $opts = null)
×
64
    {
65
        $url = static::classUrl();
×
66

67
        return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
×
68
    }
69

70
    /**
71
     * Retrieves the details of an existing payment method domain.
72
     *
73
     * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
74
     * @param null|array|string $opts
75
     *
76
     * @throws \Stripe\Exception\ApiErrorException if the request fails
77
     *
78
     * @return \Stripe\PaymentMethodDomain
79
     */
80
    public static function retrieve($id, $opts = null)
×
81
    {
82
        $opts = \Stripe\Util\RequestOptions::parse($opts);
×
83
        $instance = new static($id, $opts);
×
84
        $instance->refresh();
×
85

86
        return $instance;
×
87
    }
88

89
    /**
90
     * Updates an existing payment method domain.
91
     *
92
     * @param string $id the ID of the resource to update
93
     * @param null|array $params
94
     * @param null|array|string $opts
95
     *
96
     * @throws \Stripe\Exception\ApiErrorException if the request fails
97
     *
98
     * @return \Stripe\PaymentMethodDomain the updated resource
99
     */
100
    public static function update($id, $params = null, $opts = null)
×
101
    {
102
        self::_validateParams($params);
×
103
        $url = static::resourceUrl($id);
×
104

105
        list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
×
106
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
107
        $obj->setLastResponse($response);
×
108

109
        return $obj;
×
110
    }
111

112
    /**
113
     * @param null|array $params
114
     * @param null|array|string $opts
115
     *
116
     * @throws \Stripe\Exception\ApiErrorException if the request fails
117
     *
118
     * @return \Stripe\PaymentMethodDomain the validated payment method domain
119
     */
120
    public function validate($params = null, $opts = null)
×
121
    {
122
        $url = $this->instanceUrl() . '/validate';
×
123
        list($response, $opts) = $this->_request('post', $url, $params, $opts);
×
124
        $this->refreshFrom($response, $opts);
×
125

126
        return $this;
×
127
    }
128
}
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