Class: Verizon::SearchDeviceByPropertyResponse

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

Overview

The device identifier and fields to match in the search.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(billingaccountid = SKIP, createdon = SKIP, eventretention = SKIP, fields = SKIP, iccid = SKIP, id = SKIP, imei = SKIP, kind = SKIP, lastupdated = SKIP, providerid = SKIP, refid = SKIP, refidtype = SKIP, state = SKIP, version = SKIP, versionid = SKIP) ⇒ SearchDeviceByPropertyResponse

Returns a new instance of SearchDeviceByPropertyResponse.



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/verizon/models/search_device_by_property_response.rb', line 119

def initialize(billingaccountid = SKIP, createdon = SKIP,
               eventretention = SKIP, fields = SKIP, iccid = SKIP,
               id = SKIP, imei = SKIP, kind = SKIP, lastupdated = SKIP,
               providerid = SKIP, refid = SKIP, refidtype = SKIP,
               state = SKIP, version = SKIP, versionid = SKIP)
  @billingaccountid = billingaccountid unless billingaccountid == SKIP
  @createdon = createdon unless createdon == SKIP
  @eventretention = eventretention unless eventretention == SKIP
  @fields = fields unless fields == SKIP
  @iccid = iccid unless iccid == SKIP
  @id = id unless id == SKIP
  @imei = imei unless imei == SKIP
  @kind = kind unless kind == SKIP
  @lastupdated = lastupdated unless lastupdated == SKIP
  @providerid = providerid unless providerid == SKIP
  @refid = refid unless refid == SKIP
  @refidtype = refidtype unless refidtype == SKIP
  @state = state unless state == SKIP
  @version = version unless version == SKIP
  @versionid = versionid unless versionid == SKIP
end

Instance Attribute Details

#billingaccountidString

Billing account ID of the resource.

Returns:

  • (String)


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

def billingaccountid
  @billingaccountid
end

#createdonString

The date the resource was created.

Returns:

  • (String)


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

def createdon
  @createdon
end

#eventretentionString

The date the resource was created.

Returns:

  • (String)


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

def eventretention
  @eventretention
end

#fieldsFields1

The date the resource was created.

Returns:



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

def fields
  @fields
end

#iccidString

Cellular SIM card identifier.

Returns:

  • (String)


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

def iccid
  @iccid
end

#idString

ThingSpace unique ID for the device that was added.

Returns:

  • (String)


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

def id
  @id
end

#imeiString

4G hardware device identifier.

Returns:

  • (String)


38
39
40
# File 'lib/verizon/models/search_device_by_property_response.rb', line 38

def imei
  @imei
end

#kindString

Identifies the resource kind.

Returns:

  • (String)


42
43
44
# File 'lib/verizon/models/search_device_by_property_response.rb', line 42

def kind
  @kind
end

#lastupdatedString

The date the resource was last updated.

Returns:

  • (String)


46
47
48
# File 'lib/verizon/models/search_device_by_property_response.rb', line 46

def lastupdated
  @lastupdated
end

#provideridString

The device’s service provider.

Returns:

  • (String)


50
51
52
# File 'lib/verizon/models/search_device_by_property_response.rb', line 50

def providerid
  @providerid
end

#refidString

The value of the refidtype identifier.

Returns:

  • (String)


54
55
56
# File 'lib/verizon/models/search_device_by_property_response.rb', line 54

def refid
  @refid
end

#refidtypeString

The device identifier type used to refer to this device.

Returns:

  • (String)


58
59
60
# File 'lib/verizon/models/search_device_by_property_response.rb', line 58

def refidtype
  @refidtype
end

#stateString

Service state of the device.

Returns:

  • (String)


62
63
64
# File 'lib/verizon/models/search_device_by_property_response.rb', line 62

def state
  @state
end

#versionString

Version of the underlying schema resource.

Returns:

  • (String)


66
67
68
# File 'lib/verizon/models/search_device_by_property_response.rb', line 66

def version
  @version
end

#versionidString

The version of the resource.

Returns:

  • (String)


70
71
72
# File 'lib/verizon/models/search_device_by_property_response.rb', line 70

def versionid
  @versionid
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/verizon/models/search_device_by_property_response.rb', line 142

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  billingaccountid =
    hash.key?('billingaccountid') ? hash['billingaccountid'] : SKIP
  createdon = hash.key?('createdon') ? hash['createdon'] : SKIP
  eventretention =
    hash.key?('eventretention') ? hash['eventretention'] : SKIP
  fields = Fields1.from_hash(hash['fields']) if hash['fields']
  iccid = hash.key?('iccid') ? hash['iccid'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP
  imei = hash.key?('imei') ? hash['imei'] : SKIP
  kind = hash.key?('kind') ? hash['kind'] : SKIP
  lastupdated = hash.key?('lastupdated') ? hash['lastupdated'] : SKIP
  providerid = hash.key?('providerid') ? hash['providerid'] : SKIP
  refid = hash.key?('refid') ? hash['refid'] : SKIP
  refidtype = hash.key?('refidtype') ? hash['refidtype'] : SKIP
  state = hash.key?('state') ? hash['state'] : SKIP
  version = hash.key?('version') ? hash['version'] : SKIP
  versionid = hash.key?('versionid') ? hash['versionid'] : SKIP

  # Create object from extracted values.
  SearchDeviceByPropertyResponse.new(billingaccountid,
                                     createdon,
                                     eventretention,
                                     fields,
                                     iccid,
                                     id,
                                     imei,
                                     kind,
                                     lastupdated,
                                     providerid,
                                     refid,
                                     refidtype,
                                     state,
                                     version,
                                     versionid)
end

.namesObject

A mapping from model property names to API property names.



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/verizon/models/search_device_by_property_response.rb', line 73

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['billingaccountid'] = 'billingaccountid'
  @_hash['createdon'] = 'createdon'
  @_hash['eventretention'] = 'eventretention'
  @_hash['fields'] = 'fields'
  @_hash['iccid'] = 'iccid'
  @_hash['id'] = 'id'
  @_hash['imei'] = 'imei'
  @_hash['kind'] = 'kind'
  @_hash['lastupdated'] = 'lastupdated'
  @_hash['providerid'] = 'providerid'
  @_hash['refid'] = 'refid'
  @_hash['refidtype'] = 'refidtype'
  @_hash['state'] = 'state'
  @_hash['version'] = 'version'
  @_hash['versionid'] = 'versionid'
  @_hash
end

.nullablesObject

An array for nullable fields



115
116
117
# File 'lib/verizon/models/search_device_by_property_response.rb', line 115

def self.nullables
  []
end

.optionalsObject

An array for optional fields



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/verizon/models/search_device_by_property_response.rb', line 94

def self.optionals
  %w[
    billingaccountid
    createdon
    eventretention
    fields
    iccid
    id
    imei
    kind
    lastupdated
    providerid
    refid
    refidtype
    state
    version
    versionid
  ]
end