Class: ShellDataReportingApIs::FeeSummaryResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::FeeSummaryResponse
- Defined in:
- lib/shell_data_reporting_ap_is/models/fee_summary_response.rb
Overview
FeeSummaryResponse Model.
Instance Attribute Summary collapse
-
#data ⇒ Array[FeeItemSummaryAllOf0]
Status of the request.
-
#request_id ⇒ String
Unique identifier for the request.
-
#status ⇒ String
Status of the request.
-
#warnings ⇒ Array[Warning]
A list of Warning entity.
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(request_id = SKIP, status = SKIP, data = SKIP, warnings = SKIP) ⇒ FeeSummaryResponse
constructor
A new instance of FeeSummaryResponse.
-
#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(request_id = SKIP, status = SKIP, data = SKIP, warnings = SKIP) ⇒ FeeSummaryResponse
Returns a new instance of FeeSummaryResponse.
59 60 61 62 63 64 65 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 59 def initialize(request_id = SKIP, status = SKIP, data = SKIP, warnings = SKIP) @request_id = request_id unless request_id == SKIP @status = status unless status == SKIP @data = data unless data == SKIP @warnings = warnings unless warnings == SKIP end |
Instance Attribute Details
#data ⇒ Array[FeeItemSummaryAllOf0]
Status of the request
23 24 25 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 23 def data @data end |
#request_id ⇒ String
Unique identifier for the request. This will be played back in the response from the request.
15 16 17 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 15 def request_id @request_id end |
#status ⇒ String
Status of the request
19 20 21 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 19 def status @status end |
#warnings ⇒ Array[Warning]
A list of Warning entity. This entity will hold the details of the scheduled System Outages of any dependent applications of this service. Note: If there is no scheduled outage information available, in the configuration in AMS, for this service, this parameter won’t be present in output.
32 33 34 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 32 def warnings @warnings end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 68 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP status = hash.key?('Status') ? hash['Status'] : SKIP # Parameter is an array, so we need to iterate through it data = nil unless hash['Data'].nil? data = [] hash['Data'].each do |structure| data << (FeeItemSummaryAllOf0.from_hash(structure) if structure) end end data = SKIP unless hash.key?('Data') # Parameter is an array, so we need to iterate through it warnings = nil unless hash['Warnings'].nil? warnings = [] hash['Warnings'].each do |structure| warnings << (Warning.from_hash(structure) if structure) end end warnings = SKIP unless hash.key?('Warnings') # Create object from extracted values. FeeSummaryResponse.new(request_id, status, data, warnings) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 42 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['request_id'] = 'RequestId' @_hash['status'] = 'Status' @_hash['data'] = 'Data' @_hash['warnings'] = 'Warnings' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 48 49 50 51 52 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 45 def self.optionals %w[ request_id status data warnings ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
110 111 112 113 114 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 110 def inspect class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, data:"\ " #{@data.inspect}, warnings: #{@warnings.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
103 104 105 106 107 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 103 def to_s class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id}, status: #{@status}, data: #{@data}, warnings:"\ " #{@warnings}>" end |