docusign_esign 3.21.0 → 3.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/lib/docusign_esign/api/accounts_api.rb +511 -4
  4. data/lib/docusign_esign/api/billing_api.rb +2 -2
  5. data/lib/docusign_esign/api/envelopes_api.rb +123 -3
  6. data/lib/docusign_esign/api/templates_api.rb +0 -57
  7. data/lib/docusign_esign/client/api_client.rb +1 -1
  8. data/lib/docusign_esign/models/account_information.rb +2 -1
  9. data/lib/docusign_esign/models/account_role_settings.rb +2 -0
  10. data/lib/docusign_esign/models/account_settings_information.rb +103 -15
  11. data/lib/docusign_esign/models/account_shared_access.rb +1 -1
  12. data/lib/docusign_esign/models/account_signature.rb +1 -1
  13. data/lib/docusign_esign/models/account_ui_settings.rb +2 -0
  14. data/lib/docusign_esign/models/agent.rb +13 -3
  15. data/lib/docusign_esign/models/approve.rb +2 -1
  16. data/lib/docusign_esign/models/authorization_user.rb +214 -0
  17. data/lib/docusign_esign/models/billing_charge.rb +1 -1
  18. data/lib/docusign_esign/models/brand.rb +1 -1
  19. data/lib/docusign_esign/models/bulk_envelope.rb +1 -1
  20. data/lib/docusign_esign/models/bulk_sending_copy_recipient.rb +2 -1
  21. data/lib/docusign_esign/models/bulksending_copy_doc_gen_form_field.rb +7 -7
  22. data/lib/docusign_esign/models/captive_recipient.rb +1 -1
  23. data/lib/docusign_esign/models/carbon_copy.rb +13 -3
  24. data/lib/docusign_esign/models/certified_delivery.rb +13 -3
  25. data/lib/docusign_esign/models/checkbox.rb +2 -1
  26. data/lib/docusign_esign/models/cloud_storage_provider.rb +1 -1
  27. data/lib/docusign_esign/models/comment_thread.rb +2 -1
  28. data/lib/docusign_esign/models/commission_county.rb +2 -1
  29. data/lib/docusign_esign/models/commission_expiration.rb +2 -1
  30. data/lib/docusign_esign/models/commission_number.rb +2 -1
  31. data/lib/docusign_esign/models/commission_state.rb +2 -1
  32. data/lib/docusign_esign/models/company.rb +2 -1
  33. data/lib/docusign_esign/models/connect_debug_log.rb +1 -1
  34. data/lib/docusign_esign/models/connect_historical_envelope_republish.rb +1 -0
  35. data/lib/docusign_esign/models/contact.rb +2 -1
  36. data/lib/docusign_esign/models/custom_field.rb +1 -1
  37. data/lib/docusign_esign/models/date.rb +2 -1
  38. data/lib/docusign_esign/models/date_signed.rb +2 -1
  39. data/lib/docusign_esign/models/decline.rb +2 -1
  40. data/lib/docusign_esign/models/delayed_routing.rb +1 -1
  41. data/lib/docusign_esign/models/delegation_info.rb +12 -12
  42. data/lib/docusign_esign/models/doc_gen_form_field_request.rb +186 -0
  43. data/lib/docusign_esign/models/doc_gen_form_field_response.rb +196 -0
  44. data/lib/docusign_esign/models/doc_gen_form_fields.rb +218 -0
  45. data/lib/docusign_esign/models/document_template.rb +1 -1
  46. data/lib/docusign_esign/models/document_visibility.rb +1 -1
  47. data/lib/docusign_esign/models/draw.rb +2 -1
  48. data/lib/docusign_esign/models/editor.rb +13 -3
  49. data/lib/docusign_esign/models/email.rb +2 -1
  50. data/lib/docusign_esign/models/email_address.rb +2 -1
  51. data/lib/docusign_esign/models/envelope.rb +2 -2
  52. data/lib/docusign_esign/models/envelope_attachment.rb +1 -1
  53. data/lib/docusign_esign/models/envelope_definition.rb +2 -2
  54. data/lib/docusign_esign/models/envelope_document.rb +1 -1
  55. data/lib/docusign_esign/models/envelope_id.rb +2 -1
  56. data/lib/docusign_esign/models/envelope_publish_transaction.rb +1 -0
  57. data/lib/docusign_esign/models/envelope_summary.rb +1 -1
  58. data/lib/docusign_esign/models/envelope_template.rb +2 -2
  59. data/lib/docusign_esign/models/envelope_transaction_status.rb +1 -1
  60. data/lib/docusign_esign/models/envelope_update_summary.rb +1 -1
  61. data/lib/docusign_esign/models/external_folder.rb +1 -1
  62. data/lib/docusign_esign/models/favorite_templates_content_item.rb +1 -1
  63. data/lib/docusign_esign/models/favorite_templates_info.rb +1 -1
  64. data/lib/docusign_esign/models/first_name.rb +2 -1
  65. data/lib/docusign_esign/models/folder.rb +1 -1
  66. data/lib/docusign_esign/models/folder_item_v2.rb +1 -1
  67. data/lib/docusign_esign/models/folder_shared_item.rb +1 -1
  68. data/lib/docusign_esign/models/form_data_item.rb +12 -2
  69. data/lib/docusign_esign/models/formula_tab.rb +2 -1
  70. data/lib/docusign_esign/models/full_name.rb +2 -1
  71. data/lib/docusign_esign/models/group.rb +1 -1
  72. data/lib/docusign_esign/models/in_person_signer.rb +13 -3
  73. data/lib/docusign_esign/models/initial_here.rb +3 -2
  74. data/lib/docusign_esign/models/inline_template.rb +2 -2
  75. data/lib/docusign_esign/models/intermediary.rb +13 -3
  76. data/lib/docusign_esign/models/last_name.rb +2 -1
  77. data/lib/docusign_esign/models/list.rb +2 -1
  78. data/lib/docusign_esign/models/list_custom_field.rb +1 -1
  79. data/lib/docusign_esign/models/lock_information.rb +1 -1
  80. data/lib/docusign_esign/models/member_group_shared_item.rb +1 -1
  81. data/lib/docusign_esign/models/member_shared_items.rb +1 -1
  82. data/lib/docusign_esign/models/mobile_notifier_configuration.rb +1 -1
  83. data/lib/docusign_esign/models/name_value.rb +1 -1
  84. data/lib/docusign_esign/models/new_account_definition.rb +2 -2
  85. data/lib/docusign_esign/models/new_user.rb +1 -1
  86. data/lib/docusign_esign/models/notarize.rb +2 -1
  87. data/lib/docusign_esign/models/notary_host.rb +13 -3
  88. data/lib/docusign_esign/models/notary_jurisdiction.rb +1 -1
  89. data/lib/docusign_esign/models/notary_recipient.rb +13 -3
  90. data/lib/docusign_esign/models/notary_seal.rb +2 -1
  91. data/lib/docusign_esign/models/note.rb +2 -1
  92. data/lib/docusign_esign/models/number.rb +2 -1
  93. data/lib/docusign_esign/models/numerical.rb +68 -1
  94. data/lib/docusign_esign/models/page.rb +1 -1
  95. data/lib/docusign_esign/models/participant.rb +33 -1
  96. data/lib/docusign_esign/models/phone_number.rb +2 -1
  97. data/lib/docusign_esign/models/poly_line_overlay.rb +2 -1
  98. data/lib/docusign_esign/models/power_form.rb +1 -1
  99. data/lib/docusign_esign/models/radio.rb +13 -2
  100. data/lib/docusign_esign/models/recipient_form_data.rb +12 -12
  101. data/lib/docusign_esign/models/recipient_update_response.rb +1 -1
  102. data/lib/docusign_esign/models/recipients.rb +1 -1
  103. data/lib/docusign_esign/models/scheduled_sending.rb +1 -1
  104. data/lib/docusign_esign/models/seal_sign.rb +13 -3
  105. data/lib/docusign_esign/models/sender_company.rb +2 -1
  106. data/lib/docusign_esign/models/sender_name.rb +2 -1
  107. data/lib/docusign_esign/models/shared_item.rb +1 -1
  108. data/lib/docusign_esign/models/sign_here.rb +2 -1
  109. data/lib/docusign_esign/models/signer.rb +13 -3
  110. data/lib/docusign_esign/models/signer_attachment.rb +2 -1
  111. data/lib/docusign_esign/models/signing_group.rb +1 -1
  112. data/lib/docusign_esign/models/signing_group_user.rb +1 -1
  113. data/lib/docusign_esign/models/smart_section.rb +4 -3
  114. data/lib/docusign_esign/models/social_account_information.rb +1 -1
  115. data/lib/docusign_esign/models/ssn.rb +2 -1
  116. data/lib/docusign_esign/models/stamp.rb +1 -1
  117. data/lib/docusign_esign/models/tab_account_settings.rb +21 -21
  118. data/lib/docusign_esign/models/tab_group.rb +2 -1
  119. data/lib/docusign_esign/models/tabs.rb +1 -13
  120. data/lib/docusign_esign/models/template_recipients.rb +1 -1
  121. data/lib/docusign_esign/models/template_role.rb +1 -1
  122. data/lib/docusign_esign/models/template_shared_item.rb +1 -1
  123. data/lib/docusign_esign/models/template_summary.rb +1 -1
  124. data/lib/docusign_esign/models/template_tabs.rb +1 -13
  125. data/lib/docusign_esign/models/template_update_summary.rb +1 -1
  126. data/lib/docusign_esign/models/text.rb +2 -1
  127. data/lib/docusign_esign/models/text_custom_field.rb +1 -1
  128. data/lib/docusign_esign/models/title.rb +2 -1
  129. data/lib/docusign_esign/models/user_account_management_granular_information.rb +2 -0
  130. data/lib/docusign_esign/models/user_authorization.rb +274 -0
  131. data/lib/docusign_esign/models/user_authorization_create_request.rb +214 -0
  132. data/lib/docusign_esign/models/user_authorization_create_request_with_id.rb +224 -0
  133. data/lib/docusign_esign/models/user_authorization_id_with_status.rb +204 -0
  134. data/lib/docusign_esign/models/user_authorization_update_request.rb +194 -0
  135. data/lib/docusign_esign/models/user_authorization_with_status.rb +204 -0
  136. data/lib/docusign_esign/models/user_authorizations.rb +246 -0
  137. data/lib/docusign_esign/models/user_authorizations_delete_request.rb +186 -0
  138. data/lib/docusign_esign/models/user_authorizations_delete_response.rb +186 -0
  139. data/lib/docusign_esign/models/user_authorizations_request.rb +186 -0
  140. data/lib/docusign_esign/models/user_authorizations_response.rb +186 -0
  141. data/lib/docusign_esign/models/user_info.rb +12 -2
  142. data/lib/docusign_esign/models/user_information.rb +2 -2
  143. data/lib/docusign_esign/models/user_settings_information.rb +2 -0
  144. data/lib/docusign_esign/models/user_shared_item.rb +1 -1
  145. data/lib/docusign_esign/models/user_signature.rb +1 -1
  146. data/lib/docusign_esign/models/view.rb +2 -1
  147. data/lib/docusign_esign/models/witness.rb +13 -3
  148. data/lib/docusign_esign/models/workspace_user.rb +1 -1
  149. data/lib/docusign_esign/models/workspace_user_authorization.rb +1 -1
  150. data/lib/docusign_esign/models/zip.rb +2 -1
  151. data/lib/docusign_esign/version.rb +1 -1
  152. data/lib/docusign_esign.rb +15 -2
  153. metadata +17 -2
@@ -0,0 +1,186 @@
1
+ =begin
2
+ #DocuSign REST API
3
+
4
+ #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
5
+
6
+ OpenAPI spec version: v2.1
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module DocuSign_eSign
15
+ class UserAuthorizationsDeleteRequest
16
+ #
17
+ attr_accessor :authorizations
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'authorizations' => :'authorizations'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'authorizations' => :'Array<String>'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'authorizations')
42
+ if (value = attributes[:'authorizations']).is_a?(Array)
43
+ self.authorizations = value
44
+ end
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ authorizations == o.authorizations
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [authorizations].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+ self.class.swagger_types.each_pair do |key, type|
87
+ if type =~ /\AArray<(.*)>/i
88
+ # check to ensure the input is an array given that the attribute
89
+ # is documented as an array but the input is not
90
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
91
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
92
+ end
93
+ elsif !attributes[self.class.attribute_map[key]].nil?
94
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
95
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ end
97
+
98
+ self
99
+ end
100
+
101
+ # Deserializes the data based on type
102
+ # @param string type Data type
103
+ # @param string value Value to be deserialized
104
+ # @return [Object] Deserialized data
105
+ def _deserialize(type, value)
106
+ case type.to_sym
107
+ when :DateTime
108
+ DateTime.parse(value)
109
+ when :Date
110
+ Date.parse(value)
111
+ when :String
112
+ value.to_s
113
+ when :Integer
114
+ value.to_i
115
+ when :Float
116
+ value.to_f
117
+ when :BOOLEAN
118
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
119
+ true
120
+ else
121
+ false
122
+ end
123
+ when :Object
124
+ # generic object (usually a Hash), return directly
125
+ value
126
+ when /\AArray<(?<inner_type>.+)>\z/
127
+ inner_type = Regexp.last_match[:inner_type]
128
+ value.map { |v| _deserialize(inner_type, v) }
129
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
130
+ k_type = Regexp.last_match[:k_type]
131
+ v_type = Regexp.last_match[:v_type]
132
+ {}.tap do |hash|
133
+ value.each do |k, v|
134
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
135
+ end
136
+ end
137
+ else # model
138
+ temp_model = DocuSign_eSign.const_get(type).new
139
+ temp_model.build_from_hash(value)
140
+ end
141
+ end
142
+
143
+ # Returns the string representation of the object
144
+ # @return [String] String presentation of the object
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_hash (backward compatibility)
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_body
152
+ to_hash
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ next if value.nil?
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ # Outputs non-array value in the form of hash
168
+ # For object, use to_hash. Otherwise, just return the value
169
+ # @param [Object] value Any valid value
170
+ # @return [Hash] Returns the value in the form of hash
171
+ def _to_hash(value)
172
+ if value.is_a?(Array)
173
+ value.compact.map { |v| _to_hash(v) }
174
+ elsif value.is_a?(Hash)
175
+ {}.tap do |hash|
176
+ value.each { |k, v| hash[k] = _to_hash(v) }
177
+ end
178
+ elsif value.respond_to? :to_hash
179
+ value.to_hash
180
+ else
181
+ value
182
+ end
183
+ end
184
+
185
+ end
186
+ end
@@ -0,0 +1,186 @@
1
+ =begin
2
+ #DocuSign REST API
3
+
4
+ #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
5
+
6
+ OpenAPI spec version: v2.1
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module DocuSign_eSign
15
+ class UserAuthorizationsDeleteResponse
16
+ #
17
+ attr_accessor :results
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'results' => :'results'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'results' => :'Array<UserAuthorizationIdWithStatus>'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'results')
42
+ if (value = attributes[:'results']).is_a?(Array)
43
+ self.results = value
44
+ end
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ results == o.results
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [results].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+ self.class.swagger_types.each_pair do |key, type|
87
+ if type =~ /\AArray<(.*)>/i
88
+ # check to ensure the input is an array given that the attribute
89
+ # is documented as an array but the input is not
90
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
91
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
92
+ end
93
+ elsif !attributes[self.class.attribute_map[key]].nil?
94
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
95
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ end
97
+
98
+ self
99
+ end
100
+
101
+ # Deserializes the data based on type
102
+ # @param string type Data type
103
+ # @param string value Value to be deserialized
104
+ # @return [Object] Deserialized data
105
+ def _deserialize(type, value)
106
+ case type.to_sym
107
+ when :DateTime
108
+ DateTime.parse(value)
109
+ when :Date
110
+ Date.parse(value)
111
+ when :String
112
+ value.to_s
113
+ when :Integer
114
+ value.to_i
115
+ when :Float
116
+ value.to_f
117
+ when :BOOLEAN
118
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
119
+ true
120
+ else
121
+ false
122
+ end
123
+ when :Object
124
+ # generic object (usually a Hash), return directly
125
+ value
126
+ when /\AArray<(?<inner_type>.+)>\z/
127
+ inner_type = Regexp.last_match[:inner_type]
128
+ value.map { |v| _deserialize(inner_type, v) }
129
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
130
+ k_type = Regexp.last_match[:k_type]
131
+ v_type = Regexp.last_match[:v_type]
132
+ {}.tap do |hash|
133
+ value.each do |k, v|
134
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
135
+ end
136
+ end
137
+ else # model
138
+ temp_model = DocuSign_eSign.const_get(type).new
139
+ temp_model.build_from_hash(value)
140
+ end
141
+ end
142
+
143
+ # Returns the string representation of the object
144
+ # @return [String] String presentation of the object
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_hash (backward compatibility)
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_body
152
+ to_hash
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ next if value.nil?
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ # Outputs non-array value in the form of hash
168
+ # For object, use to_hash. Otherwise, just return the value
169
+ # @param [Object] value Any valid value
170
+ # @return [Hash] Returns the value in the form of hash
171
+ def _to_hash(value)
172
+ if value.is_a?(Array)
173
+ value.compact.map { |v| _to_hash(v) }
174
+ elsif value.is_a?(Hash)
175
+ {}.tap do |hash|
176
+ value.each { |k, v| hash[k] = _to_hash(v) }
177
+ end
178
+ elsif value.respond_to? :to_hash
179
+ value.to_hash
180
+ else
181
+ value
182
+ end
183
+ end
184
+
185
+ end
186
+ end
@@ -0,0 +1,186 @@
1
+ =begin
2
+ #DocuSign REST API
3
+
4
+ #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
5
+
6
+ OpenAPI spec version: v2.1
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module DocuSign_eSign
15
+ class UserAuthorizationsRequest
16
+ #
17
+ attr_accessor :authorizations
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'authorizations' => :'authorizations'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'authorizations' => :'Array<UserAuthorizationCreateRequestWithId>'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'authorizations')
42
+ if (value = attributes[:'authorizations']).is_a?(Array)
43
+ self.authorizations = value
44
+ end
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ authorizations == o.authorizations
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [authorizations].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+ self.class.swagger_types.each_pair do |key, type|
87
+ if type =~ /\AArray<(.*)>/i
88
+ # check to ensure the input is an array given that the attribute
89
+ # is documented as an array but the input is not
90
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
91
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
92
+ end
93
+ elsif !attributes[self.class.attribute_map[key]].nil?
94
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
95
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ end
97
+
98
+ self
99
+ end
100
+
101
+ # Deserializes the data based on type
102
+ # @param string type Data type
103
+ # @param string value Value to be deserialized
104
+ # @return [Object] Deserialized data
105
+ def _deserialize(type, value)
106
+ case type.to_sym
107
+ when :DateTime
108
+ DateTime.parse(value)
109
+ when :Date
110
+ Date.parse(value)
111
+ when :String
112
+ value.to_s
113
+ when :Integer
114
+ value.to_i
115
+ when :Float
116
+ value.to_f
117
+ when :BOOLEAN
118
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
119
+ true
120
+ else
121
+ false
122
+ end
123
+ when :Object
124
+ # generic object (usually a Hash), return directly
125
+ value
126
+ when /\AArray<(?<inner_type>.+)>\z/
127
+ inner_type = Regexp.last_match[:inner_type]
128
+ value.map { |v| _deserialize(inner_type, v) }
129
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
130
+ k_type = Regexp.last_match[:k_type]
131
+ v_type = Regexp.last_match[:v_type]
132
+ {}.tap do |hash|
133
+ value.each do |k, v|
134
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
135
+ end
136
+ end
137
+ else # model
138
+ temp_model = DocuSign_eSign.const_get(type).new
139
+ temp_model.build_from_hash(value)
140
+ end
141
+ end
142
+
143
+ # Returns the string representation of the object
144
+ # @return [String] String presentation of the object
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_hash (backward compatibility)
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_body
152
+ to_hash
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ next if value.nil?
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ # Outputs non-array value in the form of hash
168
+ # For object, use to_hash. Otherwise, just return the value
169
+ # @param [Object] value Any valid value
170
+ # @return [Hash] Returns the value in the form of hash
171
+ def _to_hash(value)
172
+ if value.is_a?(Array)
173
+ value.compact.map { |v| _to_hash(v) }
174
+ elsif value.is_a?(Hash)
175
+ {}.tap do |hash|
176
+ value.each { |k, v| hash[k] = _to_hash(v) }
177
+ end
178
+ elsif value.respond_to? :to_hash
179
+ value.to_hash
180
+ else
181
+ value
182
+ end
183
+ end
184
+
185
+ end
186
+ end