Class: Verizon::GetAccountInformationResponseforplanner
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::GetAccountInformationResponseforplanner
- Defined in:
- lib/verizon/models/get_account_information_responseforplanner.rb
Overview
GetAccountInformationResponseforplanner Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
TODO: Write general description for this method.
-
#account_number ⇒ String
The numeric name of the account, including leading zeros.
-
#carriers ⇒ Array[String]
The list of carrier names with profiles.
-
#features ⇒ Array[String]
a list of features associated with the resident profiles.
-
#ip_pools ⇒ Array[IPPoolforplanner]
a list of features associated with the resident profiles.
-
#is_provisioning_allowed ⇒ TrueClass | FalseClass
A flag indicating if provisioning is allowed (true) or provisioning is locked (false).
-
#organization_name ⇒ String
The user assigned organization name.
-
#service_plans ⇒ Array[ServicePlanResponseforplanner]
A list of service plans associated with the resident profiles.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#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
constructor
A new instance of GetAccountInformationResponseforplanner.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
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(account_name = SKIP, account_number = SKIP, carriers = SKIP, features = SKIP, ip_pools = SKIP, is_provisioning_allowed = SKIP, organization_name = SKIP, service_plans = SKIP) @account_name = account_name unless account_name == SKIP @account_number = account_number unless account_number == 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_name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 14 def account_name @account_name end |
#account_number ⇒ String
The numeric name of the account, including leading zeros.
18 19 20 |
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 18 def account_number @account_number end |
#carriers ⇒ Array[String]
The list of carrier names with profiles.
22 23 24 |
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 22 def carriers @carriers end |
#features ⇒ Array[String]
a list of features associated with the resident profiles.
26 27 28 |
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 26 def features @features end |
#ip_pools ⇒ Array[IPPoolforplanner]
a list of features associated with the resident profiles.
30 31 32 |
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 30 def ip_pools @ip_pools end |
#is_provisioning_allowed ⇒ TrueClass | FalseClass
A flag indicating if provisioning is allowed (true) or provisioning is locked (false).
35 36 37 |
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 35 def is_provisioning_allowed @is_provisioning_allowed end |
#organization_name ⇒ String
The user assigned organization name.
39 40 41 |
# File 'lib/verizon/models/get_account_information_responseforplanner.rb', line 39 def organization_name @organization_name end |
#service_plans ⇒ Array[ServicePlanResponseforplanner]
A list of service plans associated with the resident profiles.
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. account_name = hash.key?('accountName') ? hash['accountName'] : SKIP account_number = 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(account_name, account_number, carriers, features, ip_pools, is_provisioning_allowed, organization_name, service_plans) end |
.names ⇒ Object
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 |
.nullables ⇒ Object
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 |
.optionals ⇒ Object
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
#inspect ⇒ Object
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_s ⇒ Object
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 |