Class: ShellDataReportingApIs::CurrentVolume
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::CurrentVolume
- Defined in:
- lib/shell_data_reporting_ap_is/models/current_volume.rb
Overview
CurrentVolume Model.
Instance Attribute Summary collapse
-
#fee_rule_description ⇒ String
Bonus or association bonus configuration description that is associated to the payer.
-
#fee_rule_id ⇒ Integer
Bonus or association bonus configuration identifier that is associated to the payer.
-
#month ⇒ Integer
Consumption(Volume) of the month.
-
#total_volume ⇒ Float
Total volume consumption for the month/year above.
-
#year ⇒ String
Consumption (Volume) of the year.
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_rule_id = SKIP, fee_rule_description = SKIP, month = SKIP, year = SKIP, total_volume = SKIP) ⇒ CurrentVolume
constructor
A new instance of CurrentVolume.
Methods inherited from BaseModel
Constructor Details
#initialize(fee_rule_id = SKIP, fee_rule_description = SKIP, month = SKIP, year = SKIP, total_volume = SKIP) ⇒ CurrentVolume
Returns a new instance of CurrentVolume.
67 68 69 70 71 72 73 74 |
# File 'lib/shell_data_reporting_ap_is/models/current_volume.rb', line 67 def initialize(fee_rule_id = SKIP, fee_rule_description = SKIP, month = SKIP, year = SKIP, total_volume = SKIP) @fee_rule_id = fee_rule_id unless fee_rule_id == SKIP @fee_rule_description = fee_rule_description unless fee_rule_description == SKIP @month = month unless month == SKIP @year = year unless year == SKIP @total_volume = total_volume unless total_volume == SKIP end |
Instance Attribute Details
#fee_rule_description ⇒ String
Bonus or association bonus configuration description that is associated to the payer.
20 21 22 |
# File 'lib/shell_data_reporting_ap_is/models/current_volume.rb', line 20 def fee_rule_description @fee_rule_description end |
#fee_rule_id ⇒ Integer
Bonus or association bonus configuration identifier that is associated to the payer
15 16 17 |
# File 'lib/shell_data_reporting_ap_is/models/current_volume.rb', line 15 def fee_rule_id @fee_rule_id end |
#month ⇒ Integer
Consumption(Volume) of the month.
24 25 26 |
# File 'lib/shell_data_reporting_ap_is/models/current_volume.rb', line 24 def month @month end |
#total_volume ⇒ Float
Total volume consumption for the month/year above.
32 33 34 |
# File 'lib/shell_data_reporting_ap_is/models/current_volume.rb', line 32 def total_volume @total_volume end |
#year ⇒ String
Consumption (Volume) of the year.
28 29 30 |
# File 'lib/shell_data_reporting_ap_is/models/current_volume.rb', line 28 def year @year end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/shell_data_reporting_ap_is/models/current_volume.rb', line 77 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. fee_rule_id = hash.key?('FeeRuleId') ? hash['FeeRuleId'] : SKIP fee_rule_description = hash.key?('FeeRuleDescription') ? hash['FeeRuleDescription'] : SKIP month = hash.key?('Month') ? hash['Month'] : SKIP year = hash.key?('Year') ? hash['Year'] : SKIP total_volume = hash.key?('TotalVolume') ? hash['TotalVolume'] : SKIP # Create object from extracted values. CurrentVolume.new(fee_rule_id, fee_rule_description, month, year, total_volume) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 42 43 |
# File 'lib/shell_data_reporting_ap_is/models/current_volume.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['fee_rule_id'] = 'FeeRuleId' @_hash['fee_rule_description'] = 'FeeRuleDescription' @_hash['month'] = 'Month' @_hash['year'] = 'Year' @_hash['total_volume'] = 'TotalVolume' @_hash end |
.nullables ⇒ Object
An array for nullable fields
57 58 59 60 61 62 63 64 65 |
# File 'lib/shell_data_reporting_ap_is/models/current_volume.rb', line 57 def self.nullables %w[ fee_rule_id fee_rule_description month year total_volume ] end |
.optionals ⇒ Object
An array for optional fields
46 47 48 49 50 51 52 53 54 |
# File 'lib/shell_data_reporting_ap_is/models/current_volume.rb', line 46 def self.optionals %w[ fee_rule_id fee_rule_description month year total_volume ] end |