Recipient.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace Stripe;
  3. /**
  4. * Class Recipient
  5. *
  6. * @package Stripe
  7. *
  8. * @property string $id
  9. * @property string $object
  10. * @property mixed $active_account
  11. * @property Collection $cards
  12. * @property int $created
  13. * @property string $default_card
  14. * @property string $description
  15. * @property string $email
  16. * @property bool $livemode
  17. * @property StripeObject $metadata
  18. * @property string $migrated_to
  19. * @property string $name
  20. * @property string $rolled_back_from
  21. * @property string $type
  22. */
  23. class Recipient extends ApiResource
  24. {
  25. const OBJECT_NAME = "recipient";
  26. use ApiOperations\All;
  27. use ApiOperations\Create;
  28. use ApiOperations\Delete;
  29. use ApiOperations\Retrieve;
  30. use ApiOperations\Update;
  31. /**
  32. * @param array|null $params
  33. *
  34. * @return Collection of the Recipient's Transfers
  35. */
  36. public function transfers($params = null)
  37. {
  38. $params = $params ?: [];
  39. $params['recipient'] = $this->id;
  40. $transfers = Transfer::all($params, $this->_opts);
  41. return $transfers;
  42. }
  43. }