PHP Class PayPal\Api\Templates

List of templates belonging to merchant.
Inheritance: extends PayPal\Common\PayPalResourceModel
Show file Open project: paypal/rest-api-sdk-php Class Usage Examples

Public Methods

Method Description
addAddress ( Address $address ) Append Addresses to the list.
addEmail ( string $string ) Append Emails to the list.
addPhone ( Phone $phone ) Append Phones to the list.
addTemplate ( Template $template ) Append Templates to the list.
get ( string $templateId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Template Retrieve the details for a particular template by passing the template ID to the request URI.
getAddresses ( ) : Address[] List of addresses in merchant's profile.
getAll ( array $params = [], ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Templates Retrieves the template information of the merchant.
getEmails ( ) : string[] List of emails in merchant's profile.
getPhones ( ) : Phone[] List of phone numbers in merchant's profile.
getTemplates ( ) : Template[] Array of templates.
removeAddress ( Address $address ) Remove Addresses from the list.
removeEmail ( string $string ) Remove Emails from the list.
removePhone ( Phone $phone ) Remove Phones from the list.
removeTemplate ( Template $template ) Remove Templates from the list.
setAddresses ( Address[] $addresses ) List of addresses in merchant's profile.
setEmails ( string[] $emails ) List of emails in merchant's profile.
setPhones ( Phone[] $phones ) List of phone numbers in merchant's profile.
setTemplates ( Template[] $templates ) Array of templates.

Method Details

addAddress() public method

Append Addresses to the list.
public addAddress ( Address $address )
$address Address

addEmail() public method

Append Emails to the list.
public addEmail ( string $string )
$string string

addPhone() public method

Append Phones to the list.
public addPhone ( Phone $phone )
$phone Phone

addTemplate() public method

Append Templates to the list.
public addTemplate ( Template $template )
$template Template

get() public static method

Retrieve the details for a particular template by passing the template ID to the request URI.
See also: Template::get
Deprecation: Please use `Template::get()` instead.
public static get ( string $templateId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Template
$templateId string
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
return Template

getAddresses() public method

List of addresses in merchant's profile.
public getAddresses ( ) : Address[]
return Address[]

getAll() public static method

Retrieves the template information of the merchant.
public static getAll ( array $params = [], ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Templates
$params array
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
return Templates

getEmails() public method

List of emails in merchant's profile.
public getEmails ( ) : string[]
return string[]

getPhones() public method

List of phone numbers in merchant's profile.
public getPhones ( ) : Phone[]
return Phone[]

getTemplates() public method

Array of templates.
public getTemplates ( ) : Template[]
return Template[]

removeAddress() public method

Remove Addresses from the list.
public removeAddress ( Address $address )
$address Address

removeEmail() public method

Remove Emails from the list.
public removeEmail ( string $string )
$string string

removePhone() public method

Remove Phones from the list.
public removePhone ( Phone $phone )
$phone Phone

removeTemplate() public method

Remove Templates from the list.
public removeTemplate ( Template $template )
$template Template

setAddresses() public method

List of addresses in merchant's profile.
public setAddresses ( Address[] $addresses )
$addresses Address[]

setEmails() public method

List of emails in merchant's profile.
public setEmails ( string[] $emails )
$emails string[]

setPhones() public method

List of phone numbers in merchant's profile.
public setPhones ( Phone[] $phones )
$phones Phone[]

setTemplates() public method

Array of templates.
public setTemplates ( Template[] $templates )
$templates Template[]