Class: Verizon::M5gBiaccountNameobject

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

Overview

M5gBiaccountNameobject 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 = SKIP, billing_cycle_end_date = SKIP, carrier_information = SKIP, connected = SKIP, created_at = SKIP, custom_fields = SKIP, device_ids = SKIP, extended_attributes = SKIP, group_names = SKIP, ipaddress = SKIP, last_activation_by = SKIP, last_activation_date = SKIP) ⇒ M5gBiaccountNameobject

Returns a new instance of M5gBiaccountNameobject.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/verizon/models/m_5g_biaccount_nameobject.rb', line 101

def initialize( = SKIP, billing_cycle_end_date = SKIP,
               carrier_information = SKIP, connected = SKIP,
               created_at = SKIP, custom_fields = SKIP, device_ids = SKIP,
               extended_attributes = SKIP, group_names = SKIP,
               ipaddress = SKIP, last_activation_by = SKIP,
               last_activation_date = SKIP)
  @account_name =  unless  == SKIP
  @billing_cycle_end_date = billing_cycle_end_date unless billing_cycle_end_date == SKIP
  @carrier_information = carrier_information unless carrier_information == SKIP
  @connected = connected unless connected == SKIP
  @created_at = created_at unless created_at == SKIP
  @custom_fields = custom_fields unless custom_fields == SKIP
  @device_ids = device_ids unless device_ids == SKIP
  @extended_attributes = extended_attributes unless extended_attributes == SKIP
  @group_names = group_names unless group_names == SKIP
  @ipaddress = ipaddress unless ipaddress == SKIP
  @last_activation_by = last_activation_by unless last_activation_by == SKIP
  @last_activation_date = last_activation_date unless last_activation_date == SKIP
end

Instance Attribute Details

#account_nameString

TODO: Write general description for this method

Returns:

  • (String)


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

def 
  @account_name
end

#billing_cycle_end_dateString

TODO: Write general description for this method

Returns:

  • (String)


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

def billing_cycle_end_date
  @billing_cycle_end_date
end

#carrier_informationArray[M5gBiCarrierInformation]

TODO: Write general description for this method

Returns:



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

def carrier_information
  @carrier_information
end

#connectedTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


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

def connected
  @connected
end

#created_atString

TODO: Write general description for this method

Returns:

  • (String)


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

def created_at
  @created_at
end

#custom_fieldsArray[M5gBikeyValue1]

TODO: Write general description for this method

Returns:



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

def custom_fields
  @custom_fields
end

#device_idsArray[M5gBideviceId1]

TODO: Write general description for this method

Returns:



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

def device_ids
  @device_ids
end

#extended_attributesArray[M5gBikeyValue1]

TODO: Write general description for this method

Returns:



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

def extended_attributes
  @extended_attributes
end

#group_namesArray[GroupName]

TODO: Write general description for this method

Returns:



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

def group_names
  @group_names
end

#ipaddressString

TODO: Write general description for this method

Returns:

  • (String)


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

def ipaddress
  @ipaddress
end

#last_activation_byString

TODO: Write general description for this method

Returns:

  • (String)


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

def last_activation_by
  @last_activation_by
end

#last_activation_dateString

TODO: Write general description for this method

Returns:

  • (String)


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

def last_activation_date
  @last_activation_date
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/verizon/models/m_5g_biaccount_nameobject.rb', line 122

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('accountName') ? hash['accountName'] : SKIP
  billing_cycle_end_date =
    hash.key?('billingCycleEndDate') ? hash['billingCycleEndDate'] : SKIP
  # Parameter is an array, so we need to iterate through it
  carrier_information = nil
  unless hash['carrierInformation'].nil?
    carrier_information = []
    hash['carrierInformation'].each do |structure|
      carrier_information << (M5gBiCarrierInformation.from_hash(structure) if structure)
    end
  end

  carrier_information = SKIP unless hash.key?('carrierInformation')
  connected = hash.key?('connected') ? hash['connected'] : SKIP
  created_at = hash.key?('createdAt') ? hash['createdAt'] : SKIP
  # Parameter is an array, so we need to iterate through it
  custom_fields = nil
  unless hash['customFields'].nil?
    custom_fields = []
    hash['customFields'].each do |structure|
      custom_fields << (M5gBikeyValue1.from_hash(structure) if structure)
    end
  end

  custom_fields = SKIP unless hash.key?('customFields')
  # Parameter is an array, so we need to iterate through it
  device_ids = nil
  unless hash['deviceIds'].nil?
    device_ids = []
    hash['deviceIds'].each do |structure|
      device_ids << (M5gBideviceId1.from_hash(structure) if structure)
    end
  end

  device_ids = SKIP unless hash.key?('deviceIds')
  # Parameter is an array, so we need to iterate through it
  extended_attributes = nil
  unless hash['extendedAttributes'].nil?
    extended_attributes = []
    hash['extendedAttributes'].each do |structure|
      extended_attributes << (M5gBikeyValue1.from_hash(structure) if structure)
    end
  end

  extended_attributes = SKIP unless hash.key?('extendedAttributes')
  # Parameter is an array, so we need to iterate through it
  group_names = nil
  unless hash['groupNames'].nil?
    group_names = []
    hash['groupNames'].each do |structure|
      group_names << (GroupName.from_hash(structure) if structure)
    end
  end

  group_names = SKIP unless hash.key?('groupNames')
  ipaddress = hash.key?('ipAddress') ? hash['ipAddress'] : SKIP
  last_activation_by =
    hash.key?('lastActivationBy') ? hash['lastActivationBy'] : SKIP
  last_activation_date =
    hash.key?('lastActivationDate') ? hash['lastActivationDate'] : SKIP

  # Create object from extracted values.
  M5gBiaccountNameobject.new(,
                             billing_cycle_end_date,
                             carrier_information,
                             connected,
                             created_at,
                             custom_fields,
                             device_ids,
                             extended_attributes,
                             group_names,
                             ipaddress,
                             last_activation_by,
                             last_activation_date)
end

.namesObject

A mapping from model property names to API property names.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/verizon/models/m_5g_biaccount_nameobject.rb', line 61

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_name'] = 'accountName'
  @_hash['billing_cycle_end_date'] = 'billingCycleEndDate'
  @_hash['carrier_information'] = 'carrierInformation'
  @_hash['connected'] = 'connected'
  @_hash['created_at'] = 'createdAt'
  @_hash['custom_fields'] = 'customFields'
  @_hash['device_ids'] = 'deviceIds'
  @_hash['extended_attributes'] = 'extendedAttributes'
  @_hash['group_names'] = 'groupNames'
  @_hash['ipaddress'] = 'ipAddress'
  @_hash['last_activation_by'] = 'lastActivationBy'
  @_hash['last_activation_date'] = 'lastActivationDate'
  @_hash
end

.nullablesObject

An array for nullable fields



97
98
99
# File 'lib/verizon/models/m_5g_biaccount_nameobject.rb', line 97

def self.nullables
  []
end

.optionalsObject

An array for optional fields



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/verizon/models/m_5g_biaccount_nameobject.rb', line 79

def self.optionals
  %w[
    account_name
    billing_cycle_end_date
    carrier_information
    connected
    created_at
    custom_fields
    device_ids
    extended_attributes
    group_names
    ipaddress
    last_activation_by
    last_activation_date
  ]
end