Class: Google::Apis::WebcontentpublisherV1::NewsletterConfig

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

Overview

Configuration for newsletter signup calls-to-action (CTAs).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NewsletterConfig

Returns a new instance of NewsletterConfig.



257
258
259
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 257

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

Instance Attribute Details

Optional. Custom consent or disclosure text shown to the user. Corresponds to the JSON property customConsentText

Returns:

  • (String)


233
234
235
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 233

def custom_consent_text
  @custom_consent_text
end

#custom_messageString

Optional. A custom message displayed to the user in the signup prompt. Corresponds to the JSON property customMessage

Returns:

  • (String)


238
239
240
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 238

def custom_message
  @custom_message
end

#name_requiredBoolean Also known as: name_required?

Optional. Whether the user is required to provide their name to sign up. Corresponds to the JSON property nameRequired

Returns:

  • (Boolean)


243
244
245
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 243

def name_required
  @name_required
end

#opt_in_requiredBoolean Also known as: opt_in_required?

Optional. Whether checking the opt-in checkbox is required. Corresponds to the JSON property optInRequired

Returns:

  • (Boolean)


249
250
251
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 249

def opt_in_required
  @opt_in_required
end

#titleString

Required. The title of the newsletter signup prompt. Corresponds to the JSON property title

Returns:

  • (String)


255
256
257
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 255

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



262
263
264
265
266
267
268
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 262

def update!(**args)
  @custom_consent_text = args[:custom_consent_text] if args.key?(:custom_consent_text)
  @custom_message = args[:custom_message] if args.key?(:custom_message)
  @name_required = args[:name_required] if args.key?(:name_required)
  @opt_in_required = args[:opt_in_required] if args.key?(:opt_in_required)
  @title = args[:title] if args.key?(:title)
end