Customer

Extends \Dotpay\Model\Payer

Informations about a bank acount of payer.

package

Default

Methods

Initialize the model.

__construct(string $email, string $firstName = '', string $lastName = '') 
inherited

Arguments

$email

string

Email address of the payer

$firstName

string

First name of the payer

$lastName

string

Last name of the payer

Create the model based on data provided from shop.

createFromData(\Dotpay\Provider\CustomerProviderInterface $provider) : \Dotpay\Model\Customer
static

Arguments

$provider

\Dotpay\Provider\CustomerProviderInterface

Provider which contains data from shop application

Response

\Dotpay\Model\Customer

Try to extract a building number from the street name if it's an empty field.

extractBnFromStreet() 

Return a building number of the customer.

getBuildingNumber() : string

Response

string

Return a city of the customer.

getCity() : string

Response

string

Return a country of the customer.

getCountry() : string

Response

string

Return an email address of the payer.

getEmail() : string
inherited

Response

string

Return a first name of the payer.

getFirstName() : string
inherited

Response

string

Return an id of the customer in a shop.

getId() : integer|null

Response

integer|null

Return a language used by the customer.

getLanguage() : string

Response

string

Return a last name of the payer.

getLastName() : string
inherited

Response

string

Return a phone number of the customer.

getPhone() : string

Response

string

Return a post code of the customer.

getPostCode() : string

Response

string

Return a street name of the customer.

getStreet() : string

Response

string

Set a building number of the customer.

setBuildingNumber(string $buildingNumber) : \Dotpay\Model\Customer
Throws
\Dotpay\Exception\BadParameter\BNumberException

Thrown when the given building number is incorrect

Arguments

$buildingNumber

string

Building number of the customer

Response

\Dotpay\Model\Customer

Set a city of the customer.

setCity(string $city) : \Dotpay\Model\Customer
Throws
\Dotpay\Exception\BadParameter\CityException

Thrown when the given city is incorrect

Arguments

$city

string

City of the customer

Response

\Dotpay\Model\Customer

Set a country of the customer.

setCountry(string $country) : \Dotpay\Model\Customer
Throws
\Dotpay\Exception\BadParameter\CountryException

Thrown when the given country is incorrect

Arguments

$country

string

Country of the customer

Response

\Dotpay\Model\Customer

Set the email address of the payer.

setEmail(\Dotpay\Model\type $email) : \Dotpay\Model\Payer
inherited
Throws
\Dotpay\Exception\BadParameter\EmailException

Thrown when the given email address is incorrect

Arguments

$email

\Dotpay\Model\type

Email address of the payer

Response

\Dotpay\Model\Payer

Set the first name of the payer.

setFirstName(string $firstName) : \Dotpay\Model\Payer
inherited
Throws
\Dotpay\Exception\BadParameter\FirstnameException

Thrown when the given first name is incorrect

Arguments

$firstName

string

First name of the payer

Response

\Dotpay\Model\Payer

Set an id of the customer in a shop.

setId(string $id) : \Dotpay\Model\Customer

Arguments

$id

string

Id of the customer in a shop

Response

\Dotpay\Model\Customer

Set a language used by the customer.

setLanguage(string $language) : \Dotpay\Model\Customer
Throws
\Dotpay\Exception\BadParameter\LanguageException

Thrown when the given language is incorrect

Arguments

$language

string

Language used by the customer

Response

\Dotpay\Model\Customer

Set the last name of the payer.

setLastName(\Dotpay\Model\type $lastName) : \Dotpay\Model\Payer
inherited
Throws
\Dotpay\Exception\BadParameter\LastnameException

Thrown when the given last name is incorrect

Arguments

$lastName

\Dotpay\Model\type

Last name of the payer

Response

\Dotpay\Model\Payer

Set a phone number of the customer.

setPhone(string $phone) : \Dotpay\Model\Customer
Throws
\Dotpay\Exception\BadParameter\PhoneException

Thrown when the given phone number is incorrect

Arguments

$phone

string

Phone number of the customer

Response

\Dotpay\Model\Customer

Set a post code of the customer.

setPostCode(string $postCode) : \Dotpay\Model\Customer
Throws
\Dotpay\Exception\BadParameter\PostCodeException

Thrown when the given post code is incorrect

Arguments

$postCode

string

Post code of the customer

Response

\Dotpay\Model\Customer

Set a street name of the customer.

setStreet(string $street) : \Dotpay\Model\Customer
Throws
\Dotpay\Exception\BadParameter\StreetException

Thrown when the given street is incorrect

Arguments

$street

string

Street name of the customer

Response

\Dotpay\Model\Customer

Properties

All available languages which are supported by Dotpay.

LANGUAGES : 
static

Type(s)

Id of the customer in a shop

id : integer|null
var

Id of the customer in a shop

Type(s)

integer|null

Street name of the customer

street : string
var

Street name of the customer

Type(s)

string

Building number of the customer

buildingNumber : string
var

Building number of the customer

Type(s)

string

Post code of the customer

postCode : string
var

Post code of the customer

Type(s)

string

City of the customer

city : string
var

City of the customer

Type(s)

string

Country of the customer

country : string
var

Country of the customer

Type(s)

string

Phone number of the customer

phone : string
var

Phone number of the customer

Type(s)

string

Language used by the customer

language : string
var

Language used by the customer

Type(s)

string

Email address of the payer

email : string
inherited
var

Email address of the payer

Type(s)

string

First name of the payer

firstName : string
inherited
var

First name of the payer

Type(s)

string

Last name of the payer

lastName : string
inherited
var

Last name of the payer

Type(s)

string