Class: Verizon::DevicesConsentResult
- Defined in:
- lib/verizon/models/devices_consent_result.rb
Overview
DevicesConsentResult Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
Account identifier in “##########-#####”.
-
#all_device ⇒ TrueClass | FalseClass
Exclude all devices or not?.
-
#exclusion ⇒ Array[String]
Device ID list.
-
#has_more_data ⇒ TrueClass | FalseClass
Are there more devices to retrieve or not?.
-
#total_count ⇒ Integer
Total number of excluded devices in the account.
-
#update_time ⇒ String
Last update time.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(account_name = SKIP, all_device = SKIP, has_more_data = SKIP, total_count = SKIP, update_time = SKIP, exclusion = SKIP) ⇒ DevicesConsentResult
constructor
A new instance of DevicesConsentResult.
Methods inherited from BaseModel
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(account_name = SKIP, all_device = SKIP, has_more_data = SKIP, total_count = SKIP, update_time = SKIP, exclusion = SKIP) @account_name = account_name unless account_name == 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_name ⇒ String
Account identifier in “##########-#####”.
14 15 16 |
# File 'lib/verizon/models/devices_consent_result.rb', line 14 def account_name @account_name end |
#all_device ⇒ TrueClass | FalseClass
Exclude all devices or not?
18 19 20 |
# File 'lib/verizon/models/devices_consent_result.rb', line 18 def all_device @all_device end |
#exclusion ⇒ Array[String]
Device ID list.
34 35 36 |
# File 'lib/verizon/models/devices_consent_result.rb', line 34 def exclusion @exclusion end |
#has_more_data ⇒ TrueClass | FalseClass
Are there more devices to retrieve or not?
22 23 24 |
# File 'lib/verizon/models/devices_consent_result.rb', line 22 def has_more_data @has_more_data end |
#total_count ⇒ Integer
Total number of excluded devices in the account.
26 27 28 |
# File 'lib/verizon/models/devices_consent_result.rb', line 26 def total_count @total_count end |
#update_time ⇒ String
Last update time.
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. account_name = 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(account_name, all_device, has_more_data, total_count, update_time, exclusion) end |
.names ⇒ Object
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 |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/verizon/models/devices_consent_result.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
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 |