PayPalApiDetails

Class Details.

Defined (1)

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

/classes/lib/PayPal/Api/Details.php  
  1. class Details extends PayPalModel 
  2. /** 
  3. * Amount of the subtotal of the items. **Required** if line items are specified. 10 characters max, with support for 2 decimal places. 
  4. * @param string|double $subtotal 
  5. * @return $this 
  6. */ 
  7. public function setSubtotal($subtotal) 
  8. NumericValidator::validate($subtotal, "Subtotal"); 
  9. $subtotal = FormatConverter::formatToPrice($subtotal); 
  10. $this->subtotal = $subtotal; 
  11. return $this; 
  12.  
  13. /** 
  14. * Amount of the subtotal of the items. **Required** if line items are specified. 10 characters max, with support for 2 decimal places. 
  15. * @return string 
  16. */ 
  17. public function getSubtotal() 
  18. return $this->subtotal; 
  19.  
  20. /** 
  21. * Amount charged for shipping. 10 characters max with support for 2 decimal places. 
  22. * @param string|double $shipping 
  23. * @return $this 
  24. */ 
  25. public function setShipping($shipping) 
  26. NumericValidator::validate($shipping, "Shipping"); 
  27. $shipping = FormatConverter::formatToPrice($shipping); 
  28. $this->shipping = $shipping; 
  29. return $this; 
  30.  
  31. /** 
  32. * Amount charged for shipping. 10 characters max with support for 2 decimal places. 
  33. * @return string 
  34. */ 
  35. public function getShipping() 
  36. return $this->shipping; 
  37.  
  38. /** 
  39. * Amount charged for tax. 10 characters max with support for 2 decimal places. 
  40. * @param string|double $tax 
  41. * @return $this 
  42. */ 
  43. public function setTax($tax) 
  44. NumericValidator::validate($tax, "Tax"); 
  45. $tax = FormatConverter::formatToPrice($tax); 
  46. $this->tax = $tax; 
  47. return $this; 
  48.  
  49. /** 
  50. * Amount charged for tax. 10 characters max with support for 2 decimal places. 
  51. * @return string 
  52. */ 
  53. public function getTax() 
  54. return $this->tax; 
  55.  
  56. /** 
  57. * Amount being charged for the handling fee. Only supported when the `payment_method` is set to `paypal`. 
  58. * @param string|double $handling_fee 
  59. * @return $this 
  60. */ 
  61. public function setHandlingFee($handling_fee) 
  62. NumericValidator::validate($handling_fee, "Handling Fee"); 
  63. $handling_fee = FormatConverter::formatToPrice($handling_fee); 
  64. $this->handling_fee = $handling_fee; 
  65. return $this; 
  66.  
  67. /** 
  68. * Amount being charged for the handling fee. Only supported when the `payment_method` is set to `paypal`. 
  69. * @return string 
  70. */ 
  71. public function getHandlingFee() 
  72. return $this->handling_fee; 
  73.  
  74. /** 
  75. * Amount being discounted for the shipping fee. Only supported when the `payment_method` is set to `paypal`. 
  76. * @param string|double $shipping_discount 
  77. * @return $this 
  78. */ 
  79. public function setShippingDiscount($shipping_discount) 
  80. NumericValidator::validate($shipping_discount, "Shipping Discount"); 
  81. $shipping_discount = FormatConverter::formatToPrice($shipping_discount); 
  82. $this->shipping_discount = $shipping_discount; 
  83. return $this; 
  84.  
  85. /** 
  86. * Amount being discounted for the shipping fee. Only supported when the `payment_method` is set to `paypal`. 
  87. * @return string 
  88. */ 
  89. public function getShippingDiscount() 
  90. return $this->shipping_discount; 
  91.  
  92. /** 
  93. * Amount being charged for the insurance fee. Only supported when the `payment_method` is set to `paypal`. 
  94. * @param string|double $insurance 
  95. * @return $this 
  96. */ 
  97. public function setInsurance($insurance) 
  98. NumericValidator::validate($insurance, "Insurance"); 
  99. $insurance = FormatConverter::formatToPrice($insurance); 
  100. $this->insurance = $insurance; 
  101. return $this; 
  102.  
  103. /** 
  104. * Amount being charged for the insurance fee. Only supported when the `payment_method` is set to `paypal`. 
  105. * @return string 
  106. */ 
  107. public function getInsurance() 
  108. return $this->insurance; 
  109.  
  110. /** 
  111. * Amount being charged as gift wrap fee. 
  112. * @param string|double $gift_wrap 
  113. * @return $this 
  114. */ 
  115. public function setGiftWrap($gift_wrap) 
  116. NumericValidator::validate($gift_wrap, "Gift Wrap"); 
  117. $gift_wrap = FormatConverter::formatToPrice($gift_wrap); 
  118. $this->gift_wrap = $gift_wrap; 
  119. return $this; 
  120.  
  121. /** 
  122. * Amount being charged as gift wrap fee. 
  123. * @return string 
  124. */ 
  125. public function getGiftWrap() 
  126. return $this->gift_wrap; 
  127.  
  128. /** 
  129. * Fee charged by PayPal. In case of a refund, this is the fee amount refunded to the original receipient of the payment. 
  130. * @param string|double $fee 
  131. * @return $this 
  132. */ 
  133. public function setFee($fee) 
  134. NumericValidator::validate($fee, "Fee"); 
  135. $fee = FormatConverter::formatToPrice($fee); 
  136. $this->fee = $fee; 
  137. return $this; 
  138.  
  139. /** 
  140. * Fee charged by PayPal. In case of a refund, this is the fee amount refunded to the original receipient of the payment. 
  141. * @return string 
  142. */ 
  143. public function getFee() 
  144. return $this->fee; 
  145.