Overview
  • Namespace
  • Class

Namespaces

  • Klarna
    • XMLRPC
      • Exception

Classes

  • Address
  • Calc
  • CheckoutServiceRequest
  • CheckoutServiceResponse
  • Config
  • Country
  • CurlHandle
  • CurlTransport
  • Currency
  • Encoding
  • Flags
  • Klarna
  • Language

Class Address

Address is an object of convenience, to parse and create addresses.

Namespace: Klarna\XMLRPC
Located at Klarna/XMLRPC/Address.php

Methods summary

public
# __construct( string $email = '', string $telno = '', string $cellno = '', string $fname = '', string $lname = '', string $careof = '', string $street = '', string $zip = '', string $city = '', string|integer $country = null, string $houseNo = '', string $houseExt = '' )

Class constructor.

Class constructor.

Calls the set methods for all arguments.

Parameters

$email
Email address.
$telno
Phone number.
$cellno
Cellphone number.
$fname
First name.
$lname
Last name.
$careof
Care of, C/O.
$street
Street address.
$zip
Zip code.
$city
City.
$country
Country constant or two letter code.
$houseNo
House number, only used in DE and NL.
$houseExt
House extension, only used in NL.

Throws

Exceptions\KlarnaException
public string
# getEmail( )

Returns the email address.

Returns the email address.

Returns

string
public
# setEmail( string $email )

Sets the email address.

Sets the email address.

Parameters

$email
email address
public string
# getTelno( )

Returns the phone number.

Returns the phone number.

Returns

string
public
# setTelno( string $telno )

Sets the phone number.

Sets the phone number.

Parameters

$telno
telno
public string
# getCellno( )

Returns the cellphone number.

Returns the cellphone number.

Returns

string
public
# setCellno( string $cellno )

Sets the cellphone number.

Sets the cellphone number.

Parameters

$cellno
mobile number
public string
# getFirstName( )

Returns the first name.

Returns the first name.

Returns

string
public
# setFirstName( string $fname )

Sets the first name.

Sets the first name.

Parameters

$fname
firstname
public string
# getLastName( )

Returns the last name.

Returns the last name.

Returns

string
public
# setLastName( string $lname )

Sets the last name.

Sets the last name.

Parameters

$lname
lastname
public string
# getCompanyName( )

Returns the company name.

Returns the company name.

Returns

string
public
# setCompanyName( string $company )

Sets the company name. If the purchase results in a company purchase, reference person will be used from first and last name, or the value set with Klarna::setReference().

Sets the company name. If the purchase results in a company purchase, reference person will be used from first and last name, or the value set with Klarna::setReference().

Parameters

$company
company name

See

Klarna\XMLRPC\Klarna::setReference()
public string
# getCareof( )

Returns the care of, C/O.

Returns the care of, C/O.

Returns

string
public
# setCareof( string $careof )

Sets the care of, C/O.

Sets the care of, C/O.

Parameters

$careof
care of address
public string
# getStreet( )

Returns the street address.

Returns the street address.

Returns

string
public
# setStreet( string $street )

Sets the street address.

Sets the street address.

Parameters

$street
street address
public string
# getZipCode( )

Returns the zip code.

Returns the zip code.

Returns

string
public
# setZipCode( string $zip )

Sets the zip code.

Sets the zip code.

Parameters

$zip
zip code
public string
# getCity( )

Returns the city.

Returns the city.

Returns

string
public
# setCity( string $city )

Sets the city.

Sets the city.

Parameters

$city
city
public integer
# getCountry( )

Returns the country as a integer constant.

Returns the country as a integer constant.

Returns

integer
Klarna\XMLRPC\Country
public string
# getCountryCode( )

Returns the country as a two letter representation.

Returns the country as a two letter representation.

Returns

string
E.g. 'de', 'dk', ...

Throws

Exceptions\KlarnaException
public
# setCountry( integer $country )

Sets the country, use either a two letter representation or the integer constant.

Sets the country, use either a two letter representation or the integer constant.

Parameters

$country
Klarna\XMLRPC\Country

Throws

Exceptions\KlarnaException
public string
# getHouseNumber( )

Returns the house number.
Only used in Germany and Netherlands.
.

Returns the house number.
Only used in Germany and Netherlands.
.

Returns

string
public
# setHouseNumber( string $houseNo )

Sets the house number.
Only used in Germany and Netherlands.
.

Sets the house number.
Only used in Germany and Netherlands.
.

Parameters

$houseNo
house number
public string
# getHouseExt( )

Returns the house extension.
Only used in Netherlands.
.

Returns the house extension.
Only used in Netherlands.
.

Returns

string
public
# setHouseExt( string $houseExt )

Sets the house extension.
Only used in Netherlands.
.

Sets the house extension.
Only used in Netherlands.
.

Parameters

$houseExt
house extension
public array
# toArray( )

Returns an associative array representing this object.

Returns an associative array representing this object.

Returns

array

Magic methods summary

Properties summary

protected string $email

Email address.

Email address.

#
protected string $telno

Phone number.

Phone number.

#
protected string $cellno

Cellphone number.

Cellphone number.

#
protected string $fname

First name.

First name.

#
protected string $lname

Last name.

Last name.

#
protected string $company

Company name.

Company name.

#
protected string $careof

Care of, C/O.

Care of, C/O.

#
protected string $street

Street address.

Street address.

#
protected string $zip

Zip code.

Zip code.

#
protected string $city

City.

City.

#
protected integer $country

Country constant.

Country constant.

#
protected string $houseNo

House number. Only for NL and DE!

House number. Only for NL and DE!

#
protected string $houseExt

House extension. Only for NL!

House extension. Only for NL!

#
public boolean|null $isCompany

When using Klarna::getAddresses() this might be guessed depending on type used.

When using Klarna::getAddresses() this might be guessed depending on type used.

Signifies if address is for a company or a private person. If isCompany is null, then it is unknown and will be assumed to be a private person.

Note:
This has no effect on transmitted data.

# null
API documentation generated by ApiGen