PHP Class PayPal\Api\Template

Invoicing Template
Inheritance: extends PayPal\Common\PayPalResourceModel
Show file Open project: paypal/rest-api-sdk-php Class Usage Examples

Public Methods

Method Description
addSetting ( TemplateSettings $templateSettings ) Append Settings to the list.
create ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Template Creates a template.
delete ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : boolean Delete a particular template by passing the template ID to the request URI.
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.
getCustom ( ) : boolean Indicates whether this is a custom template created by the merchant. Non custom templates are system generated
getDefault ( ) : boolean Indicates that this template is merchant's default. There can be only one template which can be a default.
getName ( ) : string Name of the template.
getSettings ( ) : TemplateSettings[] Settings for each template
getTemplateData ( ) : TemplateData Customized invoice data which is saved as template
getTemplateId ( ) : string Unique identifier id of the template.
getUnitOfMeasure ( ) : string Unit of measure for the template, possible values are Quantity, Hours, Amount.
removeSetting ( TemplateSettings $templateSettings ) Remove Settings from the list.
setCustom ( boolean $custom ) Indicates whether this is a custom template created by the merchant. Non custom templates are system generated
setDefault ( boolean $default ) Indicates that this template is merchant's default. There can be only one template which can be a default.
setName ( string $name ) Name of the template.
setSettings ( TemplateSettings[] $settings ) Settings for each template
setTemplateData ( TemplateData $template_data ) Customized invoice data which is saved as template
setTemplateId ( string $template_id ) Unique identifier id of the template.
setUnitOfMeasure ( string $unit_of_measure ) Unit of measure for the template, possible values are Quantity, Hours, Amount.
update ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Template Update an existing template by passing the template ID to the request URI. In addition, pass a complete template object in the request JSON. Partial updates are not supported.

Method Details

addSetting() public method

Append Settings to the list.
public addSetting ( TemplateSettings $templateSettings )
$templateSettings TemplateSettings

create() public method

Creates a template.
public create ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Template
$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

delete() public method

Delete a particular template by passing the template ID to the request URI.
public delete ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : boolean
$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 boolean

get() public static method

Retrieve the details for a particular template by passing the template ID to the request URI.
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

getCustom() public method

Indicates whether this is a custom template created by the merchant. Non custom templates are system generated
public getCustom ( ) : boolean
return boolean

getDefault() public method

Indicates that this template is merchant's default. There can be only one template which can be a default.
public getDefault ( ) : boolean
return boolean

getName() public method

Name of the template.
public getName ( ) : string
return string

getSettings() public method

Settings for each template
public getSettings ( ) : TemplateSettings[]
return TemplateSettings[]

getTemplateData() public method

Customized invoice data which is saved as template
public getTemplateData ( ) : TemplateData
return TemplateData

getTemplateId() public method

Unique identifier id of the template.
public getTemplateId ( ) : string
return string

getUnitOfMeasure() public method

Unit of measure for the template, possible values are Quantity, Hours, Amount.
public getUnitOfMeasure ( ) : string
return string

removeSetting() public method

Remove Settings from the list.
public removeSetting ( TemplateSettings $templateSettings )
$templateSettings TemplateSettings

setCustom() public method

Indicates whether this is a custom template created by the merchant. Non custom templates are system generated
public setCustom ( boolean $custom )
$custom boolean

setDefault() public method

Indicates that this template is merchant's default. There can be only one template which can be a default.
public setDefault ( boolean $default )
$default boolean

setName() public method

Name of the template.
public setName ( string $name )
$name string

setSettings() public method

Settings for each template
public setSettings ( TemplateSettings[] $settings )
$settings TemplateSettings[]

setTemplateData() public method

Customized invoice data which is saved as template
public setTemplateData ( TemplateData $template_data )
$template_data TemplateData

setTemplateId() public method

Unique identifier id of the template.
public setTemplateId ( string $template_id )
$template_id string

setUnitOfMeasure() public method

Unit of measure for the template, possible values are Quantity, Hours, Amount.
public setUnitOfMeasure ( string $unit_of_measure )
$unit_of_measure string

update() public method

Update an existing template by passing the template ID to the request URI. In addition, pass a complete template object in the request JSON. Partial updates are not supported.
public update ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Template
$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