Class: Verizon::CheckOrderStatusRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::CheckOrderStatusRequest
- Defined in:
- lib/verizon/models/check_order_status_request.rb
Overview
The request body identifies the devices to upload.
Instance Attribute Summary collapse
-
#account_name ⇒ String
The name of a billing account.
-
#devices ⇒ Array[DeviceList]
The devices to upload, specified by device IDs in a format matching uploadType.
-
#order_request_id ⇒ String
The request id from the activation order.
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 = nil, devices = nil, order_request_id = SKIP) ⇒ CheckOrderStatusRequest
constructor
A new instance of CheckOrderStatusRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(account_name = nil, devices = nil, order_request_id = SKIP) ⇒ CheckOrderStatusRequest
Returns a new instance of CheckOrderStatusRequest.
47 48 49 50 51 |
# File 'lib/verizon/models/check_order_status_request.rb', line 47 def initialize(account_name = nil, devices = nil, order_request_id = SKIP) @account_name = account_name @order_request_id = order_request_id unless order_request_id == SKIP @devices = devices end |
Instance Attribute Details
#account_name ⇒ String
The name of a billing account. An account name is usually numeric, and must include any leading zeros.
15 16 17 |
# File 'lib/verizon/models/check_order_status_request.rb', line 15 def account_name @account_name end |
#devices ⇒ Array[DeviceList]
The devices to upload, specified by device IDs in a format matching uploadType.
24 25 26 |
# File 'lib/verizon/models/check_order_status_request.rb', line 24 def devices @devices end |
#order_request_id ⇒ String
The request id from the activation order.
19 20 21 |
# File 'lib/verizon/models/check_order_status_request.rb', line 19 def order_request_id @order_request_id 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 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/verizon/models/check_order_status_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'] : nil # Parameter is an array, so we need to iterate through it devices = nil unless hash['devices'].nil? devices = [] hash['devices'].each do |structure| devices << (DeviceList.from_hash(structure) if structure) end end devices = nil unless hash.key?('devices') order_request_id = hash.key?('orderRequestId') ? hash['orderRequestId'] : SKIP # Create object from extracted values. CheckOrderStatusRequest.new(account_name, devices, order_request_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 33 |
# File 'lib/verizon/models/check_order_status_request.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['order_request_id'] = 'orderRequestId' @_hash['devices'] = 'devices' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/verizon/models/check_order_status_request.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 |
# File 'lib/verizon/models/check_order_status_request.rb', line 36 def self.optionals %w[ order_request_id ] end |