Class: Verizon::GioProfileRequest
- Defined in:
- lib/verizon/models/gio_profile_request.rb
Overview
GioProfileRequest Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
TODO: Write general description for this method.
-
#devices ⇒ Array[GioDeviceList]
TODO: Write general description for this method.
-
#mdn_zip_code ⇒ String
The Subscription Manager Secure Router Object ID, used for remote SIM provisioning.
-
#service_plan ⇒ String
The Subscription Manager Secure Router Object ID, used for remote SIM provisioning.
-
#smrs_oid ⇒ String
The Subscription Manager Secure Router Object ID, used for remote SIM provisioning.
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(devices:, account_name:, smrs_oid: SKIP, mdn_zip_code: SKIP, service_plan: SKIP) ⇒ GioProfileRequest
constructor
A new instance of GioProfileRequest.
-
#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(devices:, account_name:, smrs_oid: SKIP, mdn_zip_code: SKIP, service_plan: SKIP) ⇒ GioProfileRequest
Returns a new instance of GioProfileRequest.
63 64 65 66 67 68 69 70 |
# File 'lib/verizon/models/gio_profile_request.rb', line 63 def initialize(devices:, account_name:, smrs_oid: SKIP, mdn_zip_code: SKIP, service_plan: SKIP) @devices = devices @account_name = account_name @smrs_oid = smrs_oid unless smrs_oid == SKIP @mdn_zip_code = mdn_zip_code unless mdn_zip_code == SKIP @service_plan = service_plan unless service_plan == SKIP end |
Instance Attribute Details
#account_name ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/verizon/models/gio_profile_request.rb', line 18 def account_name @account_name end |
#devices ⇒ Array[GioDeviceList]
TODO: Write general description for this method
14 15 16 |
# File 'lib/verizon/models/gio_profile_request.rb', line 14 def devices @devices end |
#mdn_zip_code ⇒ String
The Subscription Manager Secure Router Object ID, used for remote SIM provisioning. SMSR securely routes the download and management of eSIM profiles.
30 31 32 |
# File 'lib/verizon/models/gio_profile_request.rb', line 30 def mdn_zip_code @mdn_zip_code end |
#service_plan ⇒ String
The Subscription Manager Secure Router Object ID, used for remote SIM provisioning. SMSR securely routes the download and management of eSIM profiles.
36 37 38 |
# File 'lib/verizon/models/gio_profile_request.rb', line 36 def service_plan @service_plan end |
#smrs_oid ⇒ String
The Subscription Manager Secure Router Object ID, used for remote SIM provisioning. SMSR securely routes the download and management of eSIM profiles.
24 25 26 |
# File 'lib/verizon/models/gio_profile_request.rb', line 24 def smrs_oid @smrs_oid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/verizon/models/gio_profile_request.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it devices = nil unless hash['devices'].nil? devices = [] hash['devices'].each do |structure| devices << (GioDeviceList.from_hash(structure) if structure) end end devices = nil unless hash.key?('devices') account_name = hash.key?('accountName') ? hash['accountName'] : nil smrs_oid = hash.key?('smrsOid') ? hash['smrsOid'] : SKIP mdn_zip_code = hash.key?('mdnZipCode') ? hash['mdnZipCode'] : SKIP service_plan = hash.key?('servicePlan') ? hash['servicePlan'] : SKIP # Create object from extracted values. GioProfileRequest.new(devices: devices, account_name: account_name, smrs_oid: smrs_oid, mdn_zip_code: mdn_zip_code, service_plan: service_plan) end |
.names ⇒ Object
A mapping from model property names to API property names.
39 40 41 42 43 44 45 46 47 |
# File 'lib/verizon/models/gio_profile_request.rb', line 39 def self.names @_hash = {} if @_hash.nil? @_hash['devices'] = 'devices' @_hash['account_name'] = 'accountName' @_hash['smrs_oid'] = 'smrsOid' @_hash['mdn_zip_code'] = 'mdnZipCode' @_hash['service_plan'] = 'servicePlan' @_hash end |
.nullables ⇒ Object
An array for nullable fields
59 60 61 |
# File 'lib/verizon/models/gio_profile_request.rb', line 59 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 |
# File 'lib/verizon/models/gio_profile_request.rb', line 50 def self.optionals %w[ smrs_oid mdn_zip_code service_plan ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
108 109 110 111 112 113 |
# File 'lib/verizon/models/gio_profile_request.rb', line 108 def inspect class_name = self.class.name.split('::').last "<#{class_name} devices: #{@devices.inspect}, account_name: #{@account_name.inspect},"\ " smrs_oid: #{@smrs_oid.inspect}, mdn_zip_code: #{@mdn_zip_code.inspect}, service_plan:"\ " #{@service_plan.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
101 102 103 104 105 |
# File 'lib/verizon/models/gio_profile_request.rb', line 101 def to_s class_name = self.class.name.split('::').last "<#{class_name} devices: #{@devices}, account_name: #{@account_name}, smrs_oid:"\ " #{@smrs_oid}, mdn_zip_code: #{@mdn_zip_code}, service_plan: #{@service_plan}>" end |