Class: Google::Apis::SolarV1::CashPurchaseSavings
- Inherits:
-
Object
- Object
- Google::Apis::SolarV1::CashPurchaseSavings
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/solar_v1/classes.rb,
lib/google/apis/solar_v1/representations.rb,
lib/google/apis/solar_v1/representations.rb
Overview
Cost and benefit of an outright purchase of a particular configuration of solar panels with a particular electricity usage.
Instance Attribute Summary collapse
-
#out_of_pocket_cost ⇒ Google::Apis::SolarV1::Money
Represents an amount of money with its currency type.
-
#payback_years ⇒ Float
Number of years until payback occurs.
-
#rebate_value ⇒ Google::Apis::SolarV1::Money
Represents an amount of money with its currency type.
-
#savings ⇒ Google::Apis::SolarV1::SavingsOverTime
Financial information that's shared between different financing methods.
-
#upfront_cost ⇒ Google::Apis::SolarV1::Money
Represents an amount of money with its currency type.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CashPurchaseSavings
constructor
A new instance of CashPurchaseSavings.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CashPurchaseSavings
Returns a new instance of CashPurchaseSavings.
157 158 159 |
# File 'lib/google/apis/solar_v1/classes.rb', line 157 def initialize(**args) update!(**args) end |
Instance Attribute Details
#out_of_pocket_cost ⇒ Google::Apis::SolarV1::Money
Represents an amount of money with its currency type.
Corresponds to the JSON property outOfPocketCost
134 135 136 |
# File 'lib/google/apis/solar_v1/classes.rb', line 134 def out_of_pocket_cost @out_of_pocket_cost end |
#payback_years ⇒ Float
Number of years until payback occurs. A negative value means payback never
occurs within the lifetime period.
Corresponds to the JSON property paybackYears
140 141 142 |
# File 'lib/google/apis/solar_v1/classes.rb', line 140 def payback_years @payback_years end |
#rebate_value ⇒ Google::Apis::SolarV1::Money
Represents an amount of money with its currency type.
Corresponds to the JSON property rebateValue
145 146 147 |
# File 'lib/google/apis/solar_v1/classes.rb', line 145 def rebate_value @rebate_value end |
#savings ⇒ Google::Apis::SolarV1::SavingsOverTime
Financial information that's shared between different financing methods.
Corresponds to the JSON property savings
150 151 152 |
# File 'lib/google/apis/solar_v1/classes.rb', line 150 def savings @savings end |
#upfront_cost ⇒ Google::Apis::SolarV1::Money
Represents an amount of money with its currency type.
Corresponds to the JSON property upfrontCost
155 156 157 |
# File 'lib/google/apis/solar_v1/classes.rb', line 155 def upfront_cost @upfront_cost end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
162 163 164 165 166 167 168 |
# File 'lib/google/apis/solar_v1/classes.rb', line 162 def update!(**args) @out_of_pocket_cost = args[:out_of_pocket_cost] if args.key?(:out_of_pocket_cost) @payback_years = args[:payback_years] if args.key?(:payback_years) @rebate_value = args[:rebate_value] if args.key?(:rebate_value) @savings = args[:savings] if args.key?(:savings) @upfront_cost = args[:upfront_cost] if args.key?(:upfront_cost) end |