| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | namespace Worldline\Connect\Sdk\V1\Domain; |
| 7: | |
| 8: | use UnexpectedValueException; |
| 9: | use Worldline\Connect\Sdk\Domain\DataObject; |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | class LineItemLevel3InterchangeInformation extends DataObject |
| 15: | { |
| 16: | |
| 17: | |
| 18: | |
| 19: | public $discountAmount = null; |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | public $lineAmountTotal = null; |
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | public $productCode = null; |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | public $productPrice = null; |
| 35: | |
| 36: | |
| 37: | |
| 38: | |
| 39: | public $productType = null; |
| 40: | |
| 41: | |
| 42: | |
| 43: | |
| 44: | public $quantity = null; |
| 45: | |
| 46: | |
| 47: | |
| 48: | |
| 49: | public $taxAmount = null; |
| 50: | |
| 51: | |
| 52: | |
| 53: | |
| 54: | public $unit = null; |
| 55: | |
| 56: | |
| 57: | |
| 58: | |
| 59: | public function toObject() |
| 60: | { |
| 61: | $object = parent::toObject(); |
| 62: | if (!is_null($this->discountAmount)) { |
| 63: | $object->discountAmount = $this->discountAmount; |
| 64: | } |
| 65: | if (!is_null($this->lineAmountTotal)) { |
| 66: | $object->lineAmountTotal = $this->lineAmountTotal; |
| 67: | } |
| 68: | if (!is_null($this->productCode)) { |
| 69: | $object->productCode = $this->productCode; |
| 70: | } |
| 71: | if (!is_null($this->productPrice)) { |
| 72: | $object->productPrice = $this->productPrice; |
| 73: | } |
| 74: | if (!is_null($this->productType)) { |
| 75: | $object->productType = $this->productType; |
| 76: | } |
| 77: | if (!is_null($this->quantity)) { |
| 78: | $object->quantity = $this->quantity; |
| 79: | } |
| 80: | if (!is_null($this->taxAmount)) { |
| 81: | $object->taxAmount = $this->taxAmount; |
| 82: | } |
| 83: | if (!is_null($this->unit)) { |
| 84: | $object->unit = $this->unit; |
| 85: | } |
| 86: | return $object; |
| 87: | } |
| 88: | |
| 89: | |
| 90: | |
| 91: | |
| 92: | |
| 93: | |
| 94: | public function fromObject($object) |
| 95: | { |
| 96: | parent::fromObject($object); |
| 97: | if (property_exists($object, 'discountAmount')) { |
| 98: | $this->discountAmount = $object->discountAmount; |
| 99: | } |
| 100: | if (property_exists($object, 'lineAmountTotal')) { |
| 101: | $this->lineAmountTotal = $object->lineAmountTotal; |
| 102: | } |
| 103: | if (property_exists($object, 'productCode')) { |
| 104: | $this->productCode = $object->productCode; |
| 105: | } |
| 106: | if (property_exists($object, 'productPrice')) { |
| 107: | $this->productPrice = $object->productPrice; |
| 108: | } |
| 109: | if (property_exists($object, 'productType')) { |
| 110: | $this->productType = $object->productType; |
| 111: | } |
| 112: | if (property_exists($object, 'quantity')) { |
| 113: | $this->quantity = $object->quantity; |
| 114: | } |
| 115: | if (property_exists($object, 'taxAmount')) { |
| 116: | $this->taxAmount = $object->taxAmount; |
| 117: | } |
| 118: | if (property_exists($object, 'unit')) { |
| 119: | $this->unit = $object->unit; |
| 120: | } |
| 121: | return $this; |
| 122: | } |
| 123: | } |
| 124: | |