Class: DocuSign_Maestro::ESignTabs

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_maestro/models/e_sign_tabs.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ESignTabs

Initializes the object

Parameters:

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

    Model attributes in the form of hash

[View source]

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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
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_maestro/models/e_sign_tabs.rb', line 135

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?(:'anchorString')
    self.anchor_string = attributes[:'anchorString']
  end

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

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

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

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

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

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

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

  if attributes.has_key?(:'localePolicy')
    if (value = attributes[:'localePolicy']).is_a?(Hash)
      self.locale_policy = value
    end
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#anchor_stringObject

Returns the value of attribute anchor_string.


16
17
18
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 16

def anchor_string
  @anchor_string
end

#boldObject

Returns the value of attribute bold.


18
19
20
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 18

def bold
  @bold
end

#document_idObject

Returns the value of attribute document_id.


20
21
22
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 20

def document_id
  @document_id
end

#fontObject

Returns the value of attribute font.


22
23
24
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 22

def font
  @font
end

#font_colorObject

Returns the value of attribute font_color.


24
25
26
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 24

def font_color
  @font_color
end

#font_sizeObject

Returns the value of attribute font_size.


26
27
28
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 26

def font_size
  @font_size
end

#heightObject

Returns the value of attribute height.


28
29
30
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 28

def height
  @height
end

#italicObject

Returns the value of attribute italic.


30
31
32
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 30

def italic
  @italic
end

#locale_policyObject

Returns the value of attribute locale_policy.


32
33
34
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 32

def locale_policy
  @locale_policy
end

#nameObject

Returns the value of attribute name.


34
35
36
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 34

def name
  @name
end

#optionalObject

Returns the value of attribute optional.


36
37
38
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 36

def optional
  @optional
end

#page_numberObject

Returns the value of attribute page_number.


38
39
40
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 38

def page_number
  @page_number
end

#recipient_idObject

Returns the value of attribute recipient_id.


40
41
42
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 40

def recipient_id
  @recipient_id
end

#scale_valueObject

Returns the value of attribute scale_value.


42
43
44
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 42

def scale_value
  @scale_value
end

#stamp_typeObject

Returns the value of attribute stamp_type.


44
45
46
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 44

def stamp_type
  @stamp_type
end

#tab_idObject

Returns the value of attribute tab_id.


46
47
48
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 46

def tab_id
  @tab_id
end

#tab_labelObject

Returns the value of attribute tab_label.


48
49
50
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 48

def tab_label
  @tab_label
end

#tab_typeObject

Returns the value of attribute tab_type.


50
51
52
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 50

def tab_type
  @tab_type
end

#template_lockedObject

Returns the value of attribute template_locked.


52
53
54
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 52

def template_locked
  @template_locked
end

#template_requiredObject

Returns the value of attribute template_required.


54
55
56
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 54

def template_required
  @template_required
end

#tooltipObject

Returns the value of attribute tooltip.


56
57
58
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 56

def tooltip
  @tooltip
end

#underlineObject

Returns the value of attribute underline.


58
59
60
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 58

def underline
  @underline
end

#valueObject

Reference of #/definitions/StringOrVariableOrTransformation. Object stands for a String or a Variable or a Transformation. This object should be any of the following object models or types: [string, #/definitions/DSWorkflowVariable, #/definitions/DSWorkflowTransformationExpression]


61
62
63
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 61

def value
  @value
end

#widthObject

Returns the value of attribute width.


63
64
65
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 63

def width
  @width
end

#x_positionObject

Returns the value of attribute x_position.


65
66
67
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 65

def x_position
  @x_position
end

#y_positionObject

Returns the value of attribute y_position.


67
68
69
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 67

def y_position
  @y_position
end

Class Method Details

.attribute_mapObject

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

[View source]

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 70

def self.attribute_map
  {
    :'anchor_string' => :'anchorString',
    :'bold' => :'bold',
    :'document_id' => :'documentId',
    :'font' => :'font',
    :'font_color' => :'fontColor',
    :'font_size' => :'fontSize',
    :'height' => :'height',
    :'italic' => :'italic',
    :'locale_policy' => :'localePolicy',
    :'name' => :'name',
    :'optional' => :'optional',
    :'page_number' => :'pageNumber',
    :'recipient_id' => :'recipientId',
    :'scale_value' => :'scaleValue',
    :'stamp_type' => :'stampType',
    :'tab_id' => :'tabId',
    :'tab_label' => :'tabLabel',
    :'tab_type' => :'tabType',
    :'template_locked' => :'templateLocked',
    :'template_required' => :'templateRequired',
    :'tooltip' => :'tooltip',
    :'underline' => :'underline',
    :'value' => :'value',
    :'width' => :'width',
    :'x_position' => :'xPosition',
    :'y_position' => :'yPosition'
  }
end

.swagger_typesObject

Attribute type mapping.

[View source]

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 102

def self.swagger_types
  {
    :'anchor_string' => :'String',
    :'bold' => :'String',
    :'document_id' => :'String',
    :'font' => :'String',
    :'font_color' => :'String',
    :'font_size' => :'String',
    :'height' => :'String',
    :'italic' => :'String',
    :'locale_policy' => :'Hash<String, Object>',
    :'name' => :'String',
    :'optional' => :'String',
    :'page_number' => :'String',
    :'recipient_id' => :'String',
    :'scale_value' => :'String',
    :'stamp_type' => :'String',
    :'tab_id' => :'String',
    :'tab_label' => :'String',
    :'tab_type' => :'String',
    :'template_locked' => :'String',
    :'template_required' => :'String',
    :'tooltip' => :'String',
    :'underline' => :'String',
    :'value' => :'Object',
    :'width' => :'String',
    :'x_position' => :'String',
    :'y_position' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared

[View source]

268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 268

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      anchor_string == o.anchor_string &&
      bold == o.bold &&
      document_id == o.document_id &&
      font == o.font &&
      font_color == o.font_color &&
      font_size == o.font_size &&
      height == o.height &&
      italic == o.italic &&
      locale_policy == o.locale_policy &&
      name == o.name &&
      optional == o.optional &&
      page_number == o.page_number &&
      recipient_id == o.recipient_id &&
      scale_value == o.scale_value &&
      stamp_type == o.stamp_type &&
      tab_id == o.tab_id &&
      tab_label == o.tab_label &&
      tab_type == o.tab_type &&
      template_locked == o.template_locked &&
      template_required == o.template_required &&
      tooltip == o.tooltip &&
      underline == o.underline &&
      value == o.value &&
      width == o.width &&
      x_position == o.x_position &&
      y_position == o.y_position
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

[View source]

335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 335

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_Maestro.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

[View source]

401
402
403
404
405
406
407
408
409
410
411
412
413
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 401

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

[View source]

314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 314

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
[View source]

301
302
303
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 301

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code

[View source]

307
308
309
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 307

def hash
  [anchor_string, bold, document_id, font, font_color, font_size, height, italic, locale_policy, name, optional, page_number, recipient_id, scale_value, stamp_type, tab_id, tab_label, tab_type, template_locked, template_required, tooltip, underline, value, width, x_position, y_position].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons

[View source]

250
251
252
253
254
255
256
257
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 250

def list_invalid_properties
  invalid_properties = Array.new
  if @tab_id.nil?
    invalid_properties.push('invalid value for "tab_id", tab_id cannot be nil.')
  end

  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

[View source]

381
382
383
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 381

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

[View source]

387
388
389
390
391
392
393
394
395
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 387

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

[View source]

375
376
377
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 375

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

[View source]

261
262
263
264
# File 'lib/docusign_maestro/models/e_sign_tabs.rb', line 261

def valid?
  return false if @tab_id.nil?
  true
end