Class: ShellDataReportingApIs::FeesFeeRuleTiers

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

Overview

FeesFeeRuleTiers Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(tier_min = SKIP, tier_max = SKIP, date_effective = SKIP, date_terminated = SKIP, tier_value = SKIP, fee_rule_basis_id = SKIP, fee_rule_basis_description = SKIP) ⇒ FeesFeeRuleTiers

Returns a new instance of FeesFeeRuleTiers.



79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb', line 79

def initialize(tier_min = SKIP, tier_max = SKIP, date_effective = SKIP,
               date_terminated = SKIP, tier_value = SKIP,
               fee_rule_basis_id = SKIP, fee_rule_basis_description = SKIP)
  @tier_min = tier_min unless tier_min == SKIP
  @tier_max = tier_max unless tier_max == SKIP
  @date_effective = date_effective unless date_effective == SKIP
  @date_terminated = date_terminated unless date_terminated == SKIP
  @tier_value = tier_value unless tier_value == SKIP
  @fee_rule_basis_id = fee_rule_basis_id unless fee_rule_basis_id == SKIP
  unless fee_rule_basis_description == SKIP
    @fee_rule_basis_description =
      fee_rule_basis_description
  end
end

Instance Attribute Details

#date_effectiveString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb', line 22

def date_effective
  @date_effective
end

#date_terminatedString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb', line 26

def date_terminated
  @date_terminated
end

#fee_rule_basis_descriptionString

TODO: Write general description for this method

Returns:

  • (String)


38
39
40
# File 'lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb', line 38

def fee_rule_basis_description
  @fee_rule_basis_description
end

#fee_rule_basis_idInteger

TODO: Write general description for this method

Returns:

  • (Integer)


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

def fee_rule_basis_id
  @fee_rule_basis_id
end

#tier_maxInteger

TODO: Write general description for this method

Returns:

  • (Integer)


18
19
20
# File 'lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb', line 18

def tier_max
  @tier_max
end

#tier_minInteger

TODO: Write general description for this method

Returns:

  • (Integer)


14
15
16
# File 'lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb', line 14

def tier_min
  @tier_min
end

#tier_valueFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def tier_value
  @tier_value
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb', line 95

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  tier_min = hash.key?('TierMin') ? hash['TierMin'] : SKIP
  tier_max = hash.key?('TierMax') ? hash['TierMax'] : SKIP
  date_effective = hash.key?('DateEffective') ? hash['DateEffective'] : SKIP
  date_terminated =
    hash.key?('DateTerminated') ? hash['DateTerminated'] : SKIP
  tier_value = hash.key?('TierValue') ? hash['TierValue'] : SKIP
  fee_rule_basis_id =
    hash.key?('FeeRuleBasisID') ? hash['FeeRuleBasisID'] : SKIP
  fee_rule_basis_description =
    hash.key?('FeeRuleBasisDescription') ? hash['FeeRuleBasisDescription'] : SKIP

  # Create object from extracted values.
  FeesFeeRuleTiers.new(tier_min,
                       tier_max,
                       date_effective,
                       date_terminated,
                       tier_value,
                       fee_rule_basis_id,
                       fee_rule_basis_description)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['tier_min'] = 'TierMin'
  @_hash['tier_max'] = 'TierMax'
  @_hash['date_effective'] = 'DateEffective'
  @_hash['date_terminated'] = 'DateTerminated'
  @_hash['tier_value'] = 'TierValue'
  @_hash['fee_rule_basis_id'] = 'FeeRuleBasisID'
  @_hash['fee_rule_basis_description'] = 'FeeRuleBasisDescription'
  @_hash
end

.nullablesObject

An array for nullable fields



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

def self.nullables
  %w[
    tier_min
    tier_max
    date_effective
    date_terminated
    tier_value
    fee_rule_basis_id
    fee_rule_basis_description
  ]
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    tier_min
    tier_max
    date_effective
    date_terminated
    tier_value
    fee_rule_basis_id
    fee_rule_basis_description
  ]
end