BitcoinReceiver.php 4.1 KB

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