Class: Verizon::SecuritySubscriptionRequest

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

Overview

Request for a subscription.

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, 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( = SKIP, sku_number = SKIP)
  @account_name =  unless  == SKIP
  @sku_number = sku_number unless sku_number == SKIP
end

Instance Attribute Details

#account_nameString

The name of a billing account.

Returns:

  • (String)


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

def 
  @account_name
end

#sku_numberString

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.

Returns:

  • (String)


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.
   = hash.key?('accountName') ? hash['accountName'] : SKIP
  sku_number = hash.key?('skuNumber') ? hash['skuNumber'] : SKIP

  # Create object from extracted values.
  SecuritySubscriptionRequest.new(,
                                  sku_number)
end

.namesObject

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

.nullablesObject

An array for nullable fields



44
45
46
# File 'lib/verizon/models/security_subscription_request.rb', line 44

def self.nullables
  []
end

.optionalsObject

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