Class: Google::Apis::AndroidpublisherV3::RegionalSubscriptionOfferPhaseConfig
- Inherits:
-
Object
- Object
- Google::Apis::AndroidpublisherV3::RegionalSubscriptionOfferPhaseConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/androidpublisher_v3/classes.rb,
lib/google/apis/androidpublisher_v3/representations.rb,
lib/google/apis/androidpublisher_v3/representations.rb
Overview
Configuration for a single phase of a subscription offer in a single region.
Instance Attribute Summary collapse
-
#absolute_discount ⇒ Google::Apis::AndroidpublisherV3::Money
Represents an amount of money with its currency type.
-
#free ⇒ Google::Apis::AndroidpublisherV3::RegionalSubscriptionOfferPhaseFreePriceOverride
Represents the free price override configuration for a single phase of a subscription offer Corresponds to the JSON property
free
. -
#price ⇒ Google::Apis::AndroidpublisherV3::Money
Represents an amount of money with its currency type.
-
#region_code ⇒ String
Required.
-
#relative_discount ⇒ Float
The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RegionalSubscriptionOfferPhaseConfig
constructor
A new instance of RegionalSubscriptionOfferPhaseConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RegionalSubscriptionOfferPhaseConfig
Returns a new instance of RegionalSubscriptionOfferPhaseConfig.
4667 4668 4669 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4667 def initialize(**args) update!(**args) end |
Instance Attribute Details
#absolute_discount ⇒ Google::Apis::AndroidpublisherV3::Money
Represents an amount of money with its currency type.
Corresponds to the JSON property absoluteDiscount
4637 4638 4639 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4637 def absolute_discount @absolute_discount end |
#free ⇒ Google::Apis::AndroidpublisherV3::RegionalSubscriptionOfferPhaseFreePriceOverride
Represents the free price override configuration for a single phase of a
subscription offer
Corresponds to the JSON property free
4643 4644 4645 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4643 def free @free end |
#price ⇒ Google::Apis::AndroidpublisherV3::Money
Represents an amount of money with its currency type.
Corresponds to the JSON property price
4648 4649 4650 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4648 def price @price end |
#region_code ⇒ String
Required. Immutable. The region to which this config applies.
Corresponds to the JSON property regionCode
4653 4654 4655 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4653 def region_code @region_code end |
#relative_discount ⇒ Float
The fraction of the base plan price prorated over the phase duration that the
user pays for this offer phase. For example, if the base plan price for this
region is $12 for a period of 1 year, then a 50% discount for a phase of a
duration of 3 months would correspond to a price of $1.50. The discount must
be specified as a fraction strictly larger than 0 and strictly smaller than 1.
The resulting price will be rounded to the nearest billable unit (e.g. cents
for USD). The relative discount is considered invalid if the discounted price
ends up being smaller than the minimum price allowed in this region.
Corresponds to the JSON property relativeDiscount
4665 4666 4667 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4665 def relative_discount @relative_discount end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4672 4673 4674 4675 4676 4677 4678 |
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 4672 def update!(**args) @absolute_discount = args[:absolute_discount] if args.key?(:absolute_discount) @free = args[:free] if args.key?(:free) @price = args[:price] if args.key?(:price) @region_code = args[:region_code] if args.key?(:region_code) @relative_discount = args[:relative_discount] if args.key?(:relative_discount) end |