| Total Complexity | 83 |
| Total Lines | 612 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Complex classes like SetAccessPermissionsRequestDetailsType often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use SetAccessPermissionsRequestDetailsType, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 12 | class SetAccessPermissionsRequestDetailsType extends AbstractStructBase |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * The ReturnURL |
||
| 16 | * Meta information extracted from the WSDL |
||
| 17 | * - documentation: URL to which the customer's browser is returned after choosing to login with PayPal. Required Character length and limitations: no limit. |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | public $ReturnURL; |
||
| 21 | /** |
||
| 22 | * The CancelURL |
||
| 23 | * Meta information extracted from the WSDL |
||
| 24 | * - documentation: URL to which the customer is returned if he does not approve the use of PayPal login. Required Character length and limitations: no limit |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | public $CancelURL; |
||
| 28 | /** |
||
| 29 | * The LogoutURL |
||
| 30 | * Meta information extracted from the WSDL |
||
| 31 | * - documentation: URL to which the customer's browser is returned after user logs out from PayPal. Required Character length and limitations: no limit. |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | public $LogoutURL; |
||
| 35 | /** |
||
| 36 | * The InitFlowType |
||
| 37 | * Meta information extracted from the WSDL |
||
| 38 | * - documentation: The type of the flow. Optional Character length and limitations: 127 single-byte alphanumeric characters |
||
| 39 | * - minOccurs: 0 |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | public $InitFlowType; |
||
| 43 | /** |
||
| 44 | * The SkipLoginPage |
||
| 45 | * Meta information extracted from the WSDL |
||
| 46 | * - documentation: The used to decide SkipLogin allowed or not. Optional Character length and limitations: 127 single-byte alphanumeric characters |
||
| 47 | * - minOccurs: 0 |
||
| 48 | * @var string |
||
| 49 | */ |
||
| 50 | public $SkipLoginPage; |
||
| 51 | /** |
||
| 52 | * The RequiredAccessPermissions |
||
| 53 | * Meta information extracted from the WSDL |
||
| 54 | * - documentation: contains information about API Services |
||
| 55 | * - maxOccurs: unbounded |
||
| 56 | * - minOccurs: 0 |
||
| 57 | * @var string[] |
||
| 58 | */ |
||
| 59 | public $RequiredAccessPermissions; |
||
| 60 | /** |
||
| 61 | * The OptionalAccessPermissions |
||
| 62 | * Meta information extracted from the WSDL |
||
| 63 | * - documentation: contains information about API Services |
||
| 64 | * - maxOccurs: unbounded |
||
| 65 | * - minOccurs: 0 |
||
| 66 | * @var string[] |
||
| 67 | */ |
||
| 68 | public $OptionalAccessPermissions; |
||
| 69 | /** |
||
| 70 | * The LocaleCode |
||
| 71 | * Meta information extracted from the WSDL |
||
| 72 | * - documentation: Locale of pages displayed by PayPal during Authentication Login. Optional Character length and limitations: Five single-byte alphabetic characters, upper- or lowercase. Allowable values: AU or en_AUDE or de_DEFR or fr_FRGB or en_GBIT |
||
| 73 | * or it_ITJP or ja_JPUS or en_US |
||
| 74 | * - minOccurs: 0 |
||
| 75 | * @var string |
||
| 76 | */ |
||
| 77 | public $LocaleCode; |
||
| 78 | /** |
||
| 79 | * The PageStyle |
||
| 80 | * Meta information extracted from the WSDL |
||
| 81 | * - documentation: Sets the Custom Payment Page Style for flow pages associated with this button/link. PageStyle corresponds to the HTML variable page_style for customizing flow pages. The value is the same as the Page Style Name you chose when adding |
||
| 82 | * or editing the page style from the Profile subtab of the My Account tab of your PayPal account. Optional Character length and limitations: 30 single-byte alphabetic characters. |
||
| 83 | * - minOccurs: 0 |
||
| 84 | * @var string |
||
| 85 | */ |
||
| 86 | public $PageStyle; |
||
| 87 | /** |
||
| 88 | * The cpp_header_image |
||
| 89 | * Meta information extracted from the WSDL |
||
| 90 | * - documentation: A URL for the image you want to appear at the top left of the flow page. The image has a maximum size of 750 pixels wide by 90 pixels high. PayPal recommends that you provide an image that is stored on a secure (https) server. |
||
| 91 | * Optional Character length and limitations: 127 |
||
| 92 | * - minOccurs: 0 |
||
| 93 | * @var string |
||
| 94 | */ |
||
| 95 | public $cpp_header_image; |
||
| 96 | /** |
||
| 97 | * The cpp_header_border_color |
||
| 98 | * Meta information extracted from the WSDL |
||
| 99 | * - documentation: Sets the border color around the header of the flow page. The border is a 2-pixel perimeter around the header space, which is 750 pixels wide by 90 pixels high. Optional Character length and limitations: Six character HTML |
||
| 100 | * hexadecimal color code in ASCII |
||
| 101 | * - minOccurs: 0 |
||
| 102 | * @var string |
||
| 103 | */ |
||
| 104 | public $cpp_header_border_color; |
||
| 105 | /** |
||
| 106 | * The cpp_header_back_color |
||
| 107 | * Meta information extracted from the WSDL |
||
| 108 | * - documentation: Sets the background color for the header of the flow page. Optional Character length and limitation: Six character HTML hexadecimal color code in ASCII |
||
| 109 | * - minOccurs: 0 |
||
| 110 | * @var string |
||
| 111 | */ |
||
| 112 | public $cpp_header_back_color; |
||
| 113 | /** |
||
| 114 | * The cpp_payflow_color |
||
| 115 | * Meta information extracted from the WSDL |
||
| 116 | * - documentation: Sets the background color for the payment page. Optional Character length and limitation: Six character HTML hexadecimal color code in ASCII |
||
| 117 | * - minOccurs: 0 |
||
| 118 | * @var string |
||
| 119 | */ |
||
| 120 | public $cpp_payflow_color; |
||
| 121 | /** |
||
| 122 | * The FirstName |
||
| 123 | * Meta information extracted from the WSDL |
||
| 124 | * - documentation: First Name of the user, this information is used if user chooses to signup with PayPal. Optional Character length and limitation: Six character HTML hexadecimal color code in ASCII |
||
| 125 | * - minOccurs: 0 |
||
| 126 | * @var string |
||
| 127 | */ |
||
| 128 | public $FirstName; |
||
| 129 | /** |
||
| 130 | * The LastName |
||
| 131 | * Meta information extracted from the WSDL |
||
| 132 | * - documentation: Last Name of the user, this information is used if user chooses to signup with PayPal. Optional Character length and limitation: Six character HTML hexadecimal color code in ASCII |
||
| 133 | * - minOccurs: 0 |
||
| 134 | * @var string |
||
| 135 | */ |
||
| 136 | public $LastName; |
||
| 137 | /** |
||
| 138 | * The Address |
||
| 139 | * Meta information extracted from the WSDL |
||
| 140 | * - documentation: User address, this information is used when user chooses to signup for PayPal. Optional If you include a shipping address and set the AddressOverride element on the request, PayPal returns this same address in |
||
| 141 | * GetExpressCheckoutDetailsResponse. |
||
| 142 | * - minOccurs: 0 |
||
| 143 | * @var \PayPal\StructType\AddressType |
||
| 144 | */ |
||
| 145 | public $Address; |
||
| 146 | /** |
||
| 147 | * Constructor method for SetAccessPermissionsRequestDetailsType |
||
| 148 | * @uses SetAccessPermissionsRequestDetailsType::setReturnURL() |
||
| 149 | * @uses SetAccessPermissionsRequestDetailsType::setCancelURL() |
||
| 150 | * @uses SetAccessPermissionsRequestDetailsType::setLogoutURL() |
||
| 151 | * @uses SetAccessPermissionsRequestDetailsType::setInitFlowType() |
||
| 152 | * @uses SetAccessPermissionsRequestDetailsType::setSkipLoginPage() |
||
| 153 | * @uses SetAccessPermissionsRequestDetailsType::setRequiredAccessPermissions() |
||
| 154 | * @uses SetAccessPermissionsRequestDetailsType::setOptionalAccessPermissions() |
||
| 155 | * @uses SetAccessPermissionsRequestDetailsType::setLocaleCode() |
||
| 156 | * @uses SetAccessPermissionsRequestDetailsType::setPageStyle() |
||
| 157 | * @uses SetAccessPermissionsRequestDetailsType::setCpp_header_image() |
||
| 158 | * @uses SetAccessPermissionsRequestDetailsType::setCpp_header_border_color() |
||
| 159 | * @uses SetAccessPermissionsRequestDetailsType::setCpp_header_back_color() |
||
| 160 | * @uses SetAccessPermissionsRequestDetailsType::setCpp_payflow_color() |
||
| 161 | * @uses SetAccessPermissionsRequestDetailsType::setFirstName() |
||
| 162 | * @uses SetAccessPermissionsRequestDetailsType::setLastName() |
||
| 163 | * @uses SetAccessPermissionsRequestDetailsType::setAddress() |
||
| 164 | * @param string $returnURL |
||
| 165 | * @param string $cancelURL |
||
| 166 | * @param string $logoutURL |
||
| 167 | * @param string $initFlowType |
||
| 168 | * @param string $skipLoginPage |
||
| 169 | * @param string[] $requiredAccessPermissions |
||
| 170 | * @param string[] $optionalAccessPermissions |
||
| 171 | * @param string $localeCode |
||
| 172 | * @param string $pageStyle |
||
| 173 | * @param string $cpp_header_image |
||
| 174 | * @param string $cpp_header_border_color |
||
| 175 | * @param string $cpp_header_back_color |
||
| 176 | * @param string $cpp_payflow_color |
||
| 177 | * @param string $firstName |
||
| 178 | * @param string $lastName |
||
| 179 | * @param \PayPal\StructType\AddressType $address |
||
| 180 | */ |
||
| 181 | public function __construct($returnURL = null, $cancelURL = null, $logoutURL = null, $initFlowType = null, $skipLoginPage = null, array $requiredAccessPermissions = array(), array $optionalAccessPermissions = array(), $localeCode = null, $pageStyle = null, $cpp_header_image = null, $cpp_header_border_color = null, $cpp_header_back_color = null, $cpp_payflow_color = null, $firstName = null, $lastName = null, \PayPal\StructType\AddressType $address = null) |
||
| 182 | { |
||
| 183 | $this |
||
| 184 | ->setReturnURL($returnURL) |
||
| 185 | ->setCancelURL($cancelURL) |
||
| 186 | ->setLogoutURL($logoutURL) |
||
| 187 | ->setInitFlowType($initFlowType) |
||
| 188 | ->setSkipLoginPage($skipLoginPage) |
||
| 189 | ->setRequiredAccessPermissions($requiredAccessPermissions) |
||
| 190 | ->setOptionalAccessPermissions($optionalAccessPermissions) |
||
| 191 | ->setLocaleCode($localeCode) |
||
| 192 | ->setPageStyle($pageStyle) |
||
| 193 | ->setCpp_header_image($cpp_header_image) |
||
| 194 | ->setCpp_header_border_color($cpp_header_border_color) |
||
| 195 | ->setCpp_header_back_color($cpp_header_back_color) |
||
| 196 | ->setCpp_payflow_color($cpp_payflow_color) |
||
| 197 | ->setFirstName($firstName) |
||
| 198 | ->setLastName($lastName) |
||
| 199 | ->setAddress($address); |
||
| 200 | } |
||
| 201 | /** |
||
| 202 | * Get ReturnURL value |
||
| 203 | * @return string|null |
||
| 204 | */ |
||
| 205 | public function getReturnURL() |
||
| 206 | { |
||
| 207 | return $this->ReturnURL; |
||
| 208 | } |
||
| 209 | /** |
||
| 210 | * Set ReturnURL value |
||
| 211 | * @param string $returnURL |
||
| 212 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 213 | */ |
||
| 214 | public function setReturnURL($returnURL = null) |
||
| 215 | { |
||
| 216 | // validation for constraint: string |
||
| 217 | if (!is_null($returnURL) && !is_string($returnURL)) { |
||
|
|
|||
| 218 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($returnURL, true), gettype($returnURL)), __LINE__); |
||
| 219 | } |
||
| 220 | $this->ReturnURL = $returnURL; |
||
| 221 | return $this; |
||
| 222 | } |
||
| 223 | /** |
||
| 224 | * Get CancelURL value |
||
| 225 | * @return string|null |
||
| 226 | */ |
||
| 227 | public function getCancelURL() |
||
| 228 | { |
||
| 229 | return $this->CancelURL; |
||
| 230 | } |
||
| 231 | /** |
||
| 232 | * Set CancelURL value |
||
| 233 | * @param string $cancelURL |
||
| 234 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 235 | */ |
||
| 236 | public function setCancelURL($cancelURL = null) |
||
| 237 | { |
||
| 238 | // validation for constraint: string |
||
| 239 | if (!is_null($cancelURL) && !is_string($cancelURL)) { |
||
| 240 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cancelURL, true), gettype($cancelURL)), __LINE__); |
||
| 241 | } |
||
| 242 | $this->CancelURL = $cancelURL; |
||
| 243 | return $this; |
||
| 244 | } |
||
| 245 | /** |
||
| 246 | * Get LogoutURL value |
||
| 247 | * @return string|null |
||
| 248 | */ |
||
| 249 | public function getLogoutURL() |
||
| 250 | { |
||
| 251 | return $this->LogoutURL; |
||
| 252 | } |
||
| 253 | /** |
||
| 254 | * Set LogoutURL value |
||
| 255 | * @param string $logoutURL |
||
| 256 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 257 | */ |
||
| 258 | public function setLogoutURL($logoutURL = null) |
||
| 259 | { |
||
| 260 | // validation for constraint: string |
||
| 261 | if (!is_null($logoutURL) && !is_string($logoutURL)) { |
||
| 262 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($logoutURL, true), gettype($logoutURL)), __LINE__); |
||
| 263 | } |
||
| 264 | $this->LogoutURL = $logoutURL; |
||
| 265 | return $this; |
||
| 266 | } |
||
| 267 | /** |
||
| 268 | * Get InitFlowType value |
||
| 269 | * @return string|null |
||
| 270 | */ |
||
| 271 | public function getInitFlowType() |
||
| 272 | { |
||
| 273 | return $this->InitFlowType; |
||
| 274 | } |
||
| 275 | /** |
||
| 276 | * Set InitFlowType value |
||
| 277 | * @param string $initFlowType |
||
| 278 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 279 | */ |
||
| 280 | public function setInitFlowType($initFlowType = null) |
||
| 281 | { |
||
| 282 | // validation for constraint: string |
||
| 283 | if (!is_null($initFlowType) && !is_string($initFlowType)) { |
||
| 284 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($initFlowType, true), gettype($initFlowType)), __LINE__); |
||
| 285 | } |
||
| 286 | $this->InitFlowType = $initFlowType; |
||
| 287 | return $this; |
||
| 288 | } |
||
| 289 | /** |
||
| 290 | * Get SkipLoginPage value |
||
| 291 | * @return string|null |
||
| 292 | */ |
||
| 293 | public function getSkipLoginPage() |
||
| 294 | { |
||
| 295 | return $this->SkipLoginPage; |
||
| 296 | } |
||
| 297 | /** |
||
| 298 | * Set SkipLoginPage value |
||
| 299 | * @param string $skipLoginPage |
||
| 300 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 301 | */ |
||
| 302 | public function setSkipLoginPage($skipLoginPage = null) |
||
| 303 | { |
||
| 304 | // validation for constraint: string |
||
| 305 | if (!is_null($skipLoginPage) && !is_string($skipLoginPage)) { |
||
| 306 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($skipLoginPage, true), gettype($skipLoginPage)), __LINE__); |
||
| 307 | } |
||
| 308 | $this->SkipLoginPage = $skipLoginPage; |
||
| 309 | return $this; |
||
| 310 | } |
||
| 311 | /** |
||
| 312 | * Get RequiredAccessPermissions value |
||
| 313 | * @return string[]|null |
||
| 314 | */ |
||
| 315 | public function getRequiredAccessPermissions() |
||
| 316 | { |
||
| 317 | return $this->RequiredAccessPermissions; |
||
| 318 | } |
||
| 319 | /** |
||
| 320 | * This method is responsible for validating the values passed to the setRequiredAccessPermissions method |
||
| 321 | * This method is willingly generated in order to preserve the one-line inline validation within the setRequiredAccessPermissions method |
||
| 322 | * @param array $values |
||
| 323 | * @return string A non-empty message if the values does not match the validation rules |
||
| 324 | */ |
||
| 325 | public static function validateRequiredAccessPermissionsForArrayConstraintsFromSetRequiredAccessPermissions(array $values = array()) |
||
| 340 | } |
||
| 341 | /** |
||
| 342 | * Set RequiredAccessPermissions value |
||
| 343 | * @throws \InvalidArgumentException |
||
| 344 | * @param string[] $requiredAccessPermissions |
||
| 345 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 346 | */ |
||
| 347 | public function setRequiredAccessPermissions(array $requiredAccessPermissions = array()) |
||
| 348 | { |
||
| 349 | // validation for constraint: array |
||
| 350 | if ('' !== ($requiredAccessPermissionsArrayErrorMessage = self::validateRequiredAccessPermissionsForArrayConstraintsFromSetRequiredAccessPermissions($requiredAccessPermissions))) { |
||
| 351 | throw new \InvalidArgumentException($requiredAccessPermissionsArrayErrorMessage, __LINE__); |
||
| 352 | } |
||
| 353 | $this->RequiredAccessPermissions = $requiredAccessPermissions; |
||
| 354 | return $this; |
||
| 355 | } |
||
| 356 | /** |
||
| 357 | * Add item to RequiredAccessPermissions value |
||
| 358 | * @throws \InvalidArgumentException |
||
| 359 | * @param string $item |
||
| 360 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 361 | */ |
||
| 362 | public function addToRequiredAccessPermissions($item) |
||
| 370 | } |
||
| 371 | /** |
||
| 372 | * Get OptionalAccessPermissions value |
||
| 373 | * @return string[]|null |
||
| 374 | */ |
||
| 375 | public function getOptionalAccessPermissions() |
||
| 376 | { |
||
| 377 | return $this->OptionalAccessPermissions; |
||
| 378 | } |
||
| 379 | /** |
||
| 380 | * This method is responsible for validating the values passed to the setOptionalAccessPermissions method |
||
| 381 | * This method is willingly generated in order to preserve the one-line inline validation within the setOptionalAccessPermissions method |
||
| 382 | * @param array $values |
||
| 383 | * @return string A non-empty message if the values does not match the validation rules |
||
| 384 | */ |
||
| 385 | public static function validateOptionalAccessPermissionsForArrayConstraintsFromSetOptionalAccessPermissions(array $values = array()) |
||
| 386 | { |
||
| 387 | $message = ''; |
||
| 388 | $invalidValues = []; |
||
| 389 | foreach ($values as $setAccessPermissionsRequestDetailsTypeOptionalAccessPermissionsItem) { |
||
| 390 | // validation for constraint: itemType |
||
| 391 | if (!is_string($setAccessPermissionsRequestDetailsTypeOptionalAccessPermissionsItem)) { |
||
| 392 | $invalidValues[] = is_object($setAccessPermissionsRequestDetailsTypeOptionalAccessPermissionsItem) ? get_class($setAccessPermissionsRequestDetailsTypeOptionalAccessPermissionsItem) : sprintf('%s(%s)', gettype($setAccessPermissionsRequestDetailsTypeOptionalAccessPermissionsItem), var_export($setAccessPermissionsRequestDetailsTypeOptionalAccessPermissionsItem, true)); |
||
| 393 | } |
||
| 394 | } |
||
| 395 | if (!empty($invalidValues)) { |
||
| 396 | $message = sprintf('The OptionalAccessPermissions property can only contain items of type string, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); |
||
| 397 | } |
||
| 398 | unset($invalidValues); |
||
| 399 | return $message; |
||
| 400 | } |
||
| 401 | /** |
||
| 402 | * Set OptionalAccessPermissions value |
||
| 403 | * @throws \InvalidArgumentException |
||
| 404 | * @param string[] $optionalAccessPermissions |
||
| 405 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 406 | */ |
||
| 407 | public function setOptionalAccessPermissions(array $optionalAccessPermissions = array()) |
||
| 408 | { |
||
| 409 | // validation for constraint: array |
||
| 410 | if ('' !== ($optionalAccessPermissionsArrayErrorMessage = self::validateOptionalAccessPermissionsForArrayConstraintsFromSetOptionalAccessPermissions($optionalAccessPermissions))) { |
||
| 411 | throw new \InvalidArgumentException($optionalAccessPermissionsArrayErrorMessage, __LINE__); |
||
| 412 | } |
||
| 413 | $this->OptionalAccessPermissions = $optionalAccessPermissions; |
||
| 414 | return $this; |
||
| 415 | } |
||
| 416 | /** |
||
| 417 | * Add item to OptionalAccessPermissions value |
||
| 418 | * @throws \InvalidArgumentException |
||
| 419 | * @param string $item |
||
| 420 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 421 | */ |
||
| 422 | public function addToOptionalAccessPermissions($item) |
||
| 423 | { |
||
| 424 | // validation for constraint: itemType |
||
| 425 | if (!is_string($item)) { |
||
| 426 | throw new \InvalidArgumentException(sprintf('The OptionalAccessPermissions property can only contain items of type string, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); |
||
| 427 | } |
||
| 428 | $this->OptionalAccessPermissions[] = $item; |
||
| 429 | return $this; |
||
| 430 | } |
||
| 431 | /** |
||
| 432 | * Get LocaleCode value |
||
| 433 | * @return string|null |
||
| 434 | */ |
||
| 435 | public function getLocaleCode() |
||
| 436 | { |
||
| 437 | return $this->LocaleCode; |
||
| 438 | } |
||
| 439 | /** |
||
| 440 | * Set LocaleCode value |
||
| 441 | * @param string $localeCode |
||
| 442 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 443 | */ |
||
| 444 | public function setLocaleCode($localeCode = null) |
||
| 445 | { |
||
| 446 | // validation for constraint: string |
||
| 447 | if (!is_null($localeCode) && !is_string($localeCode)) { |
||
| 448 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($localeCode, true), gettype($localeCode)), __LINE__); |
||
| 449 | } |
||
| 450 | $this->LocaleCode = $localeCode; |
||
| 451 | return $this; |
||
| 452 | } |
||
| 453 | /** |
||
| 454 | * Get PageStyle value |
||
| 455 | * @return string|null |
||
| 456 | */ |
||
| 457 | public function getPageStyle() |
||
| 458 | { |
||
| 459 | return $this->PageStyle; |
||
| 460 | } |
||
| 461 | /** |
||
| 462 | * Set PageStyle value |
||
| 463 | * @param string $pageStyle |
||
| 464 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 465 | */ |
||
| 466 | public function setPageStyle($pageStyle = null) |
||
| 467 | { |
||
| 468 | // validation for constraint: string |
||
| 469 | if (!is_null($pageStyle) && !is_string($pageStyle)) { |
||
| 470 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($pageStyle, true), gettype($pageStyle)), __LINE__); |
||
| 471 | } |
||
| 472 | $this->PageStyle = $pageStyle; |
||
| 473 | return $this; |
||
| 474 | } |
||
| 475 | /** |
||
| 476 | * Get cpp_header_image value |
||
| 477 | * @return string|null |
||
| 478 | */ |
||
| 479 | public function getCpp_header_image() |
||
| 482 | } |
||
| 483 | /** |
||
| 484 | * Set cpp_header_image value |
||
| 485 | * @param string $cpp_header_image |
||
| 486 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 487 | */ |
||
| 488 | public function setCpp_header_image($cpp_header_image = null) |
||
| 489 | { |
||
| 490 | // validation for constraint: string |
||
| 491 | if (!is_null($cpp_header_image) && !is_string($cpp_header_image)) { |
||
| 492 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cpp_header_image, true), gettype($cpp_header_image)), __LINE__); |
||
| 493 | } |
||
| 494 | $this->cpp_header_image = $this->{'cpp-header-image'} = $cpp_header_image; |
||
| 495 | return $this; |
||
| 496 | } |
||
| 497 | /** |
||
| 498 | * Get cpp_header_border_color value |
||
| 499 | * @return string|null |
||
| 500 | */ |
||
| 501 | public function getCpp_header_border_color() |
||
| 502 | { |
||
| 503 | return $this->{'cpp-header-border-color'}; |
||
| 504 | } |
||
| 505 | /** |
||
| 506 | * Set cpp_header_border_color value |
||
| 507 | * @param string $cpp_header_border_color |
||
| 508 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 509 | */ |
||
| 510 | public function setCpp_header_border_color($cpp_header_border_color = null) |
||
| 511 | { |
||
| 512 | // validation for constraint: string |
||
| 513 | if (!is_null($cpp_header_border_color) && !is_string($cpp_header_border_color)) { |
||
| 514 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cpp_header_border_color, true), gettype($cpp_header_border_color)), __LINE__); |
||
| 515 | } |
||
| 516 | $this->cpp_header_border_color = $this->{'cpp-header-border-color'} = $cpp_header_border_color; |
||
| 517 | return $this; |
||
| 518 | } |
||
| 519 | /** |
||
| 520 | * Get cpp_header_back_color value |
||
| 521 | * @return string|null |
||
| 522 | */ |
||
| 523 | public function getCpp_header_back_color() |
||
| 524 | { |
||
| 525 | return $this->{'cpp-header-back-color'}; |
||
| 526 | } |
||
| 527 | /** |
||
| 528 | * Set cpp_header_back_color value |
||
| 529 | * @param string $cpp_header_back_color |
||
| 530 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 531 | */ |
||
| 532 | public function setCpp_header_back_color($cpp_header_back_color = null) |
||
| 533 | { |
||
| 534 | // validation for constraint: string |
||
| 535 | if (!is_null($cpp_header_back_color) && !is_string($cpp_header_back_color)) { |
||
| 536 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cpp_header_back_color, true), gettype($cpp_header_back_color)), __LINE__); |
||
| 537 | } |
||
| 538 | $this->cpp_header_back_color = $this->{'cpp-header-back-color'} = $cpp_header_back_color; |
||
| 539 | return $this; |
||
| 540 | } |
||
| 541 | /** |
||
| 542 | * Get cpp_payflow_color value |
||
| 543 | * @return string|null |
||
| 544 | */ |
||
| 545 | public function getCpp_payflow_color() |
||
| 546 | { |
||
| 547 | return $this->{'cpp-payflow-color'}; |
||
| 548 | } |
||
| 549 | /** |
||
| 550 | * Set cpp_payflow_color value |
||
| 551 | * @param string $cpp_payflow_color |
||
| 552 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 553 | */ |
||
| 554 | public function setCpp_payflow_color($cpp_payflow_color = null) |
||
| 555 | { |
||
| 556 | // validation for constraint: string |
||
| 557 | if (!is_null($cpp_payflow_color) && !is_string($cpp_payflow_color)) { |
||
| 558 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cpp_payflow_color, true), gettype($cpp_payflow_color)), __LINE__); |
||
| 559 | } |
||
| 560 | $this->cpp_payflow_color = $this->{'cpp-payflow-color'} = $cpp_payflow_color; |
||
| 561 | return $this; |
||
| 562 | } |
||
| 563 | /** |
||
| 564 | * Get FirstName value |
||
| 565 | * @return string|null |
||
| 566 | */ |
||
| 567 | public function getFirstName() |
||
| 568 | { |
||
| 569 | return $this->FirstName; |
||
| 570 | } |
||
| 571 | /** |
||
| 572 | * Set FirstName value |
||
| 573 | * @param string $firstName |
||
| 574 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 575 | */ |
||
| 576 | public function setFirstName($firstName = null) |
||
| 577 | { |
||
| 578 | // validation for constraint: string |
||
| 579 | if (!is_null($firstName) && !is_string($firstName)) { |
||
| 580 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($firstName, true), gettype($firstName)), __LINE__); |
||
| 581 | } |
||
| 582 | $this->FirstName = $firstName; |
||
| 583 | return $this; |
||
| 584 | } |
||
| 585 | /** |
||
| 586 | * Get LastName value |
||
| 587 | * @return string|null |
||
| 588 | */ |
||
| 589 | public function getLastName() |
||
| 590 | { |
||
| 591 | return $this->LastName; |
||
| 592 | } |
||
| 593 | /** |
||
| 594 | * Set LastName value |
||
| 595 | * @param string $lastName |
||
| 596 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 597 | */ |
||
| 598 | public function setLastName($lastName = null) |
||
| 599 | { |
||
| 600 | // validation for constraint: string |
||
| 601 | if (!is_null($lastName) && !is_string($lastName)) { |
||
| 602 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($lastName, true), gettype($lastName)), __LINE__); |
||
| 603 | } |
||
| 604 | $this->LastName = $lastName; |
||
| 605 | return $this; |
||
| 606 | } |
||
| 607 | /** |
||
| 608 | * Get Address value |
||
| 609 | * @return \PayPal\StructType\AddressType|null |
||
| 610 | */ |
||
| 611 | public function getAddress() |
||
| 612 | { |
||
| 613 | return $this->Address; |
||
| 614 | } |
||
| 615 | /** |
||
| 616 | * Set Address value |
||
| 617 | * @param \PayPal\StructType\AddressType $address |
||
| 618 | * @return \PayPal\StructType\SetAccessPermissionsRequestDetailsType |
||
| 619 | */ |
||
| 620 | public function setAddress(\PayPal\StructType\AddressType $address = null) |
||
| 624 | } |
||
| 625 | } |
||
| 626 |