TransactionLineItem.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace Braintree;
  3. use Braintree\Instance;
  4. /**
  5. * Line item associated with a transaction
  6. *
  7. * @package Braintree
  8. */
  9. /**
  10. * creates an instance of TransactionLineItem
  11. *
  12. *
  13. * @package Braintree
  14. *
  15. * @property-read string $commodityCode
  16. * @property-read string $description
  17. * @property-read string $discountAmount
  18. * @property-read string $kind
  19. * @property-read string $name
  20. * @property-read string $productCode
  21. * @property-read string $quantity
  22. * @property-read string $taxAmount
  23. * @property-read string $totalAmount
  24. * @property-read string $unitAmount
  25. * @property-read string $unitOfMeasure
  26. * @property-read string $unitTaxAmount
  27. * @property-read string $url
  28. */
  29. class TransactionLineItem extends Instance
  30. {
  31. // TransactionLineItem Kinds
  32. const CREDIT = 'credit';
  33. const DEBIT = 'debit';
  34. protected $_attributes = [];
  35. /**
  36. * @ignore
  37. */
  38. public function __construct($attributes)
  39. {
  40. parent::__construct($attributes);
  41. }
  42. public static function findAll($transactionId)
  43. {
  44. return Configuration::gateway()->transactionLineItem()->findAll($transactionId);
  45. }
  46. }
  47. class_alias('Braintree\TransactionLineItem', 'Braintree_TransactionLineItem');