Class: Google::Apis::CloudchannelV1::GoogleCloudChannelV1DiscountComponent
- Inherits:
-
Object
- Object
- Google::Apis::CloudchannelV1::GoogleCloudChannelV1DiscountComponent
- 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 a single component of the total discount applicable on a Price.
Instance Attribute Summary collapse
-
#discount_absolute ⇒ Google::Apis::CloudchannelV1::GoogleTypeMoney
Represents an amount of money with its currency type.
-
#discount_percentage ⇒ Float
Discount percentage, represented as decimal.
-
#discount_type ⇒ String
Type of the discount.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudChannelV1DiscountComponent
constructor
A new instance of GoogleCloudChannelV1DiscountComponent.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudChannelV1DiscountComponent
Returns a new instance of GoogleCloudChannelV1DiscountComponent.
1139 1140 1141 |
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1139 def initialize(**args) update!(**args) end |
Instance Attribute Details
#discount_absolute ⇒ Google::Apis::CloudchannelV1::GoogleTypeMoney
Represents an amount of money with its currency type.
Corresponds to the JSON property discountAbsolute
1126 1127 1128 |
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1126 def discount_absolute @discount_absolute end |
#discount_percentage ⇒ Float
Discount percentage, represented as decimal. For example, a 20% discount will
be represented as 0.2.
Corresponds to the JSON property discountPercentage
1132 1133 1134 |
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1132 def discount_percentage @discount_percentage end |
#discount_type ⇒ String
Type of the discount.
Corresponds to the JSON property discountType
1137 1138 1139 |
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1137 def discount_type @discount_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1144 1145 1146 1147 1148 |
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1144 def update!(**args) @discount_absolute = args[:discount_absolute] if args.key?(:discount_absolute) @discount_percentage = args[:discount_percentage] if args.key?(:discount_percentage) @discount_type = args[:discount_type] if args.key?(:discount_type) end |