resq/src/Ramcar/LegacyTransactionType.php

37 lines
856 B
PHP

<?php
namespace App\Ramcar;
class LegacyTransactionType extends NameValue
{
const PURCHASE = 'purchase';
const POST_SERVICE = 'post';
const RESQ_SERVICE = 'resq';
const SERVICE = 'service';
const COLLECTION = [
'purchase' => 'Purchase',
'post' => 'Post Service',
'resq' => 'Res-q Service',
'service' => 'Service',
];
public static function translate($type)
{
$clean_type = strtolower(trim($type));
switch ($clean_type)
{
case 'post service':
return self::POST_SERVICE;
case 'purchase':
return self::PURCHASE;
case 'res-q services':
return self::RESQ_SERVICE;
case 'service':
return self::SERVICE;
}
return false;
}
}