From cc132288f8edf7d92b6cb34f1ab4715f196b8810 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Tue, 3 Apr 2018 11:31:11 +0800 Subject: [PATCH] Add trade-in categories #66 --- src/Ramcar/TradeInType.php | 8 +++++--- src/Service/InvoiceCreator.php | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Ramcar/TradeInType.php b/src/Ramcar/TradeInType.php index eeb559fa..fa830be0 100644 --- a/src/Ramcar/TradeInType.php +++ b/src/Ramcar/TradeInType.php @@ -4,11 +4,13 @@ namespace App\Ramcar; class TradeInType extends NameValue { - const MOTOLITE = 'motolite'; - const OTHER = 'other'; + const PREMIUM = 'premium'; + const MOTOLITE = 'motolite'; + const OTHER = 'other'; const COLLECTION = [ - 'motolite' => 'Motolite', + 'premium' => 'Premium', + 'motolite' => 'Non-premium', 'other' => 'Other', ]; } diff --git a/src/Service/InvoiceCreator.php b/src/Service/InvoiceCreator.php index 89504d31..aea1d63f 100644 --- a/src/Service/InvoiceCreator.php +++ b/src/Service/InvoiceCreator.php @@ -37,6 +37,7 @@ class InvoiceCreator public function getTradeInRate($trade_in) { + // TODO: modify this with the prices based on size if ($trade_in == 'motolite') return self::TIRATE_MOTOLITE;