| 1 |
lars |
1 |
<?php
|
|
|
2 |
/*******************************************************************************
|
|
|
3 |
* Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
5 |
*
|
|
|
6 |
* You may not use this file except in compliance with the License.
|
|
|
7 |
* You may obtain a copy of the License at: http://aws.amazon.com/apache2.0
|
|
|
8 |
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
|
9 |
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
|
10 |
* specific language governing permissions and limitations under the License.
|
|
|
11 |
* *****************************************************************************
|
|
|
12 |
*/
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
/**
|
|
|
16 |
* @see CheckoutByAmazon_Service_Model
|
|
|
17 |
*/
|
|
|
18 |
require_once ('CheckoutByAmazon/Service/Model.php');
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
/**
|
|
|
23 |
* CheckoutByAmazon_Service_Model_DeliveryMethod
|
|
|
24 |
*
|
|
|
25 |
* Properties:
|
|
|
26 |
* <ul>
|
|
|
27 |
*
|
|
|
28 |
* <li>ServiceLevel: ShippingServiceLevel</li>
|
|
|
29 |
* <li>DisplayableShippingLabel: string</li>
|
|
|
30 |
* <li>DestinationName: string</li>
|
|
|
31 |
* <li>ShippingCustomData: string</li>
|
|
|
32 |
*
|
|
|
33 |
* </ul>
|
|
|
34 |
*/
|
|
|
35 |
class CheckoutByAmazon_Service_Model_DeliveryMethod extends CheckoutByAmazon_Service_Model
|
|
|
36 |
{
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
/**
|
|
|
40 |
* Construct new CheckoutByAmazon_Service_Model_DeliveryMethod
|
|
|
41 |
*
|
|
|
42 |
* @param mixed $data DOMElement or Associative Array to construct from.
|
|
|
43 |
*
|
|
|
44 |
* Valid properties:
|
|
|
45 |
* <ul>
|
|
|
46 |
*
|
|
|
47 |
* <li>ServiceLevel: ShippingServiceLevel</li>
|
|
|
48 |
* <li>DisplayableShippingLabel: string</li>
|
|
|
49 |
* <li>DestinationName: string</li>
|
|
|
50 |
* <li>ShippingCustomData: string</li>
|
|
|
51 |
*
|
|
|
52 |
* </ul>
|
|
|
53 |
*/
|
|
|
54 |
public function __construct($data = null)
|
|
|
55 |
{
|
|
|
56 |
$this->_fields = array (
|
|
|
57 |
'ServiceLevel' => array('FieldValue' => null, 'FieldType' => 'ShippingServiceLevel'),
|
|
|
58 |
'DisplayableShippingLabel' => array('FieldValue' => null, 'FieldType' => 'string'),
|
|
|
59 |
'DestinationName' => array('FieldValue' => null, 'FieldType' => 'string'),
|
|
|
60 |
'ShippingCustomData' => array('FieldValue' => null, 'FieldType' => 'string'),
|
|
|
61 |
);
|
|
|
62 |
parent::__construct($data);
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
/**
|
|
|
66 |
* Gets the value of the ServiceLevel property.
|
|
|
67 |
*
|
|
|
68 |
* @return ShippingServiceLevel ServiceLevel
|
|
|
69 |
*/
|
|
|
70 |
public function getServiceLevel()
|
|
|
71 |
{
|
|
|
72 |
return $this->_fields['ServiceLevel']['FieldValue'];
|
|
|
73 |
}
|
|
|
74 |
|
|
|
75 |
/**
|
|
|
76 |
* Sets the value of the ServiceLevel property.
|
|
|
77 |
*
|
|
|
78 |
* @param ShippingServiceLevel ServiceLevel
|
|
|
79 |
* @return this instance
|
|
|
80 |
*/
|
|
|
81 |
public function setServiceLevel($value)
|
|
|
82 |
{
|
|
|
83 |
$this->_fields['ServiceLevel']['FieldValue'] = $value;
|
|
|
84 |
return $this;
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
/**
|
|
|
89 |
* Checks if ServiceLevel is set
|
|
|
90 |
*
|
|
|
91 |
* @return bool true if ServiceLevel is set
|
|
|
92 |
*/
|
|
|
93 |
public function isSetServiceLevel()
|
|
|
94 |
{
|
|
|
95 |
return !is_null($this->_fields['ServiceLevel']['FieldValue']);
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
/**
|
|
|
99 |
* Gets the value of the DisplayableShippingLabel property.
|
|
|
100 |
*
|
|
|
101 |
* @return string DisplayableShippingLabel
|
|
|
102 |
*/
|
|
|
103 |
public function getDisplayableShippingLabel()
|
|
|
104 |
{
|
|
|
105 |
return $this->_fields['DisplayableShippingLabel']['FieldValue'];
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
/**
|
|
|
109 |
* Sets the value of the DisplayableShippingLabel property.
|
|
|
110 |
*
|
|
|
111 |
* @param string DisplayableShippingLabel
|
|
|
112 |
* @return this instance
|
|
|
113 |
*/
|
|
|
114 |
public function setDisplayableShippingLabel($value)
|
|
|
115 |
{
|
|
|
116 |
$this->_fields['DisplayableShippingLabel']['FieldValue'] = $value;
|
|
|
117 |
return $this;
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
|
|
|
121 |
/**
|
|
|
122 |
* Checks if DisplayableShippingLabel is set
|
|
|
123 |
*
|
|
|
124 |
* @return bool true if DisplayableShippingLabel is set
|
|
|
125 |
*/
|
|
|
126 |
public function isSetDisplayableShippingLabel()
|
|
|
127 |
{
|
|
|
128 |
return !is_null($this->_fields['DisplayableShippingLabel']['FieldValue']);
|
|
|
129 |
}
|
|
|
130 |
|
|
|
131 |
/**
|
|
|
132 |
* Gets the value of the DestinationName property.
|
|
|
133 |
*
|
|
|
134 |
* @return string DestinationName
|
|
|
135 |
*/
|
|
|
136 |
public function getDestinationName()
|
|
|
137 |
{
|
|
|
138 |
return $this->_fields['DestinationName']['FieldValue'];
|
|
|
139 |
}
|
|
|
140 |
|
|
|
141 |
/**
|
|
|
142 |
* Sets the value of the DestinationName property.
|
|
|
143 |
*
|
|
|
144 |
* @param string DestinationName
|
|
|
145 |
* @return this instance
|
|
|
146 |
*/
|
|
|
147 |
public function setDestinationName($value)
|
|
|
148 |
{
|
|
|
149 |
$this->_fields['DestinationName']['FieldValue'] = $value;
|
|
|
150 |
return $this;
|
|
|
151 |
}
|
|
|
152 |
|
|
|
153 |
|
|
|
154 |
/**
|
|
|
155 |
* Checks if DestinationName is set
|
|
|
156 |
*
|
|
|
157 |
* @return bool true if DestinationName is set
|
|
|
158 |
*/
|
|
|
159 |
public function isSetDestinationName()
|
|
|
160 |
{
|
|
|
161 |
return !is_null($this->_fields['DestinationName']['FieldValue']);
|
|
|
162 |
}
|
|
|
163 |
|
|
|
164 |
/**
|
|
|
165 |
* Gets the value of the ShippingCustomData property.
|
|
|
166 |
*
|
|
|
167 |
* @return string ShippingCustomData
|
|
|
168 |
*/
|
|
|
169 |
public function getShippingCustomData()
|
|
|
170 |
{
|
|
|
171 |
return $this->_fields['ShippingCustomData']['FieldValue'];
|
|
|
172 |
}
|
|
|
173 |
|
|
|
174 |
/**
|
|
|
175 |
* Sets the value of the ShippingCustomData property.
|
|
|
176 |
*
|
|
|
177 |
* @param string ShippingCustomData
|
|
|
178 |
* @return this instance
|
|
|
179 |
*/
|
|
|
180 |
public function setShippingCustomData($value)
|
|
|
181 |
{
|
|
|
182 |
$this->_fields['ShippingCustomData']['FieldValue'] = $value;
|
|
|
183 |
return $this;
|
|
|
184 |
}
|
|
|
185 |
|
|
|
186 |
|
|
|
187 |
/**
|
|
|
188 |
* Checks if ShippingCustomData is set
|
|
|
189 |
*
|
|
|
190 |
* @return bool true if ShippingCustomData is set
|
|
|
191 |
*/
|
|
|
192 |
public function isSetShippingCustomData()
|
|
|
193 |
{
|
|
|
194 |
return !is_null($this->_fields['ShippingCustomData']['FieldValue']);
|
|
|
195 |
}
|
|
|
196 |
|
|
|
197 |
}
|
|
|
198 |
?>
|