Class: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Promotion

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

Overview

A Promotion resource that defines a promotion for a subscription that can be resold.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudPaymentsResellerSubscriptionV1Promotion

Returns a new instance of GoogleCloudPaymentsResellerSubscriptionV1Promotion.



375
376
377
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 375

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

Instance Attribute Details

#applicable_productsArray<String>

Output only. The product ids this promotion can be applied to. Corresponds to the JSON property applicableProducts

Returns:

  • (Array<String>)


339
340
341
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 339

def applicable_products
  @applicable_products
end

#end_timeString

Optional. Specifies the end time (exclusive) of the period that the promotion is available in. If unset, the promotion is available indefinitely. Corresponds to the JSON property endTime

Returns:

  • (String)


345
346
347
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 345

def end_time
  @end_time
end

#free_trial_durationGoogle::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Duration

Describes the length of a period of a time. Corresponds to the JSON property freeTrialDuration



350
351
352
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 350

def free_trial_duration
  @free_trial_duration
end

#nameString

Output only. Response only. Resource name of the subscription promotion. It will have the format of "partners/partner_id/promotion/promotion_id" Corresponds to the JSON property name

Returns:

  • (String)


356
357
358
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 356

def name
  @name
end

#region_codesArray<String>

Output only. 2-letter ISO region code where the promotion is available in. Ex. "US" Please refers to: https://en.wikipedia.org/wiki/ISO_3166-1 Corresponds to the JSON property regionCodes

Returns:

  • (Array<String>)


362
363
364
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 362

def region_codes
  @region_codes
end

#start_timeString

Optional. Specifies the start time (inclusive) of the period that the promotion is available in. Corresponds to the JSON property startTime

Returns:

  • (String)


368
369
370
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 368

def start_time
  @start_time
end

#titlesArray<Google::Apis::PaymentsresellersubscriptionV1::GoogleTypeLocalizedText>

Output only. Localized human readable name of the promotion. Corresponds to the JSON property titles



373
374
375
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 373

def titles
  @titles
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



380
381
382
383
384
385
386
387
388
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 380

def update!(**args)
  @applicable_products = args[:applicable_products] if args.key?(:applicable_products)
  @end_time = args[:end_time] if args.key?(:end_time)
  @free_trial_duration = args[:free_trial_duration] if args.key?(:free_trial_duration)
  @name = args[:name] if args.key?(:name)
  @region_codes = args[:region_codes] if args.key?(:region_codes)
  @start_time = args[:start_time] if args.key?(:start_time)
  @titles = args[:titles] if args.key?(:titles)
end