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
-
#error ⇒ ErrorStatus
A unique request id in GUID format.
-
#fee_items_summary ⇒ Array[FeeItemSummaryAllOf0]
TODO: Write general description for this method.
-
#request_id ⇒ String
A unique request id in GUID format.
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(fee_items_summary = SKIP, request_id = SKIP, error = SKIP) ⇒ FeeSummaryResponse
constructor
A new instance of FeeSummaryResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(fee_items_summary = SKIP, request_id = SKIP, error = SKIP) ⇒ FeeSummaryResponse
Returns a new instance of FeeSummaryResponse.
53 54 55 56 57 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 53 def initialize(fee_items_summary = SKIP, request_id = SKIP, error = SKIP) @fee_items_summary = fee_items_summary unless fee_items_summary == SKIP @request_id = request_id unless request_id == SKIP @error = error unless error == SKIP end |
Instance Attribute Details
#error ⇒ ErrorStatus
A unique request id in GUID format. The value is written to the Shell API Platform audit log for end to end traceability of a request. If a value is not provided by an API client, then a GUID is automatically populated by the Shell API Platform and returned in the API response.
28 29 30 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 28 def error @error end |
#fee_items_summary ⇒ Array[FeeItemSummaryAllOf0]
TODO: Write general description for this method
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 14 def fee_items_summary @fee_items_summary end |
#request_id ⇒ String
A unique request id in GUID format. The value is written to the Shell API Platform audit log for end to end traceability of a request. If a value is not provided by an API client, then a GUID is automatically populated by the Shell API Platform and returned in the API response.
21 22 23 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 21 def request_id @request_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 60 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it fee_items_summary = nil unless hash['FeeItemsSummary'].nil? fee_items_summary = [] hash['FeeItemsSummary'].each do |structure| fee_items_summary << (FeeItemSummaryAllOf0.from_hash(structure) if structure) end end fee_items_summary = SKIP unless hash.key?('FeeItemsSummary') request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP error = ErrorStatus.from_hash(hash['Error']) if hash['Error'] # Create object from extracted values. FeeSummaryResponse.new(fee_items_summary, request_id, error) end |
.names ⇒ Object
A mapping from model property names to API property names.
31 32 33 34 35 36 37 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 31 def self.names @_hash = {} if @_hash.nil? @_hash['fee_items_summary'] = 'FeeItemsSummary' @_hash['request_id'] = 'RequestId' @_hash['error'] = 'Error' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 |
# File 'lib/shell_data_reporting_ap_is/models/fee_summary_response.rb', line 40 def self.optionals %w[ fee_items_summary request_id error ] end |