Class: Verizon::SecuritySubscriptionRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::SecuritySubscriptionRequest
- Defined in:
- lib/verizon/models/security_subscription_request.rb
Overview
Request for a subscription.
Instance Attribute Summary collapse
-
#account_name ⇒ String
The name of a billing account.
-
#sku_number ⇒ String
The Stock Keeping Unit (SKU).
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, sku_number: SKIP) ⇒ SecuritySubscriptionRequest
constructor
A new instance of SecuritySubscriptionRequest.
-
#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, sku_number: SKIP) ⇒ SecuritySubscriptionRequest
Returns a new instance of SecuritySubscriptionRequest.
48 49 50 51 |
# File 'lib/verizon/models/security_subscription_request.rb', line 48 def initialize(account_name: SKIP, sku_number: SKIP) @account_name = account_name unless account_name == SKIP @sku_number = sku_number unless sku_number == SKIP end |
Instance Attribute Details
#account_name ⇒ String
The name of a billing account.
14 15 16 |
# File 'lib/verizon/models/security_subscription_request.rb', line 14 def account_name @account_name end |
#sku_number ⇒ String
The Stock Keeping Unit (SKU). Valid skuNumbers for SIM-Secure for IoT are:SIMSec-IoT-Lt”. (Lifetime) Once a license is assigned to a SIM, the SIM-Secure feature is enabled for the life of the SIM.“TS-BUNDLE-KTO-SIMSEC-MRC”. (Bundle) The SIM-Secure Flex license can be assigned to or removed from a SIM at any time. This SKU is bundled with other ThingSpace Services.*“SIMSec-IoT”. (Flex) The SIM-Secure Flex license can be assigned to or removed from a SIM at any time. This SKU is purchased a la carte.
25 26 27 |
# File 'lib/verizon/models/security_subscription_request.rb', line 25 def sku_number @sku_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/verizon/models/security_subscription_request.rb', line 54 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : SKIP sku_number = hash.key?('skuNumber') ? hash['skuNumber'] : SKIP # Create object from extracted values. SecuritySubscriptionRequest.new(account_name: account_name, sku_number: sku_number) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 |
# File 'lib/verizon/models/security_subscription_request.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['sku_number'] = 'skuNumber' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 |
# File 'lib/verizon/models/security_subscription_request.rb', line 44 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 |
# File 'lib/verizon/models/security_subscription_request.rb', line 36 def self.optionals %w[ account_name sku_number ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
73 74 75 76 77 |
# File 'lib/verizon/models/security_subscription_request.rb', line 73 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name.inspect}, sku_number:"\ " #{@sku_number.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
67 68 69 70 |
# File 'lib/verizon/models/security_subscription_request.rb', line 67 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name}, sku_number: #{@sku_number}>" end |