Class: Verizon::NotificationReportStatusRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::NotificationReportStatusRequest
- Defined in:
- lib/verizon/models/notification_report_status_request.rb
Overview
NotificationReportStatusRequest Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
The name of a billing account.
-
#device ⇒ DeviceId
An identifier for a single device.
-
#request_expiration_time ⇒ String
The time at which the request expires.
-
#request_type ⇒ String
The type of request.
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:, device:, request_type:, request_expiration_time: SKIP) ⇒ NotificationReportStatusRequest
constructor
A new instance of NotificationReportStatusRequest.
-
#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:, device:, request_type:, request_expiration_time: SKIP) ⇒ NotificationReportStatusRequest
Returns a new instance of NotificationReportStatusRequest.
50 51 52 53 54 55 56 |
# File 'lib/verizon/models/notification_report_status_request.rb', line 50 def initialize(account_name:, device:, request_type:, request_expiration_time: SKIP) @account_name = account_name @device = device @request_type = request_type @request_expiration_time = request_expiration_time unless request_expiration_time == SKIP end |
Instance Attribute Details
#account_name ⇒ String
The name of a billing account.
14 15 16 |
# File 'lib/verizon/models/notification_report_status_request.rb', line 14 def account_name @account_name end |
#device ⇒ DeviceId
An identifier for a single device.
18 19 20 |
# File 'lib/verizon/models/notification_report_status_request.rb', line 18 def device @device end |
#request_expiration_time ⇒ String
The time at which the request expires.
26 27 28 |
# File 'lib/verizon/models/notification_report_status_request.rb', line 26 def request_expiration_time @request_expiration_time end |
#request_type ⇒ String
The type of request.
22 23 24 |
# File 'lib/verizon/models/notification_report_status_request.rb', line 22 def request_type @request_type 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 |
# File 'lib/verizon/models/notification_report_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 device = DeviceId.from_hash(hash['device']) if hash['device'] request_type = hash.key?('requestType') ? hash['requestType'] : nil request_expiration_time = hash.key?('requestExpirationTime') ? hash['requestExpirationTime'] : SKIP # Create object from extracted values. NotificationReportStatusRequest.new(account_name: account_name, device: device, request_type: request_type, request_expiration_time: request_expiration_time) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/verizon/models/notification_report_status_request.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['device'] = 'device' @_hash['request_type'] = 'requestType' @_hash['request_expiration_time'] = 'requestExpirationTime' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/verizon/models/notification_report_status_request.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 |
# File 'lib/verizon/models/notification_report_status_request.rb', line 39 def self.optionals %w[ request_expiration_time ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
84 85 86 87 88 89 |
# File 'lib/verizon/models/notification_report_status_request.rb', line 84 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name.inspect}, device: #{@device.inspect},"\ " request_type: #{@request_type.inspect}, request_expiration_time:"\ " #{@request_expiration_time.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
77 78 79 80 81 |
# File 'lib/verizon/models/notification_report_status_request.rb', line 77 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name}, device: #{@device}, request_type:"\ " #{@request_type}, request_expiration_time: #{@request_expiration_time}>" end |