Class: Verizon::M2mV1IntelligenceWirelessCoverageRequest

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

Overview

M2mV1IntelligenceWirelessCoverageRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(account_name = SKIP, request_type = SKIP, location_type = SKIP, locations = SKIP, network_types_list = SKIP) ⇒ M2mV1IntelligenceWirelessCoverageRequest

Returns a new instance of M2mV1IntelligenceWirelessCoverageRequest.



60
61
62
63
64
65
66
67
68
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 60

def initialize( = SKIP, request_type = SKIP,
               location_type = SKIP, locations = SKIP,
               network_types_list = SKIP)
  @account_name =  unless  == SKIP
  @request_type = request_type unless request_type == SKIP
  @location_type = location_type unless location_type == SKIP
  @locations = locations unless locations == SKIP
  @network_types_list = network_types_list unless network_types_list == SKIP
end

Instance Attribute Details

#account_nameString

Account name.

Returns:

  • (String)


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

def 
  @account_name
end

#location_typeString

Type of location detail.

Returns:

  • (String)


23
24
25
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 23

def location_type
  @location_type
end

#locationsLocations1

Type of location detail.

Returns:



27
28
29
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 27

def locations
  @locations
end

#network_types_listArray[NetworkTypeObject]

Type of location detail.

Returns:



31
32
33
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 31

def network_types_list
  @network_types_list
end

#request_typeString

Type of request made. FWA for address qualification and NW for Nationwide coverage.

Returns:

  • (String)


19
20
21
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 19

def request_type
  @request_type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



71
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
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 71

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('accountName') ? hash['accountName'] : SKIP
  request_type = hash.key?('requestType') ? hash['requestType'] : SKIP
  location_type = hash.key?('locationType') ? hash['locationType'] : SKIP
  locations = Locations1.from_hash(hash['locations']) if hash['locations']
  # Parameter is an array, so we need to iterate through it
  network_types_list = nil
  unless hash['networkTypesList'].nil?
    network_types_list = []
    hash['networkTypesList'].each do |structure|
      network_types_list << (NetworkTypeObject.from_hash(structure) if structure)
    end
  end

  network_types_list = SKIP unless hash.key?('networkTypesList')

  # Create object from extracted values.
  M2mV1IntelligenceWirelessCoverageRequest.new(,
                                               request_type,
                                               location_type,
                                               locations,
                                               network_types_list)
end

.namesObject

A mapping from model property names to API property names.



34
35
36
37
38
39
40
41
42
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 34

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_name'] = 'accountName'
  @_hash['request_type'] = 'requestType'
  @_hash['location_type'] = 'locationType'
  @_hash['locations'] = 'locations'
  @_hash['network_types_list'] = 'networkTypesList'
  @_hash
end

.nullablesObject

An array for nullable fields



56
57
58
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 56

def self.nullables
  []
end

.optionalsObject

An array for optional fields



45
46
47
48
49
50
51
52
53
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 45

def self.optionals
  %w[
    account_name
    request_type
    location_type
    locations
    network_types_list
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



107
108
109
110
111
112
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 107

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} account_name: #{@account_name.inspect}, request_type:"\
  " #{@request_type.inspect}, location_type: #{@location_type.inspect}, locations:"\
  " #{@locations.inspect}, network_types_list: #{@network_types_list.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



99
100
101
102
103
104
# File 'lib/verizon/models/m2m__v1_intelligence_wireless_coverage_request.rb', line 99

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} account_name: #{@account_name}, request_type: #{@request_type},"\
  " location_type: #{@location_type}, locations: #{@locations}, network_types_list:"\
  " #{@network_types_list}>"
end