Class: Google::Apis::CloudchannelV1::GoogleCloudChannelV1Price

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudchannel_v1/classes.rb,
lib/google/apis/cloudchannel_v1/representations.rb,
lib/google/apis/cloudchannel_v1/representations.rb

Overview

Represents the price of the Offer.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudChannelV1Price

Returns a new instance of GoogleCloudChannelV1Price.



2489
2490
2491
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2489

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

Instance Attribute Details

#base_priceGoogle::Apis::CloudchannelV1::GoogleTypeMoney

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



2460
2461
2462
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2460

def base_price
  @base_price
end

#discountFloat

Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2. Corresponds to the JSON property discount

Returns:

  • (Float)


2466
2467
2468
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2466

def discount
  @discount
end

#discount_componentsArray<Google::Apis::CloudchannelV1::GoogleCloudChannelV1DiscountComponent>

Breakdown of the discount into its components. This will be empty if there is no discount present. Corresponds to the JSON property discountComponents



2472
2473
2474
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2472

def discount_components
  @discount_components
end

#effective_priceGoogle::Apis::CloudchannelV1::GoogleTypeMoney

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



2477
2478
2479
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2477

def effective_price
  @effective_price
end

#external_price_uriString

Link to external price list, such as link to Google Voice rate card. Corresponds to the JSON property externalPriceUri

Returns:

  • (String)


2482
2483
2484
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2482

def external_price_uri
  @external_price_uri
end

#price_periodGoogle::Apis::CloudchannelV1::GoogleCloudChannelV1Period

Represents period in days/months/years. Corresponds to the JSON property pricePeriod



2487
2488
2489
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2487

def price_period
  @price_period
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2494
2495
2496
2497
2498
2499
2500
2501
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2494

def update!(**args)
  @base_price = args[:base_price] if args.key?(:base_price)
  @discount = args[:discount] if args.key?(:discount)
  @discount_components = args[:discount_components] if args.key?(:discount_components)
  @effective_price = args[:effective_price] if args.key?(:effective_price)
  @external_price_uri = args[:external_price_uri] if args.key?(:external_price_uri)
  @price_period = args[:price_period] if args.key?(:price_period)
end