docusign_webforms 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +38 -0
- data/Gemfile +7 -0
- data/README.md +132 -0
- data/Rakefile +8 -0
- data/docusign_webforms.gemspec +48 -0
- data/lib/docusign_webforms/api/form_instance_management_api.rb +272 -0
- data/lib/docusign_webforms/api/form_management_api.rb +192 -0
- data/lib/docusign_webforms/client/api_client.rb +600 -0
- data/lib/docusign_webforms/client/api_error.rb +37 -0
- data/lib/docusign_webforms/client/auth/oauth.rb +1061 -0
- data/lib/docusign_webforms/configuration.rb +203 -0
- data/lib/docusign_webforms/models/account_id.rb +175 -0
- data/lib/docusign_webforms/models/assertion_id.rb +175 -0
- data/lib/docusign_webforms/models/authentication_instant.rb +175 -0
- data/lib/docusign_webforms/models/authentication_method.rb +45 -0
- data/lib/docusign_webforms/models/brand_id.rb +175 -0
- data/lib/docusign_webforms/models/client_user_id.rb +175 -0
- data/lib/docusign_webforms/models/component_key.rb +174 -0
- data/lib/docusign_webforms/models/count.rb +175 -0
- data/lib/docusign_webforms/models/create_instance_request_body.rb +264 -0
- data/lib/docusign_webforms/models/created_date_time.rb +175 -0
- data/lib/docusign_webforms/models/date_time.rb +174 -0
- data/lib/docusign_webforms/models/envelope_id.rb +175 -0
- data/lib/docusign_webforms/models/expiration_date_time.rb +175 -0
- data/lib/docusign_webforms/models/expiration_offset.rb +175 -0
- data/lib/docusign_webforms/models/form_sort_by.rb +175 -0
- data/lib/docusign_webforms/models/form_url.rb +175 -0
- data/lib/docusign_webforms/models/guid.rb +174 -0
- data/lib/docusign_webforms/models/http_error.rb +195 -0
- data/lib/docusign_webforms/models/http_success.rb +184 -0
- data/lib/docusign_webforms/models/instance_id.rb +175 -0
- data/lib/docusign_webforms/models/instance_source.rb +31 -0
- data/lib/docusign_webforms/models/instance_status.rb +31 -0
- data/lib/docusign_webforms/models/instance_token.rb +175 -0
- data/lib/docusign_webforms/models/is_private_access.rb +175 -0
- data/lib/docusign_webforms/models/is_published.rb +175 -0
- data/lib/docusign_webforms/models/is_standalone.rb +175 -0
- data/lib/docusign_webforms/models/last_modified_date_time.rb +175 -0
- data/lib/docusign_webforms/models/return_url.rb +175 -0
- data/lib/docusign_webforms/models/search_text.rb +175 -0
- data/lib/docusign_webforms/models/security_domain.rb +175 -0
- data/lib/docusign_webforms/models/source.rb +31 -0
- data/lib/docusign_webforms/models/start_position.rb +175 -0
- data/lib/docusign_webforms/models/tags.rb +175 -0
- data/lib/docusign_webforms/models/template_properties.rb +217 -0
- data/lib/docusign_webforms/models/token_expiration_date_time.rb +175 -0
- data/lib/docusign_webforms/models/update_instance_request_body.rb +184 -0
- data/lib/docusign_webforms/models/user_filter.rb +30 -0
- data/lib/docusign_webforms/models/user_id.rb +175 -0
- data/lib/docusign_webforms/models/web_form.rb +268 -0
- data/lib/docusign_webforms/models/web_form_adm_type.rb +39 -0
- data/lib/docusign_webforms/models/web_form_component.rb +248 -0
- data/lib/docusign_webforms/models/web_form_component_type.rb +34 -0
- data/lib/docusign_webforms/models/web_form_components_map.rb +175 -0
- data/lib/docusign_webforms/models/web_form_content.rb +217 -0
- data/lib/docusign_webforms/models/web_form_id.rb +175 -0
- data/lib/docusign_webforms/models/web_form_instance.rb +295 -0
- data/lib/docusign_webforms/models/web_form_instance_envelopes.rb +183 -0
- data/lib/docusign_webforms/models/web_form_instance_list.rb +187 -0
- data/lib/docusign_webforms/models/web_form_instance_metadata.rb +237 -0
- data/lib/docusign_webforms/models/web_form_metadata.rb +377 -0
- data/lib/docusign_webforms/models/web_form_name.rb +175 -0
- data/lib/docusign_webforms/models/web_form_properties.rb +193 -0
- data/lib/docusign_webforms/models/web_form_published_names.rb +175 -0
- data/lib/docusign_webforms/models/web_form_source.rb +29 -0
- data/lib/docusign_webforms/models/web_form_state.rb +29 -0
- data/lib/docusign_webforms/models/web_form_summary.rb +250 -0
- data/lib/docusign_webforms/models/web_form_summary_list.rb +247 -0
- data/lib/docusign_webforms/models/web_form_user_info.rb +209 -0
- data/lib/docusign_webforms/models/web_form_values.rb +175 -0
- data/lib/docusign_webforms/models/web_form_version_id.rb +175 -0
- data/lib/docusign_webforms/version.rb +14 -0
- data/lib/docusign_webforms.rb +65 -0
- data/runLinter.sh +1 -0
- data/tests/Gemfile +5 -0
- data/tests/spec/unit_tests_using_jwt_spec.rb +38 -0
- metadata +382 -0
@@ -0,0 +1,237 @@
|
|
1
|
+
=begin
|
2
|
+
#Web Forms API version 1.1
|
3
|
+
|
4
|
+
#The Web Forms API facilitates generating semantic HTML forms around everyday contracts.
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.1.0
|
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_WebForms
|
15
|
+
# Web Form Instance metadata containing information like created by, created time, etc.
|
16
|
+
class WebFormInstanceMetadata
|
17
|
+
attr_accessor :expiration_date_time
|
18
|
+
|
19
|
+
attr_accessor :created_date_time
|
20
|
+
|
21
|
+
# The user that created the Web Form Instance
|
22
|
+
attr_accessor :created_by
|
23
|
+
|
24
|
+
attr_accessor :last_modified_date_time
|
25
|
+
|
26
|
+
# The user that last modified the Web Form Instance
|
27
|
+
attr_accessor :last_modified_by
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'expiration_date_time' => :'expirationDateTime',
|
33
|
+
:'created_date_time' => :'createdDateTime',
|
34
|
+
:'created_by' => :'createdBy',
|
35
|
+
:'last_modified_date_time' => :'lastModifiedDateTime',
|
36
|
+
:'last_modified_by' => :'lastModifiedBy'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.swagger_types
|
42
|
+
{
|
43
|
+
:'expiration_date_time' => :'DateTime',
|
44
|
+
:'created_date_time' => :'DateTime',
|
45
|
+
:'created_by' => :'WebFormUserInfo',
|
46
|
+
:'last_modified_date_time' => :'String',
|
47
|
+
:'last_modified_by' => :'WebFormUserInfo'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
return unless attributes.is_a?(Hash)
|
55
|
+
|
56
|
+
# convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
|
+
|
59
|
+
if attributes.has_key?(:'expirationDateTime')
|
60
|
+
self.expiration_date_time = attributes[:'expirationDateTime']
|
61
|
+
end
|
62
|
+
|
63
|
+
if attributes.has_key?(:'createdDateTime')
|
64
|
+
self.created_date_time = attributes[:'createdDateTime']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'createdBy')
|
68
|
+
self.created_by = attributes[:'createdBy']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'lastModifiedDateTime')
|
72
|
+
self.last_modified_date_time = attributes[:'lastModifiedDateTime']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'lastModifiedBy')
|
76
|
+
self.last_modified_by = attributes[:'lastModifiedBy']
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
invalid_properties = Array.new
|
84
|
+
if @expiration_date_time.nil?
|
85
|
+
invalid_properties.push('invalid value for "expiration_date_time", expiration_date_time cannot be nil.')
|
86
|
+
end
|
87
|
+
|
88
|
+
if @created_date_time.nil?
|
89
|
+
invalid_properties.push('invalid value for "created_date_time", created_date_time cannot be nil.')
|
90
|
+
end
|
91
|
+
|
92
|
+
if @created_by.nil?
|
93
|
+
invalid_properties.push('invalid value for "created_by", created_by cannot be nil.')
|
94
|
+
end
|
95
|
+
|
96
|
+
invalid_properties
|
97
|
+
end
|
98
|
+
|
99
|
+
# Check to see if the all the properties in the model are valid
|
100
|
+
# @return true if the model is valid
|
101
|
+
def valid?
|
102
|
+
return false if @expiration_date_time.nil?
|
103
|
+
return false if @created_date_time.nil?
|
104
|
+
return false if @created_by.nil?
|
105
|
+
true
|
106
|
+
end
|
107
|
+
|
108
|
+
# Checks equality by comparing each attribute.
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def ==(o)
|
111
|
+
return true if self.equal?(o)
|
112
|
+
self.class == o.class &&
|
113
|
+
expiration_date_time == o.expiration_date_time &&
|
114
|
+
created_date_time == o.created_date_time &&
|
115
|
+
created_by == o.created_by &&
|
116
|
+
last_modified_date_time == o.last_modified_date_time &&
|
117
|
+
last_modified_by == o.last_modified_by
|
118
|
+
end
|
119
|
+
|
120
|
+
# @see the `==` method
|
121
|
+
# @param [Object] Object to be compared
|
122
|
+
def eql?(o)
|
123
|
+
self == o
|
124
|
+
end
|
125
|
+
|
126
|
+
# Calculates hash code according to all attributes.
|
127
|
+
# @return [Fixnum] Hash code
|
128
|
+
def hash
|
129
|
+
[expiration_date_time, created_date_time, created_by, last_modified_date_time, last_modified_by].hash
|
130
|
+
end
|
131
|
+
|
132
|
+
# Builds the object from hash
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
+
# @return [Object] Returns the model itself
|
135
|
+
def build_from_hash(attributes)
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
137
|
+
self.class.swagger_types.each_pair do |key, type|
|
138
|
+
if type =~ /\AArray<(.*)>/i
|
139
|
+
# check to ensure the input is an array given that the attribute
|
140
|
+
# is documented as an array but the input is not
|
141
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
142
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
143
|
+
end
|
144
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
145
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
146
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
147
|
+
end
|
148
|
+
|
149
|
+
self
|
150
|
+
end
|
151
|
+
|
152
|
+
# Deserializes the data based on type
|
153
|
+
# @param string type Data type
|
154
|
+
# @param string value Value to be deserialized
|
155
|
+
# @return [Object] Deserialized data
|
156
|
+
def _deserialize(type, value)
|
157
|
+
case type.to_sym
|
158
|
+
when :DateTime
|
159
|
+
DateTime.parse(value)
|
160
|
+
when :Date
|
161
|
+
Date.parse(value)
|
162
|
+
when :String
|
163
|
+
value.to_s
|
164
|
+
when :Integer
|
165
|
+
value.to_i
|
166
|
+
when :Float
|
167
|
+
value.to_f
|
168
|
+
when :BOOLEAN
|
169
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
170
|
+
true
|
171
|
+
else
|
172
|
+
false
|
173
|
+
end
|
174
|
+
when :Object
|
175
|
+
# generic object (usually a Hash), return directly
|
176
|
+
value
|
177
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
178
|
+
inner_type = Regexp.last_match[:inner_type]
|
179
|
+
value.map { |v| _deserialize(inner_type, v) }
|
180
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
181
|
+
k_type = Regexp.last_match[:k_type]
|
182
|
+
v_type = Regexp.last_match[:v_type]
|
183
|
+
{}.tap do |hash|
|
184
|
+
value.each do |k, v|
|
185
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
else # model
|
189
|
+
temp_model = DocuSign_WebForms.const_get(type).new
|
190
|
+
temp_model.build_from_hash(value)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the string representation of the object
|
195
|
+
# @return [String] String presentation of the object
|
196
|
+
def to_s
|
197
|
+
to_hash.to_s
|
198
|
+
end
|
199
|
+
|
200
|
+
# to_body is an alias to to_hash (backward compatibility)
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
202
|
+
def to_body
|
203
|
+
to_hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Returns the object in the form of hash
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
208
|
+
def to_hash
|
209
|
+
hash = {}
|
210
|
+
self.class.attribute_map.each_pair do |attr, param|
|
211
|
+
value = self.send(attr)
|
212
|
+
next if value.nil?
|
213
|
+
hash[param] = _to_hash(value)
|
214
|
+
end
|
215
|
+
hash
|
216
|
+
end
|
217
|
+
|
218
|
+
# Outputs non-array value in the form of hash
|
219
|
+
# For object, use to_hash. Otherwise, just return the value
|
220
|
+
# @param [Object] value Any valid value
|
221
|
+
# @return [Hash] Returns the value in the form of hash
|
222
|
+
def _to_hash(value)
|
223
|
+
if value.is_a?(Array)
|
224
|
+
value.compact.map { |v| _to_hash(v) }
|
225
|
+
elsif value.is_a?(Hash)
|
226
|
+
{}.tap do |hash|
|
227
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
228
|
+
end
|
229
|
+
elsif value.respond_to? :to_hash
|
230
|
+
value.to_hash
|
231
|
+
else
|
232
|
+
value
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
end
|
237
|
+
end
|
@@ -0,0 +1,377 @@
|
|
1
|
+
=begin
|
2
|
+
#Web Forms API version 1.1
|
3
|
+
|
4
|
+
#The Web Forms API facilitates generating semantic HTML forms around everyday contracts.
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.1.0
|
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_WebForms
|
15
|
+
# Form metadata
|
16
|
+
class WebFormMetadata
|
17
|
+
# The source from which the webform is created. Accepted values are [upload, templates, blank]
|
18
|
+
attr_accessor :source
|
19
|
+
|
20
|
+
# The user that created the form or has been transferred ownership
|
21
|
+
attr_accessor :owner
|
22
|
+
|
23
|
+
# The user that has added their consent to the form for sending actions
|
24
|
+
attr_accessor :sender
|
25
|
+
|
26
|
+
# Track the user that last modified anything related to the form
|
27
|
+
attr_accessor :last_modified_by
|
28
|
+
|
29
|
+
# Track the user that last modified the form content
|
30
|
+
attr_accessor :form_content_modified_by
|
31
|
+
|
32
|
+
# Track the user that last modified the form properties
|
33
|
+
attr_accessor :form_properties_modified_by
|
34
|
+
|
35
|
+
# Track the user that last published a draft version to active
|
36
|
+
attr_accessor :last_published_by
|
37
|
+
|
38
|
+
# Track the user that last unpublished an active version
|
39
|
+
attr_accessor :last_enabled_by
|
40
|
+
|
41
|
+
# Track the user that last unpublished an active version
|
42
|
+
attr_accessor :last_disabled_by
|
43
|
+
|
44
|
+
# The last time the web form was archived
|
45
|
+
attr_accessor :archived_date_time
|
46
|
+
|
47
|
+
# Track the time the web form was created
|
48
|
+
attr_accessor :created_date_time
|
49
|
+
|
50
|
+
# The last time anything was modified on the form
|
51
|
+
attr_accessor :last_modified_date_time
|
52
|
+
|
53
|
+
# Track the last time web form content changed.
|
54
|
+
attr_accessor :form_content_modified_date_time
|
55
|
+
|
56
|
+
# Track the last time the form properties changed.
|
57
|
+
attr_accessor :form_properties_modified_date_time
|
58
|
+
|
59
|
+
# Track the last time a draft version was published to active
|
60
|
+
attr_accessor :last_published_date_time
|
61
|
+
|
62
|
+
# Track the last time the form was enabled
|
63
|
+
attr_accessor :last_enabled_date_time
|
64
|
+
|
65
|
+
# Track the last time the form was disabled
|
66
|
+
attr_accessor :last_disabled_date_time
|
67
|
+
|
68
|
+
# Track the last time a user added their consent for the form.
|
69
|
+
attr_accessor :last_sender_consent_date_time
|
70
|
+
|
71
|
+
# The public friendly slug that is used to access the form from the player
|
72
|
+
attr_accessor :published_slug
|
73
|
+
|
74
|
+
# A dictionary containing the mapping of component names to their respective component types for all the published components.
|
75
|
+
attr_accessor :published_component_names
|
76
|
+
|
77
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
78
|
+
def self.attribute_map
|
79
|
+
{
|
80
|
+
:'source' => :'source',
|
81
|
+
:'owner' => :'owner',
|
82
|
+
:'sender' => :'sender',
|
83
|
+
:'last_modified_by' => :'lastModifiedBy',
|
84
|
+
:'form_content_modified_by' => :'formContentModifiedBy',
|
85
|
+
:'form_properties_modified_by' => :'formPropertiesModifiedBy',
|
86
|
+
:'last_published_by' => :'lastPublishedBy',
|
87
|
+
:'last_enabled_by' => :'lastEnabledBy',
|
88
|
+
:'last_disabled_by' => :'lastDisabledBy',
|
89
|
+
:'archived_date_time' => :'archivedDateTime',
|
90
|
+
:'created_date_time' => :'createdDateTime',
|
91
|
+
:'last_modified_date_time' => :'lastModifiedDateTime',
|
92
|
+
:'form_content_modified_date_time' => :'formContentModifiedDateTime',
|
93
|
+
:'form_properties_modified_date_time' => :'formPropertiesModifiedDateTime',
|
94
|
+
:'last_published_date_time' => :'lastPublishedDateTime',
|
95
|
+
:'last_enabled_date_time' => :'lastEnabledDateTime',
|
96
|
+
:'last_disabled_date_time' => :'lastDisabledDateTime',
|
97
|
+
:'last_sender_consent_date_time' => :'lastSenderConsentDateTime',
|
98
|
+
:'published_slug' => :'publishedSlug',
|
99
|
+
:'published_component_names' => :'publishedComponentNames'
|
100
|
+
}
|
101
|
+
end
|
102
|
+
|
103
|
+
# Attribute type mapping.
|
104
|
+
def self.swagger_types
|
105
|
+
{
|
106
|
+
:'source' => :'WebFormSource',
|
107
|
+
:'owner' => :'WebFormUserInfo',
|
108
|
+
:'sender' => :'WebFormUserInfo',
|
109
|
+
:'last_modified_by' => :'WebFormUserInfo',
|
110
|
+
:'form_content_modified_by' => :'WebFormUserInfo',
|
111
|
+
:'form_properties_modified_by' => :'WebFormUserInfo',
|
112
|
+
:'last_published_by' => :'WebFormUserInfo',
|
113
|
+
:'last_enabled_by' => :'WebFormUserInfo',
|
114
|
+
:'last_disabled_by' => :'WebFormUserInfo',
|
115
|
+
:'archived_date_time' => :'DateTime',
|
116
|
+
:'created_date_time' => :'DateTime',
|
117
|
+
:'last_modified_date_time' => :'DateTime',
|
118
|
+
:'form_content_modified_date_time' => :'DateTime',
|
119
|
+
:'form_properties_modified_date_time' => :'DateTime',
|
120
|
+
:'last_published_date_time' => :'DateTime',
|
121
|
+
:'last_enabled_date_time' => :'DateTime',
|
122
|
+
:'last_disabled_date_time' => :'DateTime',
|
123
|
+
:'last_sender_consent_date_time' => :'DateTime',
|
124
|
+
:'published_slug' => :'String',
|
125
|
+
:'published_component_names' => :'Hash<String, WebFormComponentType>'
|
126
|
+
}
|
127
|
+
end
|
128
|
+
|
129
|
+
# Initializes the object
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
+
def initialize(attributes = {})
|
132
|
+
return unless attributes.is_a?(Hash)
|
133
|
+
|
134
|
+
# convert string to symbol for hash key
|
135
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
136
|
+
|
137
|
+
if attributes.has_key?(:'source')
|
138
|
+
self.source = attributes[:'source']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.has_key?(:'owner')
|
142
|
+
self.owner = attributes[:'owner']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'sender')
|
146
|
+
self.sender = attributes[:'sender']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.has_key?(:'lastModifiedBy')
|
150
|
+
self.last_modified_by = attributes[:'lastModifiedBy']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.has_key?(:'formContentModifiedBy')
|
154
|
+
self.form_content_modified_by = attributes[:'formContentModifiedBy']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.has_key?(:'formPropertiesModifiedBy')
|
158
|
+
self.form_properties_modified_by = attributes[:'formPropertiesModifiedBy']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.has_key?(:'lastPublishedBy')
|
162
|
+
self.last_published_by = attributes[:'lastPublishedBy']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.has_key?(:'lastEnabledBy')
|
166
|
+
self.last_enabled_by = attributes[:'lastEnabledBy']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.has_key?(:'lastDisabledBy')
|
170
|
+
self.last_disabled_by = attributes[:'lastDisabledBy']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.has_key?(:'archivedDateTime')
|
174
|
+
self.archived_date_time = attributes[:'archivedDateTime']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.has_key?(:'createdDateTime')
|
178
|
+
self.created_date_time = attributes[:'createdDateTime']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.has_key?(:'lastModifiedDateTime')
|
182
|
+
self.last_modified_date_time = attributes[:'lastModifiedDateTime']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.has_key?(:'formContentModifiedDateTime')
|
186
|
+
self.form_content_modified_date_time = attributes[:'formContentModifiedDateTime']
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes.has_key?(:'formPropertiesModifiedDateTime')
|
190
|
+
self.form_properties_modified_date_time = attributes[:'formPropertiesModifiedDateTime']
|
191
|
+
end
|
192
|
+
|
193
|
+
if attributes.has_key?(:'lastPublishedDateTime')
|
194
|
+
self.last_published_date_time = attributes[:'lastPublishedDateTime']
|
195
|
+
end
|
196
|
+
|
197
|
+
if attributes.has_key?(:'lastEnabledDateTime')
|
198
|
+
self.last_enabled_date_time = attributes[:'lastEnabledDateTime']
|
199
|
+
end
|
200
|
+
|
201
|
+
if attributes.has_key?(:'lastDisabledDateTime')
|
202
|
+
self.last_disabled_date_time = attributes[:'lastDisabledDateTime']
|
203
|
+
end
|
204
|
+
|
205
|
+
if attributes.has_key?(:'lastSenderConsentDateTime')
|
206
|
+
self.last_sender_consent_date_time = attributes[:'lastSenderConsentDateTime']
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes.has_key?(:'publishedSlug')
|
210
|
+
self.published_slug = attributes[:'publishedSlug']
|
211
|
+
end
|
212
|
+
|
213
|
+
if attributes.has_key?(:'publishedComponentNames')
|
214
|
+
if (value = attributes[:'publishedComponentNames']).is_a?(Hash)
|
215
|
+
self.published_component_names = value
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
221
|
+
# @return Array for valid properties with the reasons
|
222
|
+
def list_invalid_properties
|
223
|
+
invalid_properties = Array.new
|
224
|
+
invalid_properties
|
225
|
+
end
|
226
|
+
|
227
|
+
# Check to see if the all the properties in the model are valid
|
228
|
+
# @return true if the model is valid
|
229
|
+
def valid?
|
230
|
+
true
|
231
|
+
end
|
232
|
+
|
233
|
+
# Checks equality by comparing each attribute.
|
234
|
+
# @param [Object] Object to be compared
|
235
|
+
def ==(o)
|
236
|
+
return true if self.equal?(o)
|
237
|
+
self.class == o.class &&
|
238
|
+
source == o.source &&
|
239
|
+
owner == o.owner &&
|
240
|
+
sender == o.sender &&
|
241
|
+
last_modified_by == o.last_modified_by &&
|
242
|
+
form_content_modified_by == o.form_content_modified_by &&
|
243
|
+
form_properties_modified_by == o.form_properties_modified_by &&
|
244
|
+
last_published_by == o.last_published_by &&
|
245
|
+
last_enabled_by == o.last_enabled_by &&
|
246
|
+
last_disabled_by == o.last_disabled_by &&
|
247
|
+
archived_date_time == o.archived_date_time &&
|
248
|
+
created_date_time == o.created_date_time &&
|
249
|
+
last_modified_date_time == o.last_modified_date_time &&
|
250
|
+
form_content_modified_date_time == o.form_content_modified_date_time &&
|
251
|
+
form_properties_modified_date_time == o.form_properties_modified_date_time &&
|
252
|
+
last_published_date_time == o.last_published_date_time &&
|
253
|
+
last_enabled_date_time == o.last_enabled_date_time &&
|
254
|
+
last_disabled_date_time == o.last_disabled_date_time &&
|
255
|
+
last_sender_consent_date_time == o.last_sender_consent_date_time &&
|
256
|
+
published_slug == o.published_slug &&
|
257
|
+
published_component_names == o.published_component_names
|
258
|
+
end
|
259
|
+
|
260
|
+
# @see the `==` method
|
261
|
+
# @param [Object] Object to be compared
|
262
|
+
def eql?(o)
|
263
|
+
self == o
|
264
|
+
end
|
265
|
+
|
266
|
+
# Calculates hash code according to all attributes.
|
267
|
+
# @return [Fixnum] Hash code
|
268
|
+
def hash
|
269
|
+
[source, owner, sender, last_modified_by, form_content_modified_by, form_properties_modified_by, last_published_by, last_enabled_by, last_disabled_by, archived_date_time, created_date_time, last_modified_date_time, form_content_modified_date_time, form_properties_modified_date_time, last_published_date_time, last_enabled_date_time, last_disabled_date_time, last_sender_consent_date_time, published_slug, published_component_names].hash
|
270
|
+
end
|
271
|
+
|
272
|
+
# Builds the object from hash
|
273
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
274
|
+
# @return [Object] Returns the model itself
|
275
|
+
def build_from_hash(attributes)
|
276
|
+
return nil unless attributes.is_a?(Hash)
|
277
|
+
self.class.swagger_types.each_pair do |key, type|
|
278
|
+
if type =~ /\AArray<(.*)>/i
|
279
|
+
# check to ensure the input is an array given that the attribute
|
280
|
+
# is documented as an array but the input is not
|
281
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
282
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
283
|
+
end
|
284
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
285
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
286
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
287
|
+
end
|
288
|
+
|
289
|
+
self
|
290
|
+
end
|
291
|
+
|
292
|
+
# Deserializes the data based on type
|
293
|
+
# @param string type Data type
|
294
|
+
# @param string value Value to be deserialized
|
295
|
+
# @return [Object] Deserialized data
|
296
|
+
def _deserialize(type, value)
|
297
|
+
case type.to_sym
|
298
|
+
when :DateTime
|
299
|
+
DateTime.parse(value)
|
300
|
+
when :Date
|
301
|
+
Date.parse(value)
|
302
|
+
when :String
|
303
|
+
value.to_s
|
304
|
+
when :Integer
|
305
|
+
value.to_i
|
306
|
+
when :Float
|
307
|
+
value.to_f
|
308
|
+
when :BOOLEAN
|
309
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
310
|
+
true
|
311
|
+
else
|
312
|
+
false
|
313
|
+
end
|
314
|
+
when :Object
|
315
|
+
# generic object (usually a Hash), return directly
|
316
|
+
value
|
317
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
318
|
+
inner_type = Regexp.last_match[:inner_type]
|
319
|
+
value.map { |v| _deserialize(inner_type, v) }
|
320
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
321
|
+
k_type = Regexp.last_match[:k_type]
|
322
|
+
v_type = Regexp.last_match[:v_type]
|
323
|
+
{}.tap do |hash|
|
324
|
+
value.each do |k, v|
|
325
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
326
|
+
end
|
327
|
+
end
|
328
|
+
else # model
|
329
|
+
temp_model = DocuSign_WebForms.const_get(type).new
|
330
|
+
temp_model.build_from_hash(value)
|
331
|
+
end
|
332
|
+
end
|
333
|
+
|
334
|
+
# Returns the string representation of the object
|
335
|
+
# @return [String] String presentation of the object
|
336
|
+
def to_s
|
337
|
+
to_hash.to_s
|
338
|
+
end
|
339
|
+
|
340
|
+
# to_body is an alias to to_hash (backward compatibility)
|
341
|
+
# @return [Hash] Returns the object in the form of hash
|
342
|
+
def to_body
|
343
|
+
to_hash
|
344
|
+
end
|
345
|
+
|
346
|
+
# Returns the object in the form of hash
|
347
|
+
# @return [Hash] Returns the object in the form of hash
|
348
|
+
def to_hash
|
349
|
+
hash = {}
|
350
|
+
self.class.attribute_map.each_pair do |attr, param|
|
351
|
+
value = self.send(attr)
|
352
|
+
next if value.nil?
|
353
|
+
hash[param] = _to_hash(value)
|
354
|
+
end
|
355
|
+
hash
|
356
|
+
end
|
357
|
+
|
358
|
+
# Outputs non-array value in the form of hash
|
359
|
+
# For object, use to_hash. Otherwise, just return the value
|
360
|
+
# @param [Object] value Any valid value
|
361
|
+
# @return [Hash] Returns the value in the form of hash
|
362
|
+
def _to_hash(value)
|
363
|
+
if value.is_a?(Array)
|
364
|
+
value.compact.map { |v| _to_hash(v) }
|
365
|
+
elsif value.is_a?(Hash)
|
366
|
+
{}.tap do |hash|
|
367
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
368
|
+
end
|
369
|
+
elsif value.respond_to? :to_hash
|
370
|
+
value.to_hash
|
371
|
+
else
|
372
|
+
value
|
373
|
+
end
|
374
|
+
end
|
375
|
+
|
376
|
+
end
|
377
|
+
end
|