Class: Verizon::AggregateSessionReportRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::AggregateSessionReportRequest
- Defined in:
- lib/verizon/models/aggregate_session_report_request.rb
Overview
Request for getting an aggregated session report.
Instance Attribute Summary collapse
-
#account_number ⇒ String
The numeric ID of the account and must include leading zeroes.
-
#data_plan ⇒ String
Optional filter — only include devices matching this carrier rate plan code.
-
#device_group ⇒ String
Optional filter — only include devices matching this device group name.
-
#end_date ⇒ String
End date of session to include.
-
#imei ⇒ Array[String]
Devices for which return usage info.
-
#no_session_flag ⇒ TrueClass | FalseClass
Optional filter — when “true”, returns only devices with no sessions.
-
#start_date ⇒ String
Start date of session to include.
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_number = nil, imei = nil, start_date = SKIP, end_date = SKIP, device_group = SKIP, data_plan = SKIP, no_session_flag = SKIP) ⇒ AggregateSessionReportRequest
constructor
A new instance of AggregateSessionReportRequest.
-
#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_number = nil, imei = nil, start_date = SKIP, end_date = SKIP, device_group = SKIP, data_plan = SKIP, no_session_flag = SKIP) ⇒ AggregateSessionReportRequest
Returns a new instance of AggregateSessionReportRequest.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 77 def initialize(account_number = nil, imei = nil, start_date = SKIP, end_date = SKIP, device_group = SKIP, data_plan = SKIP, no_session_flag = SKIP) @account_number = account_number @start_date = start_date unless start_date == SKIP @end_date = end_date unless end_date == SKIP @imei = imei @device_group = device_group unless device_group == SKIP @data_plan = data_plan unless data_plan == SKIP @no_session_flag = no_session_flag unless no_session_flag == SKIP end |
Instance Attribute Details
#account_number ⇒ String
The numeric ID of the account and must include leading zeroes. This value is indentical to ‘accountName`.
15 16 17 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 15 def account_number @account_number end |
#data_plan ⇒ String
Optional filter — only include devices matching this carrier rate plan code.
42 43 44 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 42 def data_plan @data_plan end |
#device_group ⇒ String
Optional filter — only include devices matching this device group name.
37 38 39 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 37 def device_group @device_group end |
#end_date ⇒ String
End date of session to include. If not specified information will be shown to the latest available. Can be either date in ISO 8601 format or predefined constants.
27 28 29 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 27 def end_date @end_date end |
#imei ⇒ Array[String]
Devices for which return usage info. Could be 0, 1 or more. In case of 0 will return all devices belonging to customer (except of filtered by other parameters).
33 34 35 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 33 def imei @imei end |
#no_session_flag ⇒ TrueClass | FalseClass
Optional filter — when “true”, returns only devices with no sessions.
46 47 48 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 46 def no_session_flag @no_session_flag end |
#start_date ⇒ String
Start date of session to include. If not specified information will be shown from the earliest available (180 days). Can be either date in ISO 8601 format or predefined constants.
21 22 23 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 21 def start_date @start_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 90 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_number = hash.key?('accountNumber') ? hash['accountNumber'] : nil imei = hash.key?('imei') ? hash['imei'] : nil start_date = hash.key?('startDate') ? hash['startDate'] : SKIP end_date = hash.key?('endDate') ? hash['endDate'] : SKIP device_group = hash.key?('deviceGroup') ? hash['deviceGroup'] : SKIP data_plan = hash.key?('dataPlan') ? hash['dataPlan'] : SKIP no_session_flag = hash.key?('noSessionFlag') ? hash['noSessionFlag'] : SKIP # Create object from extracted values. AggregateSessionReportRequest.new(account_number, imei, start_date, end_date, device_group, data_plan, no_session_flag) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['account_number'] = 'accountNumber' @_hash['start_date'] = 'startDate' @_hash['end_date'] = 'endDate' @_hash['imei'] = 'imei' @_hash['device_group'] = 'deviceGroup' @_hash['data_plan'] = 'dataPlan' @_hash['no_session_flag'] = 'noSessionFlag' @_hash end |
.nullables ⇒ Object
An array for nullable fields
73 74 75 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 73 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
62 63 64 65 66 67 68 69 70 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 62 def self.optionals %w[ start_date end_date device_group data_plan no_session_flag ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
122 123 124 125 126 127 128 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 122 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_number: #{@account_number.inspect}, start_date:"\ " #{@start_date.inspect}, end_date: #{@end_date.inspect}, imei: #{@imei.inspect},"\ " device_group: #{@device_group.inspect}, data_plan: #{@data_plan.inspect}, no_session_flag:"\ " #{@no_session_flag.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
114 115 116 117 118 119 |
# File 'lib/verizon/models/aggregate_session_report_request.rb', line 114 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_number: #{@account_number}, start_date: #{@start_date}, end_date:"\ " #{@end_date}, imei: #{@imei}, device_group: #{@device_group}, data_plan: #{@data_plan},"\ " no_session_flag: #{@no_session_flag}>" end |