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,214 @@
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 UserAuthorizationCreateRequest
16
+ #
17
+ attr_accessor :agent_user
18
+
19
+ #
20
+ attr_accessor :end_date
21
+
22
+ #
23
+ attr_accessor :permission
24
+
25
+ #
26
+ attr_accessor :start_date
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'agent_user' => :'agentUser',
32
+ :'end_date' => :'endDate',
33
+ :'permission' => :'permission',
34
+ :'start_date' => :'startDate'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'agent_user' => :'AuthorizationUser',
42
+ :'end_date' => :'String',
43
+ :'permission' => :'String',
44
+ :'start_date' => :'String'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ return unless attributes.is_a?(Hash)
52
+
53
+ # convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
55
+
56
+ if attributes.has_key?(:'agentUser')
57
+ self.agent_user = attributes[:'agentUser']
58
+ end
59
+
60
+ if attributes.has_key?(:'endDate')
61
+ self.end_date = attributes[:'endDate']
62
+ end
63
+
64
+ if attributes.has_key?(:'permission')
65
+ self.permission = attributes[:'permission']
66
+ end
67
+
68
+ if attributes.has_key?(:'startDate')
69
+ self.start_date = attributes[:'startDate']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ agent_user == o.agent_user &&
92
+ end_date == o.end_date &&
93
+ permission == o.permission &&
94
+ start_date == o.start_date
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Fixnum] Hash code
105
+ def hash
106
+ [agent_user, end_date, permission, start_date].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ self.class.swagger_types.each_pair do |key, type|
115
+ if type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :DateTime
136
+ DateTime.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :BOOLEAN
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ temp_model = DocuSign_eSign.const_get(type).new
167
+ temp_model.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ next if value.nil?
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+
213
+ end
214
+ end
@@ -0,0 +1,224 @@
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 UserAuthorizationCreateRequestWithId
16
+ #
17
+ attr_accessor :agent_user
18
+
19
+ #
20
+ attr_accessor :authorization_id
21
+
22
+ #
23
+ attr_accessor :end_date
24
+
25
+ #
26
+ attr_accessor :permission
27
+
28
+ #
29
+ attr_accessor :start_date
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'agent_user' => :'agentUser',
35
+ :'authorization_id' => :'authorizationId',
36
+ :'end_date' => :'endDate',
37
+ :'permission' => :'permission',
38
+ :'start_date' => :'startDate'
39
+ }
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.swagger_types
44
+ {
45
+ :'agent_user' => :'AuthorizationUser',
46
+ :'authorization_id' => :'String',
47
+ :'end_date' => :'String',
48
+ :'permission' => :'String',
49
+ :'start_date' => :'String'
50
+ }
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ return unless attributes.is_a?(Hash)
57
+
58
+ # convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
60
+
61
+ if attributes.has_key?(:'agentUser')
62
+ self.agent_user = attributes[:'agentUser']
63
+ end
64
+
65
+ if attributes.has_key?(:'authorizationId')
66
+ self.authorization_id = attributes[:'authorizationId']
67
+ end
68
+
69
+ if attributes.has_key?(:'endDate')
70
+ self.end_date = attributes[:'endDate']
71
+ end
72
+
73
+ if attributes.has_key?(:'permission')
74
+ self.permission = attributes[:'permission']
75
+ end
76
+
77
+ if attributes.has_key?(:'startDate')
78
+ self.start_date = attributes[:'startDate']
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(o)
98
+ return true if self.equal?(o)
99
+ self.class == o.class &&
100
+ agent_user == o.agent_user &&
101
+ authorization_id == o.authorization_id &&
102
+ end_date == o.end_date &&
103
+ permission == o.permission &&
104
+ start_date == o.start_date
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Fixnum] Hash code
115
+ def hash
116
+ [agent_user, authorization_id, end_date, permission, start_date].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def build_from_hash(attributes)
123
+ return nil unless attributes.is_a?(Hash)
124
+ self.class.swagger_types.each_pair do |key, type|
125
+ if type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :DateTime
146
+ DateTime.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :BOOLEAN
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ temp_model = DocuSign_eSign.const_get(type).new
177
+ temp_model.build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ next if value.nil?
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+
223
+ end
224
+ end
@@ -0,0 +1,204 @@
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 UserAuthorizationIdWithStatus
16
+ #
17
+ attr_accessor :authorization_id
18
+
19
+ #
20
+ attr_accessor :error_message
21
+
22
+ #
23
+ attr_accessor :success
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'authorization_id' => :'authorizationId',
29
+ :'error_message' => :'errorMessage',
30
+ :'success' => :'success'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'authorization_id' => :'String',
38
+ :'error_message' => :'String',
39
+ :'success' => :'String'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
+
51
+ if attributes.has_key?(:'authorizationId')
52
+ self.authorization_id = attributes[:'authorizationId']
53
+ end
54
+
55
+ if attributes.has_key?(:'errorMessage')
56
+ self.error_message = attributes[:'errorMessage']
57
+ end
58
+
59
+ if attributes.has_key?(:'success')
60
+ self.success = attributes[:'success']
61
+ end
62
+ end
63
+
64
+ # Show invalid properties with the reasons. Usually used together with valid?
65
+ # @return Array for valid properties with the reasons
66
+ def list_invalid_properties
67
+ invalid_properties = Array.new
68
+ invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ authorization_id == o.authorization_id &&
83
+ error_message == o.error_message &&
84
+ success == o.success
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Fixnum] Hash code
95
+ def hash
96
+ [authorization_id, error_message, success].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+ self.class.swagger_types.each_pair do |key, type|
105
+ if type =~ /\AArray<(.*)>/i
106
+ # check to ensure the input is an array given that the attribute
107
+ # is documented as an array but the input is not
108
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
109
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
110
+ end
111
+ elsif !attributes[self.class.attribute_map[key]].nil?
112
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
113
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
114
+ end
115
+
116
+ self
117
+ end
118
+
119
+ # Deserializes the data based on type
120
+ # @param string type Data type
121
+ # @param string value Value to be deserialized
122
+ # @return [Object] Deserialized data
123
+ def _deserialize(type, value)
124
+ case type.to_sym
125
+ when :DateTime
126
+ DateTime.parse(value)
127
+ when :Date
128
+ Date.parse(value)
129
+ when :String
130
+ value.to_s
131
+ when :Integer
132
+ value.to_i
133
+ when :Float
134
+ value.to_f
135
+ when :BOOLEAN
136
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
137
+ true
138
+ else
139
+ false
140
+ end
141
+ when :Object
142
+ # generic object (usually a Hash), return directly
143
+ value
144
+ when /\AArray<(?<inner_type>.+)>\z/
145
+ inner_type = Regexp.last_match[:inner_type]
146
+ value.map { |v| _deserialize(inner_type, v) }
147
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
148
+ k_type = Regexp.last_match[:k_type]
149
+ v_type = Regexp.last_match[:v_type]
150
+ {}.tap do |hash|
151
+ value.each do |k, v|
152
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
153
+ end
154
+ end
155
+ else # model
156
+ temp_model = DocuSign_eSign.const_get(type).new
157
+ temp_model.build_from_hash(value)
158
+ end
159
+ end
160
+
161
+ # Returns the string representation of the object
162
+ # @return [String] String presentation of the object
163
+ def to_s
164
+ to_hash.to_s
165
+ end
166
+
167
+ # to_body is an alias to to_hash (backward compatibility)
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_body
170
+ to_hash
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ next if value.nil?
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ # Outputs non-array value in the form of hash
186
+ # For object, use to_hash. Otherwise, just return the value
187
+ # @param [Object] value Any valid value
188
+ # @return [Hash] Returns the value in the form of hash
189
+ def _to_hash(value)
190
+ if value.is_a?(Array)
191
+ value.compact.map { |v| _to_hash(v) }
192
+ elsif value.is_a?(Hash)
193
+ {}.tap do |hash|
194
+ value.each { |k, v| hash[k] = _to_hash(v) }
195
+ end
196
+ elsif value.respond_to? :to_hash
197
+ value.to_hash
198
+ else
199
+ value
200
+ end
201
+ end
202
+
203
+ end
204
+ end