Class: ShellDataReportingApIs::PricingHistory
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::PricingHistory
- Defined in:
- lib/shell_data_reporting_ap_is/models/pricing_history.rb
Overview
PricingHistory Model.
Instance Attribute Summary collapse
-
#fees_rule_description ⇒ String
Pricing History Period Fees Rule Description that is associated to the period of that associated payer.
-
#fees_rule_id ⇒ Integer
Pricing History Period Fees Rule ID that is associated to the period of that associated payer.
-
#from_date ⇒ String
Pricing History Period Start date and should be the first date of the month.
-
#to_date ⇒ String
Pricing History Period end date and should be the last date of the period month.
-
#total_volume ⇒ Float
Total Quantity for the Pricing History Period that is associated to that payer.
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(from_date = SKIP, to_date = SKIP, fees_rule_id = SKIP, fees_rule_description = SKIP, total_volume = SKIP) ⇒ PricingHistory
constructor
A new instance of PricingHistory.
Methods inherited from BaseModel
Constructor Details
#initialize(from_date = SKIP, to_date = SKIP, fees_rule_id = SKIP, fees_rule_description = SKIP, total_volume = SKIP) ⇒ PricingHistory
Returns a new instance of PricingHistory.
73 74 75 76 77 78 79 80 |
# File 'lib/shell_data_reporting_ap_is/models/pricing_history.rb', line 73 def initialize(from_date = SKIP, to_date = SKIP, fees_rule_id = SKIP, fees_rule_description = SKIP, total_volume = SKIP) @from_date = from_date unless from_date == SKIP @to_date = to_date unless to_date == SKIP @fees_rule_id = fees_rule_id unless fees_rule_id == SKIP @fees_rule_description = fees_rule_description unless fees_rule_description == SKIP @total_volume = total_volume unless total_volume == SKIP end |
Instance Attribute Details
#fees_rule_description ⇒ String
Pricing History Period Fees Rule Description that is associated to the period of that associated payer.
33 34 35 |
# File 'lib/shell_data_reporting_ap_is/models/pricing_history.rb', line 33 def fees_rule_description @fees_rule_description end |
#fees_rule_id ⇒ Integer
Pricing History Period Fees Rule ID that is associated to the period of that associated payer.
Example: 8101
28 29 30 |
# File 'lib/shell_data_reporting_ap_is/models/pricing_history.rb', line 28 def fees_rule_id @fees_rule_id end |
#from_date ⇒ String
Pricing History Period Start date and should be the first date of the month. Format: YYYYMMDD
16 17 18 |
# File 'lib/shell_data_reporting_ap_is/models/pricing_history.rb', line 16 def from_date @from_date end |
#to_date ⇒ String
Pricing History Period end date and should be the last date of the period month. Format: YYYYMMDD
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/pricing_history.rb', line 22 def to_date @to_date end |
#total_volume ⇒ Float
Total Quantity for the Pricing History Period that is associated to that payer.
38 39 40 |
# File 'lib/shell_data_reporting_ap_is/models/pricing_history.rb', line 38 def total_volume @total_volume end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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/pricing_history.rb', line 83 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP fees_rule_id = hash.key?('FeesRuleID') ? hash['FeesRuleID'] : SKIP fees_rule_description = hash.key?('FeesRuleDescription') ? hash['FeesRuleDescription'] : SKIP total_volume = hash.key?('TotalVolume') ? hash['TotalVolume'] : SKIP # Create object from extracted values. PricingHistory.new(from_date, to_date, fees_rule_id, fees_rule_description, total_volume) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 |
# File 'lib/shell_data_reporting_ap_is/models/pricing_history.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['from_date'] = 'FromDate' @_hash['to_date'] = 'ToDate' @_hash['fees_rule_id'] = 'FeesRuleID' @_hash['fees_rule_description'] = 'FeesRuleDescription' @_hash['total_volume'] = 'TotalVolume' @_hash end |
.nullables ⇒ Object
An array for nullable fields
63 64 65 66 67 68 69 70 71 |
# File 'lib/shell_data_reporting_ap_is/models/pricing_history.rb', line 63 def self.nullables %w[ from_date to_date fees_rule_id fees_rule_description total_volume ] end |
.optionals ⇒ Object
An array for optional fields
52 53 54 55 56 57 58 59 60 |
# File 'lib/shell_data_reporting_ap_is/models/pricing_history.rb', line 52 def self.optionals %w[ from_date to_date fees_rule_id fees_rule_description total_volume ] end |