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:, devices:, order_request_id: SKIP, additional_properties: nil) ⇒ CheckOrderStatusRequest
constructor
A new instance of CheckOrderStatusRequest.
-
#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:, devices:, order_request_id: SKIP, additional_properties: nil) ⇒ CheckOrderStatusRequest
Returns a new instance of CheckOrderStatusRequest.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/verizon/models/check_order_status_request.rb', line 47 def initialize(account_name:, devices:, order_request_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_name = account_name @order_request_id = order_request_id unless order_request_id == SKIP @devices = devices @additional_properties = additional_properties 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.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/verizon/models/check_order_status_request.rb', line 59 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 a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. CheckOrderStatusRequest.new(account_name: account_name, devices: devices, order_request_id: order_request_id, additional_properties: additional_properties) 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 |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 104 |
# File 'lib/verizon/models/check_order_status_request.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name.inspect}, order_request_id:"\ " #{@order_request_id.inspect}, devices: #{@devices.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
92 93 94 95 96 |
# File 'lib/verizon/models/check_order_status_request.rb', line 92 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name}, order_request_id: #{@order_request_id},"\ " devices: #{@devices}, additional_properties: #{@additional_properties}>" end |