Class: Google::Apis::AndroidpublisherV3::SubscriptionOffer

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

A single, temporary offer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SubscriptionOffer

Returns a new instance of SubscriptionOffer.



3195
3196
3197
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3195

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

Instance Attribute Details

#base_plan_idString

Required. Immutable. The ID of the base plan to which this offer is an extension. Corresponds to the JSON property basePlanId

Returns:

  • (String)


3138
3139
3140
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3138

def base_plan_id
  @base_plan_id
end

#offer_idString

Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. Corresponds to the JSON property offerId

Returns:

  • (String)


3144
3145
3146
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3144

def offer_id
  @offer_id
end

#offer_tagsArray<Google::Apis::AndroidpublisherV3::OfferTag>

List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. Corresponds to the JSON property offerTags



3150
3151
3152
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3150

def offer_tags
  @offer_tags
end

#other_regions_configGoogle::Apis::AndroidpublisherV3::OtherRegionsSubscriptionOfferConfig

Configuration for any new locations Play may launch in specified on a subscription offer. Corresponds to the JSON property otherRegionsConfig



3156
3157
3158
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3156

def other_regions_config
  @other_regions_config
end

#package_nameString

Required. Immutable. The package name of the app the parent subscription belongs to. Corresponds to the JSON property packageName

Returns:

  • (String)


3162
3163
3164
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3162

def package_name
  @package_name
end

#phasesArray<Google::Apis::AndroidpublisherV3::SubscriptionOfferPhase>

Required. The phases of this subscription offer. Must contain at least one entry, and may contain at most five. Users will always receive all these phases in the specified order. Phases may not be added, removed, or reordered after initial creation. Corresponds to the JSON property phases



3170
3171
3172
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3170

def phases
  @phases
end

#product_idString

Required. Immutable. The ID of the parent subscription this offer belongs to. Corresponds to the JSON property productId

Returns:

  • (String)


3175
3176
3177
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3175

def product_id
  @product_id
end

#regional_configsArray<Google::Apis::AndroidpublisherV3::RegionalSubscriptionOfferConfig>

Required. The region-specific configuration of this offer. Must contain at least one entry. Corresponds to the JSON property regionalConfigs



3181
3182
3183
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3181

def regional_configs
  @regional_configs
end

#stateString

Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. Corresponds to the JSON property state

Returns:

  • (String)


3188
3189
3190
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3188

def state
  @state
end

#targetingGoogle::Apis::AndroidpublisherV3::SubscriptionOfferTargeting

Defines the rule a user needs to satisfy to receive this offer. Corresponds to the JSON property targeting



3193
3194
3195
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3193

def targeting
  @targeting
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
# File 'lib/google/apis/androidpublisher_v3/classes.rb', line 3200

def update!(**args)
  @base_plan_id = args[:base_plan_id] if args.key?(:base_plan_id)
  @offer_id = args[:offer_id] if args.key?(:offer_id)
  @offer_tags = args[:offer_tags] if args.key?(:offer_tags)
  @other_regions_config = args[:other_regions_config] if args.key?(:other_regions_config)
  @package_name = args[:package_name] if args.key?(:package_name)
  @phases = args[:phases] if args.key?(:phases)
  @product_id = args[:product_id] if args.key?(:product_id)
  @regional_configs = args[:regional_configs] if args.key?(:regional_configs)
  @state = args[:state] if args.key?(:state)
  @targeting = args[:targeting] if args.key?(:targeting)
end