Class: Verizon::DevicesConsentResult

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/verizon/models/devices_consent_result.rb

Overview

DevicesConsentResult Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(account_name = SKIP, all_device = SKIP, has_more_data = SKIP, total_count = SKIP, update_time = SKIP, exclusion = SKIP) ⇒ DevicesConsentResult

Returns a new instance of DevicesConsentResult.



65
66
67
68
69
70
71
72
73
# File 'lib/verizon/models/devices_consent_result.rb', line 65

def initialize( = SKIP, all_device = SKIP, has_more_data = SKIP,
               total_count = SKIP, update_time = SKIP, exclusion = SKIP)
  @account_name =  unless  == SKIP
  @all_device = all_device unless all_device == SKIP
  @has_more_data = has_more_data unless has_more_data == SKIP
  @total_count = total_count unless total_count == SKIP
  @update_time = update_time unless update_time == SKIP
  @exclusion = exclusion unless exclusion == SKIP
end

Instance Attribute Details

#account_nameString

Account identifier in “##########-#####”.

Returns:

  • (String)


14
15
16
# File 'lib/verizon/models/devices_consent_result.rb', line 14

def 
  @account_name
end

#all_deviceTrueClass | FalseClass

Exclude all devices or not?

Returns:

  • (TrueClass | FalseClass)


18
19
20
# File 'lib/verizon/models/devices_consent_result.rb', line 18

def all_device
  @all_device
end

#exclusionArray[String]

Device ID list.

Returns:

  • (Array[String])


34
35
36
# File 'lib/verizon/models/devices_consent_result.rb', line 34

def exclusion
  @exclusion
end

#has_more_dataTrueClass | FalseClass

Are there more devices to retrieve or not?

Returns:

  • (TrueClass | FalseClass)


22
23
24
# File 'lib/verizon/models/devices_consent_result.rb', line 22

def has_more_data
  @has_more_data
end

#total_countInteger

Total number of excluded devices in the account.

Returns:

  • (Integer)


26
27
28
# File 'lib/verizon/models/devices_consent_result.rb', line 26

def total_count
  @total_count
end

#update_timeString

Last update time.

Returns:

  • (String)


30
31
32
# File 'lib/verizon/models/devices_consent_result.rb', line 30

def update_time
  @update_time
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/verizon/models/devices_consent_result.rb', line 76

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('accountName') ? hash['accountName'] : SKIP
  all_device = hash.key?('allDevice') ? hash['allDevice'] : SKIP
  has_more_data = hash.key?('hasMoreData') ? hash['hasMoreData'] : SKIP
  total_count = hash.key?('totalCount') ? hash['totalCount'] : SKIP
  update_time = hash.key?('updateTime') ? hash['updateTime'] : SKIP
  exclusion = hash.key?('exclusion') ? hash['exclusion'] : SKIP

  # Create object from extracted values.
  DevicesConsentResult.new(,
                           all_device,
                           has_more_data,
                           total_count,
                           update_time,
                           exclusion)
end

.namesObject

A mapping from model property names to API property names.



37
38
39
40
41
42
43
44
45
46
# File 'lib/verizon/models/devices_consent_result.rb', line 37

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_name'] = 'accountName'
  @_hash['all_device'] = 'allDevice'
  @_hash['has_more_data'] = 'hasMoreData'
  @_hash['total_count'] = 'totalCount'
  @_hash['update_time'] = 'updateTime'
  @_hash['exclusion'] = 'exclusion'
  @_hash
end

.nullablesObject

An array for nullable fields



61
62
63
# File 'lib/verizon/models/devices_consent_result.rb', line 61

def self.nullables
  []
end

.optionalsObject

An array for optional fields



49
50
51
52
53
54
55
56
57
58
# File 'lib/verizon/models/devices_consent_result.rb', line 49

def self.optionals
  %w[
    account_name
    all_device
    has_more_data
    total_count
    update_time
    exclusion
  ]
end