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

stripe / stripe-php / 6486516262

11 Oct 2023 06:25PM UTC coverage: 64.361% (-1.8%) from 66.134%
6486516262

push

github

web-flow
Merge pull request #1588 from stripe/latest-codegen-beta

Update generated code for beta

40 of 40 new or added lines in 3 files covered. (100.0%)

2429 of 3774 relevant lines covered (64.36%)

3.32 hits per line

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

0.0
/lib/Exception/InvalidRequestException.php
1
<?php
2

3
namespace Stripe\Exception;
4

5
/**
6
 * InvalidRequestException is thrown when a request is initiated with invalid
7
 * parameters.
8
 */
9
class InvalidRequestException extends ApiErrorException
10
{
11
    protected $stripeParam;
12

13
    /**
14
     * Creates a new InvalidRequestException exception.
15
     *
16
     * @param string $message the exception message
17
     * @param null|int $httpStatus the HTTP status code
18
     * @param null|string $httpBody the HTTP body as a string
19
     * @param null|array $jsonBody the JSON deserialized body
20
     * @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array
21
     * @param null|string $stripeCode the Stripe error code
22
     * @param null|string $stripeParam the parameter related to the error
23
     *
24
     * @return InvalidRequestException
25
     */
26
    public static function factory(
×
27
        $message,
28
        $httpStatus = null,
29
        $httpBody = null,
30
        $jsonBody = null,
31
        $httpHeaders = null,
32
        $stripeCode = null,
33
        $stripeParam = null
34
    ) {
35
        $instance = parent::factory($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders, $stripeCode);
×
36
        $instance->setStripeParam($stripeParam);
×
37

38
        return $instance;
×
39
    }
40

41
    /**
42
     * Gets the parameter related to the error.
43
     *
44
     * @return null|string
45
     */
46
    public function getStripeParam()
×
47
    {
48
        return $this->stripeParam;
×
49
    }
50

51
    /**
52
     * Sets the parameter related to the error.
53
     *
54
     * @param null|string $stripeParam
55
     */
56
    public function setStripeParam($stripeParam)
×
57
    {
58
        $this->stripeParam = $stripeParam;
×
59
    }
60
}
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