Class: Verizon::GetDeviceListWithProfilesRequest

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

Overview

GetDeviceListWithProfilesRequest 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 = 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( = nil, provisioning_status_filter = SKIP,
               profile_status_filter = SKIP, carrier_name_filter = SKIP,
               device_filter = SKIP)
  @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_nameString

TODO: Write general description for this method

Returns:

  • (String)


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

def 
  @account_name
end

#carrier_name_filterString

TODO: Write general description for this method

Returns:

  • (String)


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_filterArray[GIODeviceId]

TODO: Write general description for this method

Returns:



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

def device_filter
  @device_filter
end

#profile_status_filterString

TODO: Write general description for this method

Returns:

  • (String)


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_filterString

TODO: Write general description for this method

Returns:

  • (String)


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.
   = 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(,
                                       provisioning_status_filter,
                                       profile_status_filter,
                                       carrier_name_filter,
                                       device_filter)
end

.namesObject

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

.nullablesObject

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

.optionalsObject

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