Class: Google::Apis::SolarV1::CashPurchaseSavings

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CashPurchaseSavings

Returns a new instance of CashPurchaseSavings.



195
196
197
# File 'lib/google/apis/solar_v1/classes.rb', line 195

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#out_of_pocket_costGoogle::Apis::SolarV1::Money

Represents an amount of money with its currency type. Corresponds to the JSON property outOfPocketCost



172
173
174
# File 'lib/google/apis/solar_v1/classes.rb', line 172

def out_of_pocket_cost
  @out_of_pocket_cost
end

#payback_yearsFloat

Number of years until payback occurs. A negative value means payback never occurs within the lifetime period. Corresponds to the JSON property paybackYears

Returns:

  • (Float)


178
179
180
# File 'lib/google/apis/solar_v1/classes.rb', line 178

def payback_years
  @payback_years
end

#rebate_valueGoogle::Apis::SolarV1::Money

Represents an amount of money with its currency type. Corresponds to the JSON property rebateValue



183
184
185
# File 'lib/google/apis/solar_v1/classes.rb', line 183

def rebate_value
  @rebate_value
end

#savingsGoogle::Apis::SolarV1::SavingsOverTime

Financial information that's shared between different financing methods. Corresponds to the JSON property savings



188
189
190
# File 'lib/google/apis/solar_v1/classes.rb', line 188

def savings
  @savings
end

#upfront_costGoogle::Apis::SolarV1::Money

Represents an amount of money with its currency type. Corresponds to the JSON property upfrontCost



193
194
195
# File 'lib/google/apis/solar_v1/classes.rb', line 193

def upfront_cost
  @upfront_cost
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



200
201
202
203
204
205
206
# File 'lib/google/apis/solar_v1/classes.rb', line 200

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