signrequest_client 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -0
- data/LICENSE +21 -0
- data/README.md +122 -0
- data/Rakefile +9 -0
- data/docs/ApiTokensApi.md +226 -0
- data/docs/AuthToken.md +13 -0
- data/docs/Document.md +33 -0
- data/docs/DocumentAttachment.md +15 -0
- data/docs/DocumentAttachmentsApi.md +179 -0
- data/docs/DocumentSearch.md +22 -0
- data/docs/DocumentSignerTemplateConf.md +14 -0
- data/docs/DocumentsApi.md +301 -0
- data/docs/DocumentsSearchApi.md +119 -0
- data/docs/Event.md +17 -0
- data/docs/EventsApi.md +145 -0
- data/docs/FileFromSf.md +9 -0
- data/docs/InlineDocumentSignerIntegrationData.md +9 -0
- data/docs/InlineIntegrationData.md +9 -0
- data/docs/InlinePrefillTags.md +11 -0
- data/docs/InlineResponse200.md +11 -0
- data/docs/InlineResponse2001.md +11 -0
- data/docs/InlineResponse2002.md +11 -0
- data/docs/InlineResponse2003.md +11 -0
- data/docs/InlineResponse2004.md +11 -0
- data/docs/InlineResponse2005.md +11 -0
- data/docs/InlineResponse2006.md +11 -0
- data/docs/InlineResponse2007.md +11 -0
- data/docs/InlineResponse2008.md +11 -0
- data/docs/InlineResponse2009.md +11 -0
- data/docs/InlineSignRequest.md +25 -0
- data/docs/InlineTeam.md +10 -0
- data/docs/InlineTeamMember.md +13 -0
- data/docs/InviteMember.md +10 -0
- data/docs/Placeholder.md +15 -0
- data/docs/RequiredAttachment.md +9 -0
- data/docs/SignRequest.md +29 -0
- data/docs/SignRequestQuickCreate.md +42 -0
- data/docs/Signer.md +40 -0
- data/docs/SignerAttachment.md +11 -0
- data/docs/SignerInputs.md +14 -0
- data/docs/SigningLog.md +9 -0
- data/docs/SignrequestQuickCreateApi.md +62 -0
- data/docs/SignrequestsApi.md +291 -0
- data/docs/Team.md +15 -0
- data/docs/TeamMember.md +14 -0
- data/docs/TeamMembersApi.md +131 -0
- data/docs/TeamsApi.md +344 -0
- data/docs/Template.md +14 -0
- data/docs/TemplatesApi.md +119 -0
- data/docs/User.md +11 -0
- data/docs/WebhookSubscription.md +15 -0
- data/docs/WebhooksApi.md +340 -0
- data/git_push.sh +55 -0
- data/lib/signrequest_client/api/api_tokens_api.rb +242 -0
- data/lib/signrequest_client/api/document_attachments_api.rb +197 -0
- data/lib/signrequest_client/api/documents_api.rb +330 -0
- data/lib/signrequest_client/api/documents_search_api.rb +133 -0
- data/lib/signrequest_client/api/events_api.rb +172 -0
- data/lib/signrequest_client/api/signrequest_quick_create_api.rb +78 -0
- data/lib/signrequest_client/api/signrequests_api.rb +316 -0
- data/lib/signrequest_client/api/team_members_api.rb +151 -0
- data/lib/signrequest_client/api/teams_api.rb +371 -0
- data/lib/signrequest_client/api/templates_api.rb +133 -0
- data/lib/signrequest_client/api/webhooks_api.rb +364 -0
- data/lib/signrequest_client/api_client.rb +389 -0
- data/lib/signrequest_client/api_error.rb +38 -0
- data/lib/signrequest_client/configuration.rb +209 -0
- data/lib/signrequest_client/models/auth_token.rb +298 -0
- data/lib/signrequest_client/models/document.rb +605 -0
- data/lib/signrequest_client/models/document_attachment.rb +304 -0
- data/lib/signrequest_client/models/document_search.rb +519 -0
- data/lib/signrequest_client/models/document_signer_template_conf.rb +294 -0
- data/lib/signrequest_client/models/event.rb +330 -0
- data/lib/signrequest_client/models/file_from_sf.rb +245 -0
- data/lib/signrequest_client/models/inline_document_signer_integration_data.rb +230 -0
- data/lib/signrequest_client/models/inline_integration_data.rb +230 -0
- data/lib/signrequest_client/models/inline_prefill_tags.rb +231 -0
- data/lib/signrequest_client/models/inline_response_200.rb +227 -0
- data/lib/signrequest_client/models/inline_response_200_1.rb +227 -0
- data/lib/signrequest_client/models/inline_response_200_2.rb +227 -0
- data/lib/signrequest_client/models/inline_response_200_3.rb +227 -0
- data/lib/signrequest_client/models/inline_response_200_4.rb +227 -0
- data/lib/signrequest_client/models/inline_response_200_5.rb +227 -0
- data/lib/signrequest_client/models/inline_response_200_6.rb +227 -0
- data/lib/signrequest_client/models/inline_response_200_7.rb +227 -0
- data/lib/signrequest_client/models/inline_response_200_8.rb +227 -0
- data/lib/signrequest_client/models/inline_response_200_9.rb +227 -0
- data/lib/signrequest_client/models/inline_sign_request.rb +496 -0
- data/lib/signrequest_client/models/inline_team.rb +247 -0
- data/lib/signrequest_client/models/inline_team_member.rb +249 -0
- data/lib/signrequest_client/models/invite_member.rb +234 -0
- data/lib/signrequest_client/models/placeholder.rb +326 -0
- data/lib/signrequest_client/models/required_attachment.rb +246 -0
- data/lib/signrequest_client/models/sign_request.rb +543 -0
- data/lib/signrequest_client/models/sign_request_quick_create.rb +764 -0
- data/lib/signrequest_client/models/signer.rb +751 -0
- data/lib/signrequest_client/models/signer_attachment.rb +247 -0
- data/lib/signrequest_client/models/signer_inputs.rb +312 -0
- data/lib/signrequest_client/models/signing_log.rb +213 -0
- data/lib/signrequest_client/models/team.rb +367 -0
- data/lib/signrequest_client/models/team_member.rb +258 -0
- data/lib/signrequest_client/models/template.rb +309 -0
- data/lib/signrequest_client/models/user.rb +296 -0
- data/lib/signrequest_client/models/webhook_subscription.rb +366 -0
- data/lib/signrequest_client/version.rb +15 -0
- data/lib/signrequest_client.rb +87 -0
- data/pkg/signrequest_client-0.1.0.gem +0 -0
- data/signrequest_client.gemspec +45 -0
- data/signrequst_client/.git/HEAD +1 -0
- data/signrequst_client/.git/config +7 -0
- data/signrequst_client/.git/description +1 -0
- data/signrequst_client/.git/hooks/applypatch-msg.sample +15 -0
- data/signrequst_client/.git/hooks/commit-msg.sample +24 -0
- data/signrequst_client/.git/hooks/fsmonitor-watchman.sample +114 -0
- data/signrequst_client/.git/hooks/post-update.sample +8 -0
- data/signrequst_client/.git/hooks/pre-applypatch.sample +14 -0
- data/signrequst_client/.git/hooks/pre-commit.sample +49 -0
- data/signrequst_client/.git/hooks/pre-push.sample +53 -0
- data/signrequst_client/.git/hooks/pre-rebase.sample +169 -0
- data/signrequst_client/.git/hooks/pre-receive.sample +24 -0
- data/signrequst_client/.git/hooks/prepare-commit-msg.sample +42 -0
- data/signrequst_client/.git/hooks/update.sample +128 -0
- data/signrequst_client/.git/index +0 -0
- data/signrequst_client/.git/info/exclude +6 -0
- data/signrequst_client/.git/objects/30/68cc8a074ffc0c7b8891cb21d68b5d367cb8c4 +0 -0
- data/signrequst_client/.git/objects/32/c4b7e9f988621ed2ce28954f1aaf088f340848 +2 -0
- data/signrequst_client/.git/objects/3e/8c4c2f8d1d5334612f3072160124e985f27e8c +0 -0
- data/signrequst_client/.git/objects/43/022f711e20ed55baf2470278eb8e428a04856f +0 -0
- data/signrequst_client/.git/objects/6f/8caa83dfb6dc8a987a2829cbfefae18c8870c3 +0 -0
- data/signrequst_client/.git/objects/91/06b2a345b019a799c02e5069affa88370b35dd +0 -0
- data/signrequst_client/.git/objects/aa/58e53f733551ac2bde6f7a50b5a9f16ddbf110 +0 -0
- data/signrequst_client/.git/objects/dc/e67d860af47a4eb630117ce03624bae45dcf26 +3 -0
- data/signrequst_client/.git/objects/f1/c9171bed4c19fd22429ffd68d4cbb2c3ce2fce +0 -0
- data/signrequst_client/.git/objects/f8/e4c2573ebc57d5a365ebe14d5c18cc8d0716c4 +0 -0
- data/spec/api/api_tokens_api_spec.rb +84 -0
- data/spec/api/document_attachments_api_spec.rb +75 -0
- data/spec/api/documents_api_spec.rb +106 -0
- data/spec/api/documents_search_api_spec.rb +60 -0
- data/spec/api/events_api_spec.rb +73 -0
- data/spec/api/signrequest_quick_create_api_spec.rb +47 -0
- data/spec/api/signrequests_api_spec.rb +100 -0
- data/spec/api/team_members_api_spec.rb +66 -0
- data/spec/api/teams_api_spec.rb +111 -0
- data/spec/api/templates_api_spec.rb +60 -0
- data/spec/api/webhooks_api_spec.rb +110 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/auth_token_spec.rb +72 -0
- data/spec/models/document_attachment_spec.rb +84 -0
- data/spec/models/document_search_spec.rb +126 -0
- data/spec/models/document_signer_template_conf_spec.rb +78 -0
- data/spec/models/document_spec.rb +196 -0
- data/spec/models/event_spec.rb +104 -0
- data/spec/models/file_from_sf_spec.rb +48 -0
- data/spec/models/inline_document_signer_integration_data_spec.rb +52 -0
- data/spec/models/inline_integration_data_spec.rb +52 -0
- data/spec/models/inline_prefill_tags_spec.rb +60 -0
- data/spec/models/inline_response_200_1_spec.rb +60 -0
- data/spec/models/inline_response_200_2_spec.rb +60 -0
- data/spec/models/inline_response_200_3_spec.rb +60 -0
- data/spec/models/inline_response_200_4_spec.rb +60 -0
- data/spec/models/inline_response_200_5_spec.rb +60 -0
- data/spec/models/inline_response_200_6_spec.rb +60 -0
- data/spec/models/inline_response_200_7_spec.rb +60 -0
- data/spec/models/inline_response_200_8_spec.rb +60 -0
- data/spec/models/inline_response_200_9_spec.rb +60 -0
- data/spec/models/inline_response_200_spec.rb +60 -0
- data/spec/models/inline_sign_request_spec.rb +148 -0
- data/spec/models/inline_team_member_spec.rb +72 -0
- data/spec/models/inline_team_spec.rb +54 -0
- data/spec/models/invite_member_spec.rb +54 -0
- data/spec/models/placeholder_spec.rb +88 -0
- data/spec/models/required_attachment_spec.rb +48 -0
- data/spec/models/sign_request_quick_create_spec.rb +254 -0
- data/spec/models/sign_request_spec.rb +176 -0
- data/spec/models/signer_attachment_spec.rb +60 -0
- data/spec/models/signer_inputs_spec.rb +82 -0
- data/spec/models/signer_spec.rb +238 -0
- data/spec/models/signing_log_spec.rb +48 -0
- data/spec/models/team_member_spec.rb +78 -0
- data/spec/models/team_spec.rb +84 -0
- data/spec/models/template_spec.rb +82 -0
- data/spec/models/user_spec.rb +60 -0
- data/spec/models/webhook_subscription_spec.rb +92 -0
- data/spec/spec_helper.rb +111 -0
- metadata +461 -0
@@ -0,0 +1,247 @@
|
|
1
|
+
=begin
|
2
|
+
#SignRequest API
|
3
|
+
|
4
|
+
#API for SignRequest.com
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: tech-support@signrequest.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module SignRequestClient
|
16
|
+
|
17
|
+
class InlineTeam
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
attr_accessor :subdomain
|
21
|
+
|
22
|
+
attr_accessor :url
|
23
|
+
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'name' => :'name',
|
29
|
+
:'subdomain' => :'subdomain',
|
30
|
+
:'url' => :'url'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.swagger_types
|
36
|
+
{
|
37
|
+
:'name' => :'String',
|
38
|
+
:'subdomain' => :'String',
|
39
|
+
:'url' => :'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?(:'name')
|
52
|
+
self.name = attributes[:'name']
|
53
|
+
end
|
54
|
+
|
55
|
+
if attributes.has_key?(:'subdomain')
|
56
|
+
self.subdomain = attributes[:'subdomain']
|
57
|
+
end
|
58
|
+
|
59
|
+
if attributes.has_key?(:'url')
|
60
|
+
self.url = attributes[:'url']
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
if !@name.nil? && @name.to_s.length < 1
|
70
|
+
invalid_properties.push("invalid value for 'name', the character length must be great than or equal to 1.")
|
71
|
+
end
|
72
|
+
|
73
|
+
if !@subdomain.nil? && @subdomain.to_s.length < 1
|
74
|
+
invalid_properties.push("invalid value for 'subdomain', the character length must be great than or equal to 1.")
|
75
|
+
end
|
76
|
+
|
77
|
+
if !@subdomain.nil? && @subdomain !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
78
|
+
invalid_properties.push("invalid value for 'subdomain', must conform to the pattern /^[-a-zA-Z0-9_]+$/.")
|
79
|
+
end
|
80
|
+
|
81
|
+
return invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
return false if !@name.nil? && @name.to_s.length < 1
|
88
|
+
return false if !@subdomain.nil? && @subdomain.to_s.length < 1
|
89
|
+
return false if !@subdomain.nil? && @subdomain !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
90
|
+
return true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Custom attribute writer method with validation
|
94
|
+
# @param [Object] name Value to be assigned
|
95
|
+
def name=(name)
|
96
|
+
|
97
|
+
if !name.nil? && name.to_s.length < 1
|
98
|
+
fail ArgumentError, "invalid value for 'name', the character length must be great than or equal to 1."
|
99
|
+
end
|
100
|
+
|
101
|
+
@name = name
|
102
|
+
end
|
103
|
+
|
104
|
+
# Custom attribute writer method with validation
|
105
|
+
# @param [Object] subdomain Value to be assigned
|
106
|
+
def subdomain=(subdomain)
|
107
|
+
|
108
|
+
if !subdomain.nil? && subdomain.to_s.length < 1
|
109
|
+
fail ArgumentError, "invalid value for 'subdomain', the character length must be great than or equal to 1."
|
110
|
+
end
|
111
|
+
|
112
|
+
if !subdomain.nil? && subdomain !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
113
|
+
fail ArgumentError, "invalid value for 'subdomain', must conform to the pattern /^[-a-zA-Z0-9_]+$/."
|
114
|
+
end
|
115
|
+
|
116
|
+
@subdomain = subdomain
|
117
|
+
end
|
118
|
+
|
119
|
+
# Checks equality by comparing each attribute.
|
120
|
+
# @param [Object] Object to be compared
|
121
|
+
def ==(o)
|
122
|
+
return true if self.equal?(o)
|
123
|
+
self.class == o.class &&
|
124
|
+
name == o.name &&
|
125
|
+
subdomain == o.subdomain &&
|
126
|
+
url == o.url
|
127
|
+
end
|
128
|
+
|
129
|
+
# @see the `==` method
|
130
|
+
# @param [Object] Object to be compared
|
131
|
+
def eql?(o)
|
132
|
+
self == o
|
133
|
+
end
|
134
|
+
|
135
|
+
# Calculates hash code according to all attributes.
|
136
|
+
# @return [Fixnum] Hash code
|
137
|
+
def hash
|
138
|
+
[name, subdomain, url].hash
|
139
|
+
end
|
140
|
+
|
141
|
+
# Builds the object from hash
|
142
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
+
# @return [Object] Returns the model itself
|
144
|
+
def build_from_hash(attributes)
|
145
|
+
return nil unless attributes.is_a?(Hash)
|
146
|
+
self.class.swagger_types.each_pair do |key, type|
|
147
|
+
if type =~ /\AArray<(.*)>/i
|
148
|
+
# check to ensure the input is an array given that the the attribute
|
149
|
+
# is documented as an array but the input is not
|
150
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
151
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
152
|
+
end
|
153
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
154
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
155
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
156
|
+
end
|
157
|
+
|
158
|
+
self
|
159
|
+
end
|
160
|
+
|
161
|
+
# Deserializes the data based on type
|
162
|
+
# @param string type Data type
|
163
|
+
# @param string value Value to be deserialized
|
164
|
+
# @return [Object] Deserialized data
|
165
|
+
def _deserialize(type, value)
|
166
|
+
case type.to_sym
|
167
|
+
when :DateTime
|
168
|
+
DateTime.parse(value)
|
169
|
+
when :Date
|
170
|
+
Date.parse(value)
|
171
|
+
when :String
|
172
|
+
value.to_s
|
173
|
+
when :Integer
|
174
|
+
value.to_i
|
175
|
+
when :Float
|
176
|
+
value.to_f
|
177
|
+
when :BOOLEAN
|
178
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
179
|
+
true
|
180
|
+
else
|
181
|
+
false
|
182
|
+
end
|
183
|
+
when :Object
|
184
|
+
# generic object (usually a Hash), return directly
|
185
|
+
value
|
186
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
187
|
+
inner_type = Regexp.last_match[:inner_type]
|
188
|
+
value.map { |v| _deserialize(inner_type, v) }
|
189
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
190
|
+
k_type = Regexp.last_match[:k_type]
|
191
|
+
v_type = Regexp.last_match[:v_type]
|
192
|
+
{}.tap do |hash|
|
193
|
+
value.each do |k, v|
|
194
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
else # model
|
198
|
+
temp_model = SignRequestClient.const_get(type).new
|
199
|
+
temp_model.build_from_hash(value)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the string representation of the object
|
204
|
+
# @return [String] String presentation of the object
|
205
|
+
def to_s
|
206
|
+
to_hash.to_s
|
207
|
+
end
|
208
|
+
|
209
|
+
# to_body is an alias to to_hash (backward compatibility)
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
211
|
+
def to_body
|
212
|
+
to_hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns the object in the form of hash
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
217
|
+
def to_hash
|
218
|
+
hash = {}
|
219
|
+
self.class.attribute_map.each_pair do |attr, param|
|
220
|
+
value = self.send(attr)
|
221
|
+
next if value.nil?
|
222
|
+
hash[param] = _to_hash(value)
|
223
|
+
end
|
224
|
+
hash
|
225
|
+
end
|
226
|
+
|
227
|
+
# Outputs non-array value in the form of hash
|
228
|
+
# For object, use to_hash. Otherwise, just return the value
|
229
|
+
# @param [Object] value Any valid value
|
230
|
+
# @return [Hash] Returns the value in the form of hash
|
231
|
+
def _to_hash(value)
|
232
|
+
if value.is_a?(Array)
|
233
|
+
value.compact.map{ |v| _to_hash(v) }
|
234
|
+
elsif value.is_a?(Hash)
|
235
|
+
{}.tap do |hash|
|
236
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
237
|
+
end
|
238
|
+
elsif value.respond_to? :to_hash
|
239
|
+
value.to_hash
|
240
|
+
else
|
241
|
+
value
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
end
|
246
|
+
|
247
|
+
end
|
@@ -0,0 +1,249 @@
|
|
1
|
+
=begin
|
2
|
+
#SignRequest API
|
3
|
+
|
4
|
+
#API for SignRequest.com
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: tech-support@signrequest.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module SignRequestClient
|
16
|
+
|
17
|
+
class InlineTeamMember
|
18
|
+
attr_accessor :uuid
|
19
|
+
|
20
|
+
attr_accessor :url
|
21
|
+
|
22
|
+
attr_accessor :user
|
23
|
+
|
24
|
+
attr_accessor :is_admin
|
25
|
+
|
26
|
+
attr_accessor :is_active
|
27
|
+
|
28
|
+
attr_accessor :is_owner
|
29
|
+
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'uuid' => :'uuid',
|
35
|
+
:'url' => :'url',
|
36
|
+
:'user' => :'user',
|
37
|
+
:'is_admin' => :'is_admin',
|
38
|
+
:'is_active' => :'is_active',
|
39
|
+
:'is_owner' => :'is_owner'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
def self.swagger_types
|
45
|
+
{
|
46
|
+
:'uuid' => :'String',
|
47
|
+
:'url' => :'String',
|
48
|
+
:'user' => :'User',
|
49
|
+
:'is_admin' => :'BOOLEAN',
|
50
|
+
:'is_active' => :'BOOLEAN',
|
51
|
+
:'is_owner' => :'BOOLEAN'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
return unless attributes.is_a?(Hash)
|
59
|
+
|
60
|
+
# convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
62
|
+
|
63
|
+
if attributes.has_key?(:'uuid')
|
64
|
+
self.uuid = attributes[:'uuid']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'url')
|
68
|
+
self.url = attributes[:'url']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'user')
|
72
|
+
self.user = attributes[:'user']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'is_admin')
|
76
|
+
self.is_admin = attributes[:'is_admin']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.has_key?(:'is_active')
|
80
|
+
self.is_active = attributes[:'is_active']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.has_key?(:'is_owner')
|
84
|
+
self.is_owner = attributes[:'is_owner']
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
invalid_properties = Array.new
|
93
|
+
if !@uuid.nil? && @uuid.to_s.length < 1
|
94
|
+
invalid_properties.push("invalid value for 'uuid', the character length must be great than or equal to 1.")
|
95
|
+
end
|
96
|
+
|
97
|
+
return invalid_properties
|
98
|
+
end
|
99
|
+
|
100
|
+
# Check to see if the all the properties in the model are valid
|
101
|
+
# @return true if the model is valid
|
102
|
+
def valid?
|
103
|
+
return false if !@uuid.nil? && @uuid.to_s.length < 1
|
104
|
+
return true
|
105
|
+
end
|
106
|
+
|
107
|
+
# Custom attribute writer method with validation
|
108
|
+
# @param [Object] uuid Value to be assigned
|
109
|
+
def uuid=(uuid)
|
110
|
+
|
111
|
+
if !uuid.nil? && uuid.to_s.length < 1
|
112
|
+
fail ArgumentError, "invalid value for 'uuid', the character length must be great than or equal to 1."
|
113
|
+
end
|
114
|
+
|
115
|
+
@uuid = uuid
|
116
|
+
end
|
117
|
+
|
118
|
+
# Checks equality by comparing each attribute.
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def ==(o)
|
121
|
+
return true if self.equal?(o)
|
122
|
+
self.class == o.class &&
|
123
|
+
uuid == o.uuid &&
|
124
|
+
url == o.url &&
|
125
|
+
user == o.user &&
|
126
|
+
is_admin == o.is_admin &&
|
127
|
+
is_active == o.is_active &&
|
128
|
+
is_owner == o.is_owner
|
129
|
+
end
|
130
|
+
|
131
|
+
# @see the `==` method
|
132
|
+
# @param [Object] Object to be compared
|
133
|
+
def eql?(o)
|
134
|
+
self == o
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Fixnum] Hash code
|
139
|
+
def hash
|
140
|
+
[uuid, url, user, is_admin, is_active, is_owner].hash
|
141
|
+
end
|
142
|
+
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def build_from_hash(attributes)
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
148
|
+
self.class.swagger_types.each_pair do |key, type|
|
149
|
+
if type =~ /\AArray<(.*)>/i
|
150
|
+
# check to ensure the input is an array given that the the attribute
|
151
|
+
# is documented as an array but the input is not
|
152
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
153
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
154
|
+
end
|
155
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
156
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
157
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
158
|
+
end
|
159
|
+
|
160
|
+
self
|
161
|
+
end
|
162
|
+
|
163
|
+
# Deserializes the data based on type
|
164
|
+
# @param string type Data type
|
165
|
+
# @param string value Value to be deserialized
|
166
|
+
# @return [Object] Deserialized data
|
167
|
+
def _deserialize(type, value)
|
168
|
+
case type.to_sym
|
169
|
+
when :DateTime
|
170
|
+
DateTime.parse(value)
|
171
|
+
when :Date
|
172
|
+
Date.parse(value)
|
173
|
+
when :String
|
174
|
+
value.to_s
|
175
|
+
when :Integer
|
176
|
+
value.to_i
|
177
|
+
when :Float
|
178
|
+
value.to_f
|
179
|
+
when :BOOLEAN
|
180
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
181
|
+
true
|
182
|
+
else
|
183
|
+
false
|
184
|
+
end
|
185
|
+
when :Object
|
186
|
+
# generic object (usually a Hash), return directly
|
187
|
+
value
|
188
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
189
|
+
inner_type = Regexp.last_match[:inner_type]
|
190
|
+
value.map { |v| _deserialize(inner_type, v) }
|
191
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
192
|
+
k_type = Regexp.last_match[:k_type]
|
193
|
+
v_type = Regexp.last_match[:v_type]
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each do |k, v|
|
196
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
else # model
|
200
|
+
temp_model = SignRequestClient.const_get(type).new
|
201
|
+
temp_model.build_from_hash(value)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the string representation of the object
|
206
|
+
# @return [String] String presentation of the object
|
207
|
+
def to_s
|
208
|
+
to_hash.to_s
|
209
|
+
end
|
210
|
+
|
211
|
+
# to_body is an alias to to_hash (backward compatibility)
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
213
|
+
def to_body
|
214
|
+
to_hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns the object in the form of hash
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_hash
|
220
|
+
hash = {}
|
221
|
+
self.class.attribute_map.each_pair do |attr, param|
|
222
|
+
value = self.send(attr)
|
223
|
+
next if value.nil?
|
224
|
+
hash[param] = _to_hash(value)
|
225
|
+
end
|
226
|
+
hash
|
227
|
+
end
|
228
|
+
|
229
|
+
# Outputs non-array value in the form of hash
|
230
|
+
# For object, use to_hash. Otherwise, just return the value
|
231
|
+
# @param [Object] value Any valid value
|
232
|
+
# @return [Hash] Returns the value in the form of hash
|
233
|
+
def _to_hash(value)
|
234
|
+
if value.is_a?(Array)
|
235
|
+
value.compact.map{ |v| _to_hash(v) }
|
236
|
+
elsif value.is_a?(Hash)
|
237
|
+
{}.tap do |hash|
|
238
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
239
|
+
end
|
240
|
+
elsif value.respond_to? :to_hash
|
241
|
+
value.to_hash
|
242
|
+
else
|
243
|
+
value
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
end
|
248
|
+
|
249
|
+
end
|