PageRenderTime 52ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/include/PayPal/Type/APICredentialsType.php

https://github.com/radicaldesigns/amp
PHP | 131 lines | 93 code | 8 blank | 30 comment | 0 complexity | 7f1919533d82de2c73fa3bea457c80b8 MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0, BSD-3-Clause, LGPL-2.0, CC-BY-SA-3.0, AGPL-1.0
  1. <?php
  2. /**
  3. * @package PayPal
  4. */
  5. /**
  6. * Make sure our parent class is defined.
  7. */
  8. require_once 'PayPal/Type/XSDType.php';
  9. /**
  10. * APICredentialsType
  11. *
  12. * APICredentialsType
  13. *
  14. * @package PayPal
  15. */
  16. class APICredentialsType extends XSDType
  17. {
  18. /**
  19. * Merchant ’s PayPal API username Character length and limitations: 128
  20. * alphanumeric characters
  21. */
  22. var $Username;
  23. /**
  24. * Merchant ’s PayPal API password Character length and limitations: 40
  25. * alphanumeric characters
  26. */
  27. var $Password;
  28. /**
  29. * Merchant ’s PayPal API signature, if one exists.
  30. */
  31. var $Signature;
  32. /**
  33. * Merchant ’s PayPal API certificate in PEM format, if one exists
  34. */
  35. var $Certificate;
  36. /**
  37. * Merchant ’s PayPal API authentication mechanism.
  38. */
  39. var $Type;
  40. function APICredentialsType()
  41. {
  42. parent::XSDType();
  43. $this->_namespace = 'urn:ebay:apis:eBLBaseComponents';
  44. $this->_elements = array_merge($this->_elements,
  45. array (
  46. 'Username' =>
  47. array (
  48. 'required' => true,
  49. 'type' => 'string',
  50. 'namespace' => 'urn:ebay:apis:eBLBaseComponents',
  51. ),
  52. 'Password' =>
  53. array (
  54. 'required' => true,
  55. 'type' => 'string',
  56. 'namespace' => 'urn:ebay:apis:eBLBaseComponents',
  57. ),
  58. 'Signature' =>
  59. array (
  60. 'required' => false,
  61. 'type' => 'string',
  62. 'namespace' => 'urn:ebay:apis:eBLBaseComponents',
  63. ),
  64. 'Certificate' =>
  65. array (
  66. 'required' => false,
  67. 'type' => 'string',
  68. 'namespace' => 'urn:ebay:apis:eBLBaseComponents',
  69. ),
  70. 'Type' =>
  71. array (
  72. 'required' => true,
  73. 'type' => 'APIAuthenticationType',
  74. 'namespace' => 'urn:ebay:apis:eBLBaseComponents',
  75. ),
  76. ));
  77. }
  78. function getUsername()
  79. {
  80. return $this->Username;
  81. }
  82. function setUsername($Username, $charset = 'iso-8859-1')
  83. {
  84. $this->Username = $Username;
  85. $this->_elements['Username']['charset'] = $charset;
  86. }
  87. function getPassword()
  88. {
  89. return $this->Password;
  90. }
  91. function setPassword($Password, $charset = 'iso-8859-1')
  92. {
  93. $this->Password = $Password;
  94. $this->_elements['Password']['charset'] = $charset;
  95. }
  96. function getSignature()
  97. {
  98. return $this->Signature;
  99. }
  100. function setSignature($Signature, $charset = 'iso-8859-1')
  101. {
  102. $this->Signature = $Signature;
  103. $this->_elements['Signature']['charset'] = $charset;
  104. }
  105. function getCertificate()
  106. {
  107. return $this->Certificate;
  108. }
  109. function setCertificate($Certificate, $charset = 'iso-8859-1')
  110. {
  111. $this->Certificate = $Certificate;
  112. $this->_elements['Certificate']['charset'] = $charset;
  113. }
  114. function getType()
  115. {
  116. return $this->Type;
  117. }
  118. function setType($Type, $charset = 'iso-8859-1')
  119. {
  120. $this->Type = $Type;
  121. $this->_elements['Type']['charset'] = $charset;
  122. }
  123. }