Class: Verizon::GetDeviceListWithProfilesRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::GetDeviceListWithProfilesRequest
- Defined in:
- lib/verizon/models/get_device_list_with_profiles_request.rb
Overview
GetDeviceListWithProfilesRequest Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
TODO: Write general description for this method.
-
#carrier_name_filter ⇒ String
TODO: Write general description for this method.
-
#device_filter ⇒ Array[GIODeviceId]
TODO: Write general description for this method.
-
#profile_status_filter ⇒ String
TODO: Write general description for this method.
-
#provisioning_status_filter ⇒ String
TODO: Write general description for this method.
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 = nil, provisioning_status_filter = SKIP, profile_status_filter = SKIP, carrier_name_filter = SKIP, device_filter = SKIP) ⇒ GetDeviceListWithProfilesRequest
constructor
A new instance of GetDeviceListWithProfilesRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(account_name = nil, provisioning_status_filter = SKIP, profile_status_filter = SKIP, carrier_name_filter = SKIP, device_filter = SKIP) ⇒ GetDeviceListWithProfilesRequest
Returns a new instance of GetDeviceListWithProfilesRequest.
58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/verizon/models/get_device_list_with_profiles_request.rb', line 58 def initialize(account_name = nil, provisioning_status_filter = SKIP, profile_status_filter = SKIP, carrier_name_filter = SKIP, device_filter = SKIP) @account_name = account_name unless provisioning_status_filter == SKIP @provisioning_status_filter = provisioning_status_filter end @profile_status_filter = profile_status_filter unless profile_status_filter == SKIP @carrier_name_filter = carrier_name_filter unless carrier_name_filter == SKIP @device_filter = device_filter unless device_filter == SKIP end |
Instance Attribute Details
#account_name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/verizon/models/get_device_list_with_profiles_request.rb', line 14 def account_name @account_name end |
#carrier_name_filter ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/verizon/models/get_device_list_with_profiles_request.rb', line 26 def carrier_name_filter @carrier_name_filter end |
#device_filter ⇒ Array[GIODeviceId]
TODO: Write general description for this method
30 31 32 |
# File 'lib/verizon/models/get_device_list_with_profiles_request.rb', line 30 def device_filter @device_filter end |
#profile_status_filter ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/verizon/models/get_device_list_with_profiles_request.rb', line 22 def profile_status_filter @profile_status_filter end |
#provisioning_status_filter ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/verizon/models/get_device_list_with_profiles_request.rb', line 18 def provisioning_status_filter @provisioning_status_filter end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 100 |
# File 'lib/verizon/models/get_device_list_with_profiles_request.rb', line 72 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : nil provisioning_status_filter = hash.key?('provisioningStatusFilter') ? hash['provisioningStatusFilter'] : SKIP profile_status_filter = hash.key?('profileStatusFilter') ? hash['profileStatusFilter'] : SKIP carrier_name_filter = hash.key?('carrierNameFilter') ? hash['carrierNameFilter'] : SKIP # Parameter is an array, so we need to iterate through it device_filter = nil unless hash['deviceFilter'].nil? device_filter = [] hash['deviceFilter'].each do |structure| device_filter << (GIODeviceId.from_hash(structure) if structure) end end device_filter = SKIP unless hash.key?('deviceFilter') # Create object from extracted values. GetDeviceListWithProfilesRequest.new(account_name, provisioning_status_filter, profile_status_filter, carrier_name_filter, device_filter) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/verizon/models/get_device_list_with_profiles_request.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['provisioning_status_filter'] = 'provisioningStatusFilter' @_hash['profile_status_filter'] = 'profileStatusFilter' @_hash['carrier_name_filter'] = 'carrierNameFilter' @_hash['device_filter'] = 'deviceFilter' @_hash end |
.nullables ⇒ Object
An array for nullable fields
54 55 56 |
# File 'lib/verizon/models/get_device_list_with_profiles_request.rb', line 54 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 |
# File 'lib/verizon/models/get_device_list_with_profiles_request.rb', line 44 def self.optionals %w[ provisioning_status_filter profile_status_filter carrier_name_filter device_filter ] end |