Class: Google::Apis::AndroidpublisherV2::InAppProduct

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/androidpublisher_v2/classes.rb,
generated/google/apis/androidpublisher_v2/representations.rb,
generated/google/apis/androidpublisher_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ InAppProduct

Returns a new instance of InAppProduct



831
832
833
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 831

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

Instance Attribute Details

#default_languageString

The default language of the localized data, as defined by BCP 47. e.g. "en-US", "en-GB". Corresponds to the JSON property defaultLanguage

Returns:

  • (String)


764
765
766
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 764

def default_language
  @default_language
end

#default_priceGoogle::Apis::AndroidpublisherV2::Price

Default price cannot be zero. In-app products can never be free. Default price is always in the developer's Checkout merchant currency. Corresponds to the JSON property defaultPrice



770
771
772
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 770

def default_price
  @default_price
end

#grace_periodString

Grace period of the subscription, specified in ISO 8601 format. It will allow developers to give their subscribers a grace period when the payment for the new recurrence period is declined. Acceptable values = "P3D" (three days) and " P7D" (seven days) Corresponds to the JSON property gracePeriod

Returns:

  • (String)


778
779
780
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 778

def grace_period
  @grace_period
end

#listingsHash<String,Google::Apis::AndroidpublisherV2::InAppProductListing>

List of localized title and description data. Corresponds to the JSON property listings



783
784
785
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 783

def listings
  @listings
end

#package_nameString

The package name of the parent app. Corresponds to the JSON property packageName

Returns:

  • (String)


788
789
790
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 788

def package_name
  @package_name
end

#pricesHash<String,Google::Apis::AndroidpublisherV2::Price>

Prices per buyer region. None of these prices should be zero. In-app products can never be free. Corresponds to the JSON property prices

Returns:



794
795
796
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 794

def prices
  @prices
end

#purchase_typeString

Purchase type enum value. Unmodifiable after creation. Corresponds to the JSON property purchaseType

Returns:

  • (String)


799
800
801
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 799

def purchase_type
  @purchase_type
end

#seasonGoogle::Apis::AndroidpublisherV2::Season

Definition of a season for a seasonal subscription. Can be defined only for yearly subscriptions. Corresponds to the JSON property season



805
806
807
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 805

def season
  @season
end

#skuString

The stock-keeping-unit (SKU) of the product, unique within an app. Corresponds to the JSON property sku

Returns:

  • (String)


810
811
812
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 810

def sku
  @sku
end

#statusString

Corresponds to the JSON property status

Returns:

  • (String)


815
816
817
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 815

def status
  @status
end

#subscription_periodString

Subscription period, specified in ISO 8601 format. Acceptable values are "P1W" (one week), "P1M" (one month), "P3M" (three months), "P6M" (six months), and " P1Y" (one year). Corresponds to the JSON property subscriptionPeriod

Returns:

  • (String)


822
823
824
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 822

def subscription_period
  @subscription_period
end

#trial_periodString

Trial period, specified in ISO 8601 format. Acceptable values are anything between "P7D" (seven days) and "P999D" (999 days). Seasonal subscriptions cannot have a trial period. Corresponds to the JSON property trialPeriod

Returns:

  • (String)


829
830
831
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 829

def trial_period
  @trial_period
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



836
837
838
839
840
841
842
843
844
845
846
847
848
849
# File 'generated/google/apis/androidpublisher_v2/classes.rb', line 836

def update!(**args)
  @default_language = args[:default_language] if args.key?(:default_language)
  @default_price = args[:default_price] if args.key?(:default_price)
  @grace_period = args[:grace_period] if args.key?(:grace_period)
  @listings = args[:listings] if args.key?(:listings)
  @package_name = args[:package_name] if args.key?(:package_name)
  @prices = args[:prices] if args.key?(:prices)
  @purchase_type = args[:purchase_type] if args.key?(:purchase_type)
  @season = args[:season] if args.key?(:season)
  @sku = args[:sku] if args.key?(:sku)
  @status = args[:status] if args.key?(:status)
  @subscription_period = args[:subscription_period] if args.key?(:subscription_period)
  @trial_period = args[:trial_period] if args.key?(:trial_period)
end