Class: DocuSign_eSign::LocalePolicy

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LocalePolicy

Initializes the object

Parameters:

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

    Model attributes in the form of hash


233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
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
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
# File 'lib/docusign_esign/models/locale_policy.rb', line 233

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#address_formatObject

Returns the value of attribute address_format


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

def address_format
  @address_format
end

#address_format_metadataObject

Returns the value of attribute address_format_metadata


20
21
22
# File 'lib/docusign_esign/models/locale_policy.rb', line 20

def 
  @address_format_metadata
end

#allow_regionObject

Returns the value of attribute allow_region


23
24
25
# File 'lib/docusign_esign/models/locale_policy.rb', line 23

def allow_region
  @allow_region
end

#calendar_typeObject

Returns the value of attribute calendar_type


26
27
28
# File 'lib/docusign_esign/models/locale_policy.rb', line 26

def calendar_type
  @calendar_type
end

#calendar_type_metadataObject

Returns the value of attribute calendar_type_metadata


28
29
30
# File 'lib/docusign_esign/models/locale_policy.rb', line 28

def 
  @calendar_type_metadata
end

#culture_nameObject

Returns the value of attribute culture_name


31
32
33
# File 'lib/docusign_esign/models/locale_policy.rb', line 31

def culture_name
  @culture_name
end

#culture_name_metadataObject

Returns the value of attribute culture_name_metadata


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

def 
  @culture_name_metadata
end

#currency_codeObject

Returns the value of attribute currency_code


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

def currency_code
  @currency_code
end

#currency_code_metadataObject

Returns the value of attribute currency_code_metadata


38
39
40
# File 'lib/docusign_esign/models/locale_policy.rb', line 38

def 
  @currency_code_metadata
end

#currency_negative_formatObject

Returns the value of attribute currency_negative_format


41
42
43
# File 'lib/docusign_esign/models/locale_policy.rb', line 41

def currency_negative_format
  @currency_negative_format
end

#currency_negative_format_metadataObject

Returns the value of attribute currency_negative_format_metadata


43
44
45
# File 'lib/docusign_esign/models/locale_policy.rb', line 43

def 
  @currency_negative_format_metadata
end

#currency_positive_formatObject

Returns the value of attribute currency_positive_format


46
47
48
# File 'lib/docusign_esign/models/locale_policy.rb', line 46

def currency_positive_format
  @currency_positive_format
end

#currency_positive_format_metadataObject

Returns the value of attribute currency_positive_format_metadata


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

def 
  @currency_positive_format_metadata
end

#custom_date_formatObject

Returns the value of attribute custom_date_format


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

def custom_date_format
  @custom_date_format
end

#custom_sign_date_formatObject

Returns the value of attribute custom_sign_date_format


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

def custom_sign_date_format
  @custom_sign_date_format
end

#custom_sign_time_formatObject

Returns the value of attribute custom_sign_time_format


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

def custom_sign_time_format
  @custom_sign_time_format
end

#custom_time_formatObject

Returns the value of attribute custom_time_format


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

def custom_time_format
  @custom_time_format
end

#date_formatObject

Returns the value of attribute date_format


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

def date_format
  @date_format
end

#date_format_metadataObject

Returns the value of attribute date_format_metadata


65
66
67
# File 'lib/docusign_esign/models/locale_policy.rb', line 65

def 
  @date_format_metadata
end

#effective_address_formatObject

Returns the value of attribute effective_address_format


68
69
70
# File 'lib/docusign_esign/models/locale_policy.rb', line 68

def effective_address_format
  @effective_address_format
end

#effective_calendar_typeObject

Returns the value of attribute effective_calendar_type


71
72
73
# File 'lib/docusign_esign/models/locale_policy.rb', line 71

def effective_calendar_type
  @effective_calendar_type
end

#effective_currency_codeObject

Returns the value of attribute effective_currency_code


74
75
76
# File 'lib/docusign_esign/models/locale_policy.rb', line 74

def effective_currency_code
  @effective_currency_code
end

#effective_currency_negative_formatObject

Returns the value of attribute effective_currency_negative_format


77
78
79
# File 'lib/docusign_esign/models/locale_policy.rb', line 77

def effective_currency_negative_format
  @effective_currency_negative_format
end

#effective_currency_positive_formatObject

Returns the value of attribute effective_currency_positive_format


80
81
82
# File 'lib/docusign_esign/models/locale_policy.rb', line 80

def effective_currency_positive_format
  @effective_currency_positive_format
end

#effective_custom_date_formatObject

Returns the value of attribute effective_custom_date_format


83
84
85
# File 'lib/docusign_esign/models/locale_policy.rb', line 83

def effective_custom_date_format
  @effective_custom_date_format
end

#effective_custom_time_formatObject

Returns the value of attribute effective_custom_time_format


86
87
88
# File 'lib/docusign_esign/models/locale_policy.rb', line 86

def effective_custom_time_format
  @effective_custom_time_format
end

#effective_date_formatObject

Returns the value of attribute effective_date_format


89
90
91
# File 'lib/docusign_esign/models/locale_policy.rb', line 89

def effective_date_format
  @effective_date_format
end

#effective_initial_formatObject

Returns the value of attribute effective_initial_format


92
93
94
# File 'lib/docusign_esign/models/locale_policy.rb', line 92

def effective_initial_format
  @effective_initial_format
end

#effective_name_formatObject

Returns the value of attribute effective_name_format


95
96
97
# File 'lib/docusign_esign/models/locale_policy.rb', line 95

def effective_name_format
  @effective_name_format
end

#effective_time_formatObject

Returns the value of attribute effective_time_format


98
99
100
# File 'lib/docusign_esign/models/locale_policy.rb', line 98

def effective_time_format
  @effective_time_format
end

#effective_time_zoneObject

Returns the value of attribute effective_time_zone


101
102
103
# File 'lib/docusign_esign/models/locale_policy.rb', line 101

def effective_time_zone
  @effective_time_zone
end

#initial_formatObject

Returns the value of attribute initial_format


104
105
106
# File 'lib/docusign_esign/models/locale_policy.rb', line 104

def initial_format
  @initial_format
end

#initial_format_metadataObject

Returns the value of attribute initial_format_metadata


106
107
108
# File 'lib/docusign_esign/models/locale_policy.rb', line 106

def 
  @initial_format_metadata
end

#name_formatObject

Returns the value of attribute name_format


109
110
111
# File 'lib/docusign_esign/models/locale_policy.rb', line 109

def name_format
  @name_format
end

#name_format_metadataObject

Returns the value of attribute name_format_metadata


111
112
113
# File 'lib/docusign_esign/models/locale_policy.rb', line 111

def 
  @name_format_metadata
end

#sign_date_formatObject

Returns the value of attribute sign_date_format


114
115
116
# File 'lib/docusign_esign/models/locale_policy.rb', line 114

def sign_date_format
  @sign_date_format
end

#sign_date_format_metadataObject

Returns the value of attribute sign_date_format_metadata


116
117
118
# File 'lib/docusign_esign/models/locale_policy.rb', line 116

def 
  @sign_date_format_metadata
end

#sign_time_formatObject

Returns the value of attribute sign_time_format


119
120
121
# File 'lib/docusign_esign/models/locale_policy.rb', line 119

def sign_time_format
  @sign_time_format
end

#sign_time_format_metadataObject

Returns the value of attribute sign_time_format_metadata


121
122
123
# File 'lib/docusign_esign/models/locale_policy.rb', line 121

def 
  @sign_time_format_metadata
end

#time_formatObject

Returns the value of attribute time_format


124
125
126
# File 'lib/docusign_esign/models/locale_policy.rb', line 124

def time_format
  @time_format
end

#time_format_metadataObject

Returns the value of attribute time_format_metadata


126
127
128
# File 'lib/docusign_esign/models/locale_policy.rb', line 126

def 
  @time_format_metadata
end

#time_zoneObject

Returns the value of attribute time_zone


129
130
131
# File 'lib/docusign_esign/models/locale_policy.rb', line 129

def time_zone
  @time_zone
end

#time_zone_metadataObject

Returns the value of attribute time_zone_metadata


131
132
133
# File 'lib/docusign_esign/models/locale_policy.rb', line 131

def 
  @time_zone_metadata
end

Class Method Details

.attribute_mapObject

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


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
# File 'lib/docusign_esign/models/locale_policy.rb', line 134

def self.attribute_map
  {
    :'address_format' => :'addressFormat',
    :'address_format_metadata' => :'addressFormatMetadata',
    :'allow_region' => :'allowRegion',
    :'calendar_type' => :'calendarType',
    :'calendar_type_metadata' => :'calendarTypeMetadata',
    :'culture_name' => :'cultureName',
    :'culture_name_metadata' => :'cultureNameMetadata',
    :'currency_code' => :'currencyCode',
    :'currency_code_metadata' => :'currencyCodeMetadata',
    :'currency_negative_format' => :'currencyNegativeFormat',
    :'currency_negative_format_metadata' => :'currencyNegativeFormatMetadata',
    :'currency_positive_format' => :'currencyPositiveFormat',
    :'currency_positive_format_metadata' => :'currencyPositiveFormatMetadata',
    :'custom_date_format' => :'customDateFormat',
    :'custom_sign_date_format' => :'customSignDateFormat',
    :'custom_sign_time_format' => :'customSignTimeFormat',
    :'custom_time_format' => :'customTimeFormat',
    :'date_format' => :'dateFormat',
    :'date_format_metadata' => :'dateFormatMetadata',
    :'effective_address_format' => :'effectiveAddressFormat',
    :'effective_calendar_type' => :'effectiveCalendarType',
    :'effective_currency_code' => :'effectiveCurrencyCode',
    :'effective_currency_negative_format' => :'effectiveCurrencyNegativeFormat',
    :'effective_currency_positive_format' => :'effectiveCurrencyPositiveFormat',
    :'effective_custom_date_format' => :'effectiveCustomDateFormat',
    :'effective_custom_time_format' => :'effectiveCustomTimeFormat',
    :'effective_date_format' => :'effectiveDateFormat',
    :'effective_initial_format' => :'effectiveInitialFormat',
    :'effective_name_format' => :'effectiveNameFormat',
    :'effective_time_format' => :'effectiveTimeFormat',
    :'effective_time_zone' => :'effectiveTimeZone',
    :'initial_format' => :'initialFormat',
    :'initial_format_metadata' => :'initialFormatMetadata',
    :'name_format' => :'nameFormat',
    :'name_format_metadata' => :'nameFormatMetadata',
    :'sign_date_format' => :'signDateFormat',
    :'sign_date_format_metadata' => :'signDateFormatMetadata',
    :'sign_time_format' => :'signTimeFormat',
    :'sign_time_format_metadata' => :'signTimeFormatMetadata',
    :'time_format' => :'timeFormat',
    :'time_format_metadata' => :'timeFormatMetadata',
    :'time_zone' => :'timeZone',
    :'time_zone_metadata' => :'timeZoneMetadata'
  }
end

.swagger_typesObject

Attribute type mapping.


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
# File 'lib/docusign_esign/models/locale_policy.rb', line 183

def self.swagger_types
  {
    :'address_format' => :'String',
    :'address_format_metadata' => :'SettingsMetadata',
    :'allow_region' => :'String',
    :'calendar_type' => :'String',
    :'calendar_type_metadata' => :'SettingsMetadata',
    :'culture_name' => :'String',
    :'culture_name_metadata' => :'SettingsMetadata',
    :'currency_code' => :'String',
    :'currency_code_metadata' => :'SettingsMetadata',
    :'currency_negative_format' => :'String',
    :'currency_negative_format_metadata' => :'SettingsMetadata',
    :'currency_positive_format' => :'String',
    :'currency_positive_format_metadata' => :'SettingsMetadata',
    :'custom_date_format' => :'String',
    :'custom_sign_date_format' => :'String',
    :'custom_sign_time_format' => :'String',
    :'custom_time_format' => :'String',
    :'date_format' => :'String',
    :'date_format_metadata' => :'SettingsMetadata',
    :'effective_address_format' => :'String',
    :'effective_calendar_type' => :'String',
    :'effective_currency_code' => :'String',
    :'effective_currency_negative_format' => :'String',
    :'effective_currency_positive_format' => :'String',
    :'effective_custom_date_format' => :'String',
    :'effective_custom_time_format' => :'String',
    :'effective_date_format' => :'String',
    :'effective_initial_format' => :'String',
    :'effective_name_format' => :'String',
    :'effective_time_format' => :'String',
    :'effective_time_zone' => :'String',
    :'initial_format' => :'String',
    :'initial_format_metadata' => :'SettingsMetadata',
    :'name_format' => :'String',
    :'name_format_metadata' => :'SettingsMetadata',
    :'sign_date_format' => :'String',
    :'sign_date_format_metadata' => :'SettingsMetadata',
    :'sign_time_format' => :'String',
    :'sign_time_format_metadata' => :'SettingsMetadata',
    :'time_format' => :'String',
    :'time_format_metadata' => :'SettingsMetadata',
    :'time_zone' => :'String',
    :'time_zone_metadata' => :'SettingsMetadata'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared


427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/docusign_esign/models/locale_policy.rb', line 427

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      address_format == o.address_format &&
       == o. &&
      allow_region == o.allow_region &&
      calendar_type == o.calendar_type &&
       == o. &&
      culture_name == o.culture_name &&
       == o. &&
      currency_code == o.currency_code &&
       == o. &&
      currency_negative_format == o.currency_negative_format &&
       == o. &&
      currency_positive_format == o.currency_positive_format &&
       == o. &&
      custom_date_format == o.custom_date_format &&
      custom_sign_date_format == o.custom_sign_date_format &&
      custom_sign_time_format == o.custom_sign_time_format &&
      custom_time_format == o.custom_time_format &&
      date_format == o.date_format &&
       == o. &&
      effective_address_format == o.effective_address_format &&
      effective_calendar_type == o.effective_calendar_type &&
      effective_currency_code == o.effective_currency_code &&
      effective_currency_negative_format == o.effective_currency_negative_format &&
      effective_currency_positive_format == o.effective_currency_positive_format &&
      effective_custom_date_format == o.effective_custom_date_format &&
      effective_custom_time_format == o.effective_custom_time_format &&
      effective_date_format == o.effective_date_format &&
      effective_initial_format == o.effective_initial_format &&
      effective_name_format == o.effective_name_format &&
      effective_time_format == o.effective_time_format &&
      effective_time_zone == o.effective_time_zone &&
      initial_format == o.initial_format &&
       == o. &&
      name_format == o.name_format &&
       == o. &&
      sign_date_format == o.sign_date_format &&
       == o. &&
      sign_time_format == o.sign_time_format &&
       == o. &&
      time_format == o.time_format &&
       == o. &&
      time_zone == o.time_zone &&
       == o.
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


511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
# File 'lib/docusign_esign/models/locale_policy.rb', line 511

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


577
578
579
580
581
582
583
584
585
586
587
588
589
# File 'lib/docusign_esign/models/locale_policy.rb', line 577

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


490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
# File 'lib/docusign_esign/models/locale_policy.rb', line 490

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

477
478
479
# File 'lib/docusign_esign/models/locale_policy.rb', line 477

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code


483
484
485
# File 'lib/docusign_esign/models/locale_policy.rb', line 483

def hash
  [address_format, , allow_region, calendar_type, , culture_name, , currency_code, , currency_negative_format, , currency_positive_format, , custom_date_format, custom_sign_date_format, custom_sign_time_format, custom_time_format, date_format, , effective_address_format, effective_calendar_type, effective_currency_code, effective_currency_negative_format, effective_currency_positive_format, effective_custom_date_format, effective_custom_time_format, effective_date_format, effective_initial_format, effective_name_format, effective_time_format, effective_time_zone, initial_format, , name_format, , sign_date_format, , sign_time_format, , time_format, , time_zone, ].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons


414
415
416
417
# File 'lib/docusign_esign/models/locale_policy.rb', line 414

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


557
558
559
# File 'lib/docusign_esign/models/locale_policy.rb', line 557

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


563
564
565
566
567
568
569
570
571
# File 'lib/docusign_esign/models/locale_policy.rb', line 563

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


551
552
553
# File 'lib/docusign_esign/models/locale_policy.rb', line 551

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


421
422
423
# File 'lib/docusign_esign/models/locale_policy.rb', line 421

def valid?
  true
end