| 1 |
<?php |
| 2 |
|
| 3 |
// File generated from our OpenAPI spec |
| 4 |
|
| 5 |
namespace Stripe; |
| 6 |
|
| 7 |
/** |
| 8 |
* @deprecated Bitcoin receivers are deprecated. Please use the sources API instead. |
| 9 |
* @see https://stripe.com/docs/sources/bitcoin |
| 10 |
* |
| 11 |
* @property string $id Unique identifier for the object. |
| 12 |
* @property string $object String representing the object's type. Objects of the same type share the same value. |
| 13 |
* @property bool $active True when this bitcoin receiver has received a non-zero amount of bitcoin. |
| 14 |
* @property int $amount The amount of <code>currency</code> that you are collecting as payment. |
| 15 |
* @property int $amount_received The amount of <code>currency</code> to which <code>bitcoin_amount_received</code> has been converted. |
| 16 |
* @property int $bitcoin_amount The amount of bitcoin that the customer should send to fill the receiver. The <code>bitcoin_amount</code> is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. |
| 17 |
* @property int $bitcoin_amount_received The amount of bitcoin that has been sent by the customer to this receiver. |
| 18 |
* @property string $bitcoin_uri This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). |
| 19 |
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. |
| 20 |
* @property string $currency Three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> to which the bitcoin will be converted. |
| 21 |
* @property null|string $customer The customer ID of the bitcoin receiver. |
| 22 |
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. |
| 23 |
* @property null|string $email The customer's email address, set by the API call that creates the receiver. |
| 24 |
* @property bool $filled This flag is initially false and updates to true when the customer sends the <code>bitcoin_amount</code> to this receiver. |
| 25 |
* @property string $inbound_address A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. |
| 26 |
* @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. |
| 27 |
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
| 28 |
* @property null|string $payment The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. |
| 29 |
* @property null|string $refund_address The refund address of this bitcoin receiver. |
| 30 |
* @property \Stripe\Collection<\Stripe\BitcoinTransaction> $transactions A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. |
| 31 |
* @property bool $uncaptured_funds This receiver contains uncaptured funds that can be used for a payment or refunded. |
| 32 |
* @property null|bool $used_for_payment Indicate if this source is used for payment. |
| 33 |
*/ |
| 34 |
class BitcoinReceiver extends ApiResource |
| 35 |
{ |
| 36 |
const OBJECT_NAME = 'bitcoin_receiver'; |
| 37 |
|
| 38 |
use ApiOperations\All; |
| 39 |
use ApiOperations\Retrieve; |
| 40 |
|
| 41 |
/** |
| 42 |
* @return string The class URL for this resource. It needs to be special |
| 43 |
* cased because it doesn't fit into the standard resource pattern. |
| 44 |
*/ |
| 45 |
public static function classUrl() |
| 46 |
{ |
| 47 |
return '/v1/bitcoin/receivers'; |
| 48 |
} |
| 49 |
|
| 50 |
/** |
| 51 |
* @return string The instance URL for this resource. It needs to be special |
| 52 |
* cased because it doesn't fit into the standard resource pattern. |
| 53 |
*/ |
| 54 |
public function instanceUrl() |
| 55 |
{ |
| 56 |
if ($this['customer']) { |
| 57 |
$base = Customer::classUrl(); |
| 58 |
$parent = $this['customer']; |
| 59 |
$path = 'sources'; |
| 60 |
$parentExtn = \urlencode(Util\Util::utf8($parent)); |
| 61 |
$extn = \urlencode(Util\Util::utf8($this['id'])); |
| 62 |
|
| 63 |
return "{$base}/{$parentExtn}/{$path}/{$extn}"; |
| 64 |
} |
| 65 |
|
| 66 |
$base = BitcoinReceiver::classUrl(); |
| 67 |
$extn = \urlencode(Util\Util::utf8($this['id'])); |
| 68 |
|
| 69 |
return "{$base}/{$extn}"; |
| 70 |
} |
| 71 |
} |
| 72 |
|