PayPalApiCost

Class Cost.

Defined (1)

The class is defined in the following location(s).

/classes/lib/PayPal/Api/Cost.php  
  1. class Cost extends PayPalModel 
  2. /** 
  3. * Cost in percent. Range of 0 to 100. 
  4. * @param string $percent 
  5. *  
  6. * @return $this 
  7. */ 
  8. public function setPercent($percent) 
  9. NumericValidator::validate($percent, "Percent"); 
  10. $percent = FormatConverter::formatToNumber($percent); 
  11. $this->percent = $percent; 
  12. return $this; 
  13.  
  14. /** 
  15. * Cost in percent. Range of 0 to 100. 
  16. * @return string 
  17. */ 
  18. public function getPercent() 
  19. return $this->percent; 
  20.  
  21. /** 
  22. * Cost in amount. Range of 0 to 999999.99. 
  23. * @param \PayPal\Api\Currency $amount 
  24. *  
  25. * @return $this 
  26. */ 
  27. public function setAmount($amount) 
  28. $this->amount = $amount; 
  29. return $this; 
  30.  
  31. /** 
  32. * Cost in amount. Range of 0 to 999999.99. 
  33. * @return \PayPal\Api\Currency 
  34. */ 
  35. public function getAmount() 
  36. return $this->amount; 
  37.