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.



2085
2086
2087
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2085

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



2067
2068
2069
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2067

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)


2073
2074
2075
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2073

def discount
  @discount
end

#effective_priceGoogle::Apis::CloudchannelV1::GoogleTypeMoney

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



2078
2079
2080
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2078

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)


2083
2084
2085
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2083

def external_price_uri
  @external_price_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2090
2091
2092
2093
2094
2095
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 2090

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