Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
Adds customer object
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 21, 2016
1 parent 8b6fedd commit 03ea0dc
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions src/Customer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

namespace CraigPaul\Moneris;

/**
* CraigPaul\Moneris\Customer
*
* @property string|null $id
* @property string|null $email
* @property string|null $phone
* @property string|null $note
*/
class Customer
{
use Gettable;

/**
* The Customer ID.
*
* @var string
*/
protected $id;

/**
* The Customer email.
*
* @var string
*/
protected $email;

/**
* The Customer phone.
*
* @var string
*/
protected $phone;

/**
* The Customer note.
*
* @var string
*/
protected $note;

/**
* Create a new Customer instance.
*
* @param array $params
*
* @return void
*/
public function __construct(array $params = [])
{
$this->id = $params['id'] ?? null;
$this->email = $params['email'] ?? null;
$this->phone = $params['phone'] ?? null;
$this->note = $params['note'] ?? null;
}

/**
* Create a new Customer instance.
*
* @param array $params
*
* @return \CraigPaul\Moneris\Customer
*/
public static function create(array $params = [])
{
return new static($params);
}
}

0 comments on commit 03ea0dc

Please sign in to comment.