composer package updates
[openemr.git] / vendor / stripe / stripe-php / lib / BitcoinReceiver.php
blobb4cc5291b5623ffa7c252d39f508a45ce91deb15
1 <?php
3 namespace Stripe;
5 /**
6 * Class BitcoinReceiver
8 * @package Stripe
10 * @deprecated Bitcoin receivers are deprecated. Please use the sources API instead.
11 * @link https://stripe.com/docs/sources/bitcoin
13 class BitcoinReceiver extends ApiResource
16 const OBJECT_NAME = "bitcoin_receiver";
18 use ApiOperations\All;
19 use ApiOperations\Retrieve;
21 /**
22 * @return string The class URL for this resource. It needs to be special
23 * cased because it doesn't fit into the standard resource pattern.
25 public static function classUrl()
27 return "/v1/bitcoin/receivers";
30 /**
31 * @return string The instance URL for this resource. It needs to be special
32 * cased because it doesn't fit into the standard resource pattern.
34 public function instanceUrl()
36 if ($this['customer']) {
37 $base = Customer::classUrl();
38 $parent = $this['customer'];
39 $path = 'sources';
40 $parentExtn = urlencode(Util\Util::utf8($parent));
41 $extn = urlencode(Util\Util::utf8($this['id']));
42 return "$base/$parentExtn/$path/$extn";
43 } else {
44 $base = BitcoinReceiver::classUrl();
45 $extn = urlencode(Util\Util::utf8($this['id']));
46 return "$base/$extn";