model/AddressInformationV2.js

  1. /**
  2. * DocuSign REST API
  3. * The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
  4. *
  5. * OpenAPI spec version: v2
  6. * Contact: devcenter@docusign.com
  7. *
  8. * NOTE: This class is auto generated. Do not edit the class manually and submit a new issue instead.
  9. *
  10. */
  11. (function(root, factory) {
  12. if (typeof define === 'function' && define.amd) {
  13. // AMD. Register as an anonymous module.
  14. define(['ApiClient'], factory);
  15. } else if (typeof module === 'object' && module.exports) {
  16. // CommonJS-like environments that support module.exports, like Node.
  17. module.exports = factory(require('../ApiClient'));
  18. } else {
  19. // Browser globals (root is window)
  20. if (!root.Docusign) {
  21. root.Docusign = {};
  22. }
  23. root.Docusign.AddressInformationV2 = factory(root.Docusign.ApiClient);
  24. }
  25. }(this, function(ApiClient) {
  26. 'use strict';
  27. /**
  28. * The AddressInformationV2 model module.
  29. * @module model/AddressInformationV2
  30. * @version 3.0.0
  31. */
  32. /**
  33. * Constructs a new <code>AddressInformationV2</code>.
  34. * @alias module:model/AddressInformationV2
  35. * @class
  36. */
  37. var exports = function() {
  38. var _this = this;
  39. };
  40. /**
  41. * Constructs a <code>AddressInformationV2</code> from a plain JavaScript object, optionally creating a new instance.
  42. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  43. * @param {Object} data The plain JavaScript object bearing properties of interest.
  44. * @param {module:model/AddressInformationV2} obj Optional instance to populate.
  45. * @return {module:model/AddressInformationV2} The populated <code>AddressInformationV2</code> instance.
  46. */
  47. exports.constructFromObject = function(data, obj) {
  48. if (data) {
  49. obj = obj || new exports();
  50. if (data.hasOwnProperty('address1')) {
  51. obj['address1'] = ApiClient.convertToType(data['address1'], 'String');
  52. }
  53. if (data.hasOwnProperty('address2')) {
  54. obj['address2'] = ApiClient.convertToType(data['address2'], 'String');
  55. }
  56. if (data.hasOwnProperty('city')) {
  57. obj['city'] = ApiClient.convertToType(data['city'], 'String');
  58. }
  59. if (data.hasOwnProperty('country')) {
  60. obj['country'] = ApiClient.convertToType(data['country'], 'String');
  61. }
  62. if (data.hasOwnProperty('fax')) {
  63. obj['fax'] = ApiClient.convertToType(data['fax'], 'String');
  64. }
  65. if (data.hasOwnProperty('phone')) {
  66. obj['phone'] = ApiClient.convertToType(data['phone'], 'String');
  67. }
  68. if (data.hasOwnProperty('postalCode')) {
  69. obj['postalCode'] = ApiClient.convertToType(data['postalCode'], 'String');
  70. }
  71. if (data.hasOwnProperty('stateOrProvince')) {
  72. obj['stateOrProvince'] = ApiClient.convertToType(data['stateOrProvince'], 'String');
  73. }
  74. }
  75. return obj;
  76. }
  77. /**
  78. * First Line of the address. Maximum length: 100 characters.
  79. * @member {String} address1
  80. */
  81. exports.prototype['address1'] = undefined;
  82. /**
  83. * Second Line of the address. Maximum length: 100 characters.
  84. * @member {String} address2
  85. */
  86. exports.prototype['address2'] = undefined;
  87. /**
  88. *
  89. * @member {String} city
  90. */
  91. exports.prototype['city'] = undefined;
  92. /**
  93. * Specifies the country associated with the address.
  94. * @member {String} country
  95. */
  96. exports.prototype['country'] = undefined;
  97. /**
  98. *
  99. * @member {String} fax
  100. */
  101. exports.prototype['fax'] = undefined;
  102. /**
  103. *
  104. * @member {String} phone
  105. */
  106. exports.prototype['phone'] = undefined;
  107. /**
  108. *
  109. * @member {String} postalCode
  110. */
  111. exports.prototype['postalCode'] = undefined;
  112. /**
  113. * The state or province associated with the address.
  114. * @member {String} stateOrProvince
  115. */
  116. exports.prototype['stateOrProvince'] = undefined;
  117. return exports;
  118. }));