Class: Verizon::GetAccountInformationResponseforplanner

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

Overview

GetAccountInformationResponseforplanner 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, account_number = SKIP, carriers = SKIP, features = SKIP, ip_pools = SKIP, is_provisioning_allowed = SKIP, organization_name = SKIP, service_plans = SKIP) ⇒ GetAccountInformationResponseforplanner

Returns a new instance of GetAccountInformationResponseforplanner.



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

def initialize( = SKIP,  = SKIP, carriers = SKIP,
               features = SKIP, ip_pools = SKIP,
               is_provisioning_allowed = SKIP, organization_name = SKIP,
               service_plans = SKIP)
  @account_name =  unless  == SKIP
  @account_number =  unless  == SKIP
  @carriers = carriers unless carriers == SKIP
  @features = features unless features == SKIP
  @ip_pools = ip_pools unless ip_pools == SKIP
  @is_provisioning_allowed = is_provisioning_allowed unless is_provisioning_allowed == SKIP
  @organization_name = organization_name unless organization_name == SKIP
  @service_plans = service_plans unless service_plans == SKIP
end

Instance Attribute Details

#account_nameString

TODO: Write general description for this method

Returns:

  • (String)


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

def 
  @account_name
end

#account_numberString

The numeric name of the account, including leading zeros.

Returns:

  • (String)


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

def 
  @account_number
end

#carriersArray[String]

The list of carrier names with profiles.

Returns:

  • (Array[String])


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

def carriers
  @carriers
end

#featuresArray[String]

a list of features associated with the resident profiles.

Returns:

  • (Array[String])


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

def features
  @features
end

#ip_poolsArray[IPPoolforplanner]

a list of features associated with the resident profiles.

Returns:



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

def ip_pools
  @ip_pools
end

#is_provisioning_allowedTrueClass | FalseClass

A flag indicating if provisioning is allowed (true) or provisioning is locked (false).

Returns:

  • (TrueClass | FalseClass)


35
36
37
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 35

def is_provisioning_allowed
  @is_provisioning_allowed
end

#organization_nameString

The user assigned organization name.

Returns:

  • (String)


39
40
41
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 39

def organization_name
  @organization_name
end

#service_plansArray[ServicePlanResponseforplanner]

A list of service plans associated with the resident profiles.

Returns:



43
44
45
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 43

def service_plans
  @service_plans
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 95

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('accountName') ? hash['accountName'] : SKIP
   = hash.key?('accountNumber') ? hash['accountNumber'] : SKIP
  carriers = hash.key?('carriers') ? hash['carriers'] : SKIP
  features = hash.key?('features') ? hash['features'] : SKIP
  # Parameter is an array, so we need to iterate through it
  ip_pools = nil
  unless hash['ipPools'].nil?
    ip_pools = []
    hash['ipPools'].each do |structure|
      ip_pools << (IPPoolforplanner.from_hash(structure) if structure)
    end
  end

  ip_pools = SKIP unless hash.key?('ipPools')
  is_provisioning_allowed =
    hash.key?('isProvisioningAllowed') ? hash['isProvisioningAllowed'] : SKIP
  organization_name =
    hash.key?('organizationName') ? hash['organizationName'] : SKIP
  # Parameter is an array, so we need to iterate through it
  service_plans = nil
  unless hash['servicePlans'].nil?
    service_plans = []
    hash['servicePlans'].each do |structure|
      service_plans << (ServicePlanResponseforplanner.from_hash(structure) if structure)
    end
  end

  service_plans = SKIP unless hash.key?('servicePlans')

  # Create object from extracted values.
  GetAccountInformationResponseforplanner.new(,
                                              ,
                                              carriers,
                                              features,
                                              ip_pools,
                                              is_provisioning_allowed,
                                              organization_name,
                                              service_plans)
end

.namesObject

A mapping from model property names to API property names.



46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 46

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_name'] = 'accountName'
  @_hash['account_number'] = 'accountNumber'
  @_hash['carriers'] = 'carriers'
  @_hash['features'] = 'features'
  @_hash['ip_pools'] = 'ipPools'
  @_hash['is_provisioning_allowed'] = 'isProvisioningAllowed'
  @_hash['organization_name'] = 'organizationName'
  @_hash['service_plans'] = 'servicePlans'
  @_hash
end

.nullablesObject

An array for nullable fields



74
75
76
77
78
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 74

def self.nullables
  %w[
    account_number
  ]
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    account_name
    account_number
    carriers
    features
    ip_pools
    is_provisioning_allowed
    organization_name
    service_plans
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



149
150
151
152
153
154
155
156
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 149

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} account_name: #{@account_name.inspect}, account_number:"\
  " #{@account_number.inspect}, carriers: #{@carriers.inspect}, features:"\
  " #{@features.inspect}, ip_pools: #{@ip_pools.inspect}, is_provisioning_allowed:"\
  " #{@is_provisioning_allowed.inspect}, organization_name: #{@organization_name.inspect},"\
  " service_plans: #{@service_plans.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



140
141
142
143
144
145
146
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 140

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} account_name: #{@account_name}, account_number: #{@account_number},"\
  " carriers: #{@carriers}, features: #{@features}, ip_pools: #{@ip_pools},"\
  " is_provisioning_allowed: #{@is_provisioning_allowed}, organization_name:"\
  " #{@organization_name}, service_plans: #{@service_plans}>"
end