Class: DatagroutConduit::CreditEstimate
- Inherits:
-
Struct
- Object
- Struct
- DatagroutConduit::CreditEstimate
- Defined in:
- lib/datagrout_conduit/types.rb
Instance Attribute Summary collapse
-
#actual_total ⇒ Object
Returns the value of attribute actual_total.
-
#breakdown ⇒ Object
Returns the value of attribute breakdown.
-
#estimated_total ⇒ Object
Returns the value of attribute estimated_total.
-
#net_total ⇒ Object
Returns the value of attribute net_total.
Class Method Summary collapse
Instance Attribute Details
#actual_total ⇒ Object
Returns the value of attribute actual_total
64 65 66 |
# File 'lib/datagrout_conduit/types.rb', line 64 def actual_total @actual_total end |
#breakdown ⇒ Object
Returns the value of attribute breakdown
64 65 66 |
# File 'lib/datagrout_conduit/types.rb', line 64 def breakdown @breakdown end |
#estimated_total ⇒ Object
Returns the value of attribute estimated_total
64 65 66 |
# File 'lib/datagrout_conduit/types.rb', line 64 def estimated_total @estimated_total end |
#net_total ⇒ Object
Returns the value of attribute net_total
64 65 66 |
# File 'lib/datagrout_conduit/types.rb', line 64 def net_total @net_total end |
Class Method Details
.from_hash(hash) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/datagrout_conduit/types.rb', line 68 def self.from_hash(hash) return nil if hash.nil? hash = hash.transform_keys(&:to_s) new( estimated_total: hash["estimated_total"]&.to_f, actual_total: hash["actual_total"]&.to_f, net_total: hash["net_total"]&.to_f, breakdown: hash["breakdown"] || {} ) end |