Class: DocuSign_eSign::WorkspaceUser

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_esign/models/workspace_user.rb

Overview

A workspaceUser representing the user. This property is only returned in response to user specific GET call.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ WorkspaceUser

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/docusign_esign/models/workspace_user.rb', line 126

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'accountId')
    self. = attributes[:'accountId']
  end

  if attributes.has_key?(:'accountName')
    self. = attributes[:'accountName']
  end

  if attributes.has_key?(:'activeSince')
    self.active_since = attributes[:'activeSince']
  end

  if attributes.has_key?(:'created')
    self.created = attributes[:'created']
  end

  if attributes.has_key?(:'createdById')
    self.created_by_id = attributes[:'createdById']
  end

  if attributes.has_key?(:'email')
    self.email = attributes[:'email']
  end

  if attributes.has_key?(:'errorDetails')
    self.error_details = attributes[:'errorDetails']
  end

  if attributes.has_key?(:'invitationEmailBlurb')
    self.invitation_email_blurb = attributes[:'invitationEmailBlurb']
  end

  if attributes.has_key?(:'invitationEmailSubject')
    self.invitation_email_subject = attributes[:'invitationEmailSubject']
  end

  if attributes.has_key?(:'lastModified')
    self.last_modified = attributes[:'lastModified']
  end

  if attributes.has_key?(:'lastModifiedById')
    self.last_modified_by_id = attributes[:'lastModifiedById']
  end

  if attributes.has_key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.has_key?(:'type')
    self.type = attributes[:'type']
  end

  if attributes.has_key?(:'userId')
    self.user_id = attributes[:'userId']
  end

  if attributes.has_key?(:'userName')
    self.user_name = attributes[:'userName']
  end

  if attributes.has_key?(:'workspaceId')
    self.workspace_id = attributes[:'workspaceId']
  end

  if attributes.has_key?(:'workspaceUserBaseUrl')
    self.workspace_user_base_url = attributes[:'workspaceUserBaseUrl']
  end

  if attributes.has_key?(:'workspaceUserId')
    self.workspace_user_id = attributes[:'workspaceUserId']
  end

  if attributes.has_key?(:'workspaceUserUri')
    self.workspace_user_uri = attributes[:'workspaceUserUri']
  end
end

Instance Attribute Details

#account_idObject

The account ID associated with the envelope.



18
19
20
# File 'lib/docusign_esign/models/workspace_user.rb', line 18

def 
  @account_id
end

#account_nameObject

The name of the account that the workspace user belongs to.



21
22
23
# File 'lib/docusign_esign/models/workspace_user.rb', line 21

def 
  @account_name
end

#active_sinceObject

Returns the value of attribute active_since.



24
25
26
# File 'lib/docusign_esign/models/workspace_user.rb', line 24

def active_since
  @active_since
end

#createdObject

The UTC DateTime when the workspace user was created.



27
28
29
# File 'lib/docusign_esign/models/workspace_user.rb', line 27

def created
  @created
end

#created_by_idObject

Returns the value of attribute created_by_id.



30
31
32
# File 'lib/docusign_esign/models/workspace_user.rb', line 30

def created_by_id
  @created_by_id
end

#emailObject

Returns the value of attribute email.



33
34
35
# File 'lib/docusign_esign/models/workspace_user.rb', line 33

def email
  @email
end

#error_detailsObject

Array or errors.



36
37
38
# File 'lib/docusign_esign/models/workspace_user.rb', line 36

def error_details
  @error_details
end

#invitation_email_blurbObject

Returns the value of attribute invitation_email_blurb.



39
40
41
# File 'lib/docusign_esign/models/workspace_user.rb', line 39

def invitation_email_blurb
  @invitation_email_blurb
end

#invitation_email_subjectObject

Returns the value of attribute invitation_email_subject.



42
43
44
# File 'lib/docusign_esign/models/workspace_user.rb', line 42

def invitation_email_subject
  @invitation_email_subject
end

#last_modifiedObject

Utc date and time the comment was last updated (can only be done by creator.)



45
46
47
# File 'lib/docusign_esign/models/workspace_user.rb', line 45

def last_modified
  @last_modified
end

#last_modified_by_idObject

Returns the value of attribute last_modified_by_id.



48
49
50
# File 'lib/docusign_esign/models/workspace_user.rb', line 48

def last_modified_by_id
  @last_modified_by_id
end

#statusObject

Indicates the envelope status. Valid values are: * sent - The envelope is sent to the recipients. * created - The envelope is saved as a draft and can be modified and sent later.



51
52
53
# File 'lib/docusign_esign/models/workspace_user.rb', line 51

def status
  @status
end

#typeObject

Type of the user. Valid values: type_owner, type_participant.



54
55
56
# File 'lib/docusign_esign/models/workspace_user.rb', line 54

def type
  @type
end

#user_idObject

Returns the value of attribute user_id.



57
58
59
# File 'lib/docusign_esign/models/workspace_user.rb', line 57

def user_id
  @user_id
end

#user_nameObject

Returns the value of attribute user_name.



60
61
62
# File 'lib/docusign_esign/models/workspace_user.rb', line 60

def user_name
  @user_name
end

#workspace_idObject

Returns the value of attribute workspace_id.



63
64
65
# File 'lib/docusign_esign/models/workspace_user.rb', line 63

def workspace_id
  @workspace_id
end

#workspace_user_base_urlObject

The relative URI that may be used to access a workspace user.



66
67
68
# File 'lib/docusign_esign/models/workspace_user.rb', line 66

def workspace_user_base_url
  @workspace_user_base_url
end

#workspace_user_idObject

Returns the value of attribute workspace_user_id.



69
70
71
# File 'lib/docusign_esign/models/workspace_user.rb', line 69

def workspace_user_id
  @workspace_user_id
end

#workspace_user_uriObject

Returns the value of attribute workspace_user_uri.



72
73
74
# File 'lib/docusign_esign/models/workspace_user.rb', line 72

def workspace_user_uri
  @workspace_user_uri
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/docusign_esign/models/workspace_user.rb', line 75

def self.attribute_map
  {
    :'account_id' => :'accountId',
    :'account_name' => :'accountName',
    :'active_since' => :'activeSince',
    :'created' => :'created',
    :'created_by_id' => :'createdById',
    :'email' => :'email',
    :'error_details' => :'errorDetails',
    :'invitation_email_blurb' => :'invitationEmailBlurb',
    :'invitation_email_subject' => :'invitationEmailSubject',
    :'last_modified' => :'lastModified',
    :'last_modified_by_id' => :'lastModifiedById',
    :'status' => :'status',
    :'type' => :'type',
    :'user_id' => :'userId',
    :'user_name' => :'userName',
    :'workspace_id' => :'workspaceId',
    :'workspace_user_base_url' => :'workspaceUserBaseUrl',
    :'workspace_user_id' => :'workspaceUserId',
    :'workspace_user_uri' => :'workspaceUserUri'
  }
end

.swagger_typesObject

Attribute type mapping.



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/docusign_esign/models/workspace_user.rb', line 100

def self.swagger_types
  {
    :'account_id' => :'String',
    :'account_name' => :'String',
    :'active_since' => :'String',
    :'created' => :'String',
    :'created_by_id' => :'String',
    :'email' => :'String',
    :'error_details' => :'ErrorDetails',
    :'invitation_email_blurb' => :'String',
    :'invitation_email_subject' => :'String',
    :'last_modified' => :'String',
    :'last_modified_by_id' => :'String',
    :'status' => :'String',
    :'type' => :'String',
    :'user_id' => :'String',
    :'user_name' => :'String',
    :'workspace_id' => :'String',
    :'workspace_user_base_url' => :'String',
    :'workspace_user_id' => :'String',
    :'workspace_user_uri' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/docusign_esign/models/workspace_user.rb', line 224

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
       == o. &&
       == o. &&
      active_since == o.active_since &&
      created == o.created &&
      created_by_id == o.created_by_id &&
      email == o.email &&
      error_details == o.error_details &&
      invitation_email_blurb == o.invitation_email_blurb &&
      invitation_email_subject == o.invitation_email_subject &&
      last_modified == o.last_modified &&
      last_modified_by_id == o.last_modified_by_id &&
      status == o.status &&
      type == o.type &&
      user_id == o.user_id &&
      user_name == o.user_name &&
      workspace_id == o.workspace_id &&
      workspace_user_base_url == o.workspace_user_base_url &&
      workspace_user_id == o.workspace_user_id &&
      workspace_user_uri == o.workspace_user_uri
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/docusign_esign/models/workspace_user.rb', line 284

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = DocuSign_eSign.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/docusign_esign/models/workspace_user.rb', line 350

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# File 'lib/docusign_esign/models/workspace_user.rb', line 263

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


250
251
252
# File 'lib/docusign_esign/models/workspace_user.rb', line 250

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



256
257
258
# File 'lib/docusign_esign/models/workspace_user.rb', line 256

def hash
  [, , active_since, created, created_by_id, email, error_details, invitation_email_blurb, invitation_email_subject, last_modified, last_modified_by_id, status, type, user_id, user_name, workspace_id, workspace_user_base_url, workspace_user_id, workspace_user_uri].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



211
212
213
214
# File 'lib/docusign_esign/models/workspace_user.rb', line 211

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



330
331
332
# File 'lib/docusign_esign/models/workspace_user.rb', line 330

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



336
337
338
339
340
341
342
343
344
# File 'lib/docusign_esign/models/workspace_user.rb', line 336

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



324
325
326
# File 'lib/docusign_esign/models/workspace_user.rb', line 324

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



218
219
220
# File 'lib/docusign_esign/models/workspace_user.rb', line 218

def valid?
  true
end