Class: Google::Apis::AndroidpublisherV3::AutoRenewingBasePlanType

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

Represents a base plan that automatically renews at the end of its subscription period.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AutoRenewingBasePlanType

Returns a new instance of AutoRenewingBasePlanType.



1056
1057
1058
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 1056

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

Instance Attribute Details

#account_hold_durationString

Optional. Custom account hold period of the subscription, specified in ISO 8601 format. Acceptable values must be in days and between P0D and P60D. An empty field represents a recommended account hold, calculated as 60 days minus grace period. The sum of gracePeriodDuration and accountHoldDuration must be between P30D and P60D days, inclusive. Corresponds to the JSON property accountHoldDuration

Returns:

  • (String)


1007
1008
1009
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 1007

def 
  @account_hold_duration
end

#billing_period_durationString

Required. Immutable. Subscription period, specified in ISO 8601 format. For a list of acceptable billing periods, refer to the help center. The duration is immutable after the base plan is created. Corresponds to the JSON property billingPeriodDuration

Returns:

  • (String)


1014
1015
1016
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 1014

def billing_period_duration
  @billing_period_duration
end

#grace_period_durationString

Grace period of the subscription, specified in ISO 8601 format. Acceptable values must be in days and between P0D and the lesser of 30D and base plan billing period. If not specified, a default value will be used based on the billing period. The sum of gracePeriodDuration and accountHoldDuration must be between P30D and P60D days, inclusive. Corresponds to the JSON property gracePeriodDuration

Returns:

  • (String)


1023
1024
1025
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 1023

def grace_period_duration
  @grace_period_duration
end

#legacy_compatibleBoolean Also known as: legacy_compatible?

Whether the renewing base plan is backward compatible. The backward compatible base plan is returned by the Google Play Billing Library deprecated method querySkuDetailsAsync(). Only one renewing base plan can be marked as legacy compatible for a given subscription. Corresponds to the JSON property legacyCompatible

Returns:

  • (Boolean)


1031
1032
1033
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 1031

def legacy_compatible
  @legacy_compatible
end

#legacy_compatible_subscription_offer_idString

Subscription offer id which is legacy compatible. The backward compatible subscription offer is returned by the Google Play Billing Library deprecated method querySkuDetailsAsync(). Only one subscription offer can be marked as legacy compatible for a given renewing base plan. To have no Subscription offer as legacy compatible set this field as empty string. Corresponds to the JSON property legacyCompatibleSubscriptionOfferId

Returns:

  • (String)


1041
1042
1043
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 1041

def legacy_compatible_subscription_offer_id
  @legacy_compatible_subscription_offer_id
end

#proration_modeString

The proration mode for the base plan determines what happens when a user switches to this plan from another base plan. If unspecified, defaults to CHARGE_ON_NEXT_BILLING_DATE. Corresponds to the JSON property prorationMode

Returns:

  • (String)


1048
1049
1050
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 1048

def proration_mode
  @proration_mode
end

#resubscribe_stateString

Whether users should be able to resubscribe to this base plan in Google Play surfaces. Defaults to RESUBSCRIBE_STATE_ACTIVE if not specified. Corresponds to the JSON property resubscribeState

Returns:

  • (String)


1054
1055
1056
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 1054

def resubscribe_state
  @resubscribe_state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1061
1062
1063
1064
1065
1066
1067
1068
1069
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 1061

def update!(**args)
  @account_hold_duration = args[:account_hold_duration] if args.key?(:account_hold_duration)
  @billing_period_duration = args[:billing_period_duration] if args.key?(:billing_period_duration)
  @grace_period_duration = args[:grace_period_duration] if args.key?(:grace_period_duration)
  @legacy_compatible = args[:legacy_compatible] if args.key?(:legacy_compatible)
  @legacy_compatible_subscription_offer_id = args[:legacy_compatible_subscription_offer_id] if args.key?(:legacy_compatible_subscription_offer_id)
  @proration_mode = args[:proration_mode] if args.key?(:proration_mode)
  @resubscribe_state = args[:resubscribe_state] if args.key?(:resubscribe_state)
end