Class: ShellDataReportingApIs::PricingCurrentVolume

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb

Overview

PricingCurrentVolume Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(fee_rule_id = SKIP, fee_rule_description = SKIP, price_rule_id = SKIP, price_rule_description = SKIP, total_volume = SKIP, next_fee_creation_date = SKIP) ⇒ PricingCurrentVolume

Returns a new instance of PricingCurrentVolume.



77
78
79
80
81
82
83
84
85
86
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 77

def initialize(fee_rule_id = SKIP, fee_rule_description = SKIP,
               price_rule_id = SKIP, price_rule_description = SKIP,
               total_volume = SKIP, next_fee_creation_date = SKIP)
  @fee_rule_id = fee_rule_id unless fee_rule_id == SKIP
  @fee_rule_description = fee_rule_description unless fee_rule_description == SKIP
  @price_rule_id = price_rule_id unless price_rule_id == SKIP
  @price_rule_description = price_rule_description unless price_rule_description == SKIP
  @total_volume = total_volume unless total_volume == SKIP
  @next_fee_creation_date = next_fee_creation_date unless next_fee_creation_date == SKIP
end

Instance Attribute Details

#fee_rule_descriptionString

Bonus or association bonus configuration description that is associated to the payer

Returns:

  • (String)


20
21
22
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 20

def fee_rule_description
  @fee_rule_description
end

#fee_rule_idInteger

Bonus or association bonus configuration identifier that is associated to the payer.

Returns:

  • (Integer)


15
16
17
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 15

def fee_rule_id
  @fee_rule_id
end

#next_fee_creation_dateString

Next Fee Rule Creation Date for that is associated to the payer. Format: YYYYMMDD

Returns:

  • (String)


39
40
41
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 39

def next_fee_creation_date
  @next_fee_creation_date
end

#price_rule_descriptionString

Pricing current period pricing rule description that is associated to the payer

Returns:

  • (String)


30
31
32
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 30

def price_rule_description
  @price_rule_description
end

#price_rule_idInteger

Pricing current period Pricing Price Rule ID that is associated to the payer.

Returns:

  • (Integer)


25
26
27
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 25

def price_rule_id
  @price_rule_id
end

#total_volumeFloat

Total volume consumption for the current period.

Returns:

  • (Float)


34
35
36
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 34

def total_volume
  @total_volume
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 89

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
  price_rule_id = hash.key?('PriceRuleID') ? hash['PriceRuleID'] : SKIP
  price_rule_description =
    hash.key?('PriceRuleDescription') ? hash['PriceRuleDescription'] : SKIP
  total_volume = hash.key?('TotalVolume') ? hash['TotalVolume'] : SKIP
  next_fee_creation_date =
    hash.key?('NextFeeCreationDate') ? hash['NextFeeCreationDate'] : SKIP

  # Create object from extracted values.
  PricingCurrentVolume.new(fee_rule_id,
                           fee_rule_description,
                           price_rule_id,
                           price_rule_description,
                           total_volume,
                           next_fee_creation_date)
end

.namesObject

A mapping from model property names to API property names.



42
43
44
45
46
47
48
49
50
51
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 42

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['fee_rule_id'] = 'FeeRuleId'
  @_hash['fee_rule_description'] = 'FeeRuleDescription'
  @_hash['price_rule_id'] = 'PriceRuleID'
  @_hash['price_rule_description'] = 'PriceRuleDescription'
  @_hash['total_volume'] = 'TotalVolume'
  @_hash['next_fee_creation_date'] = 'NextFeeCreationDate'
  @_hash
end

.nullablesObject

An array for nullable fields



66
67
68
69
70
71
72
73
74
75
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 66

def self.nullables
  %w[
    fee_rule_id
    fee_rule_description
    price_rule_id
    price_rule_description
    total_volume
    next_fee_creation_date
  ]
end

.optionalsObject

An array for optional fields



54
55
56
57
58
59
60
61
62
63
# File 'lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb', line 54

def self.optionals
  %w[
    fee_rule_id
    fee_rule_description
    price_rule_id
    price_rule_description
    total_volume
    next_fee_creation_date
  ]
end