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

stripe / stripe-php / #7087

pending completion
#7087

push

php-coveralls

pakrym-stripe
Bump version to 10.14.0-beta.2

1831 of 2732 relevant lines covered (67.02%)

3.81 hits per line

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

0.0
/lib/CashBalance.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe;
6

7
/**
8
 * A customer's <code>Cash balance</code> represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
9
 *
10
 * @property string $object String representing the object's type. Objects of the same type share the same value.
11
 * @property null|\Stripe\StripeObject $available A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
12
 * @property string $customer The ID of the customer whose cash balance this object represents.
13
 * @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.
14
 * @property \Stripe\StripeObject $settings
15
 */
16
class CashBalance extends ApiResource
17
{
18
    const OBJECT_NAME = 'cash_balance';
19

20
    /**
21
     * @return string the API URL for this balance transaction
22
     */
23
    public function instanceUrl()
24
    {
25
        $customer = $this['customer'];
×
26
        $customer = Util\Util::utf8($customer);
×
27

28
        $base = Customer::classUrl();
×
29
        $customerExtn = \urlencode($customer);
×
30

31
        return "{$base}/{$customerExtn}/cash_balance";
×
32
    }
33

34
    /**
35
     * @param array|string $_id
36
     * @param null|array|string $_opts
37
     *
38
     * @throws \Stripe\Exception\BadMethodCallException
39
     */
40
    public static function retrieve($_id, $_opts = null)
41
    {
42
        $msg = 'Customer Cash Balance cannot be retrieved without a ' .
×
43
               'customer ID. Retrieve a Customer Cash Balance using ' .
×
44
               "`Customer::retrieveCashBalance('customer_id')`.";
×
45

46
        throw new Exception\BadMethodCallException($msg);
×
47
    }
48

49
    /**
50
     * @param string $_id
51
     * @param null|array $_params
52
     * @param null|array|string $_options
53
     *
54
     * @throws \Stripe\Exception\BadMethodCallException
55
     */
56
    public static function update($_id, $_params = null, $_options = null)
57
    {
58
        $msg = 'Customer Cash Balance cannot be updated without a ' .
×
59
        'customer ID. Retrieve a Customer Cash Balance using ' .
×
60
        "`Customer::updateCashBalance('customer_id')`.";
×
61

62
        throw new Exception\BadMethodCallException($msg);
×
63
    }
64
}
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