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.



219
220
221
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 219

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)


201
202
203
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 201

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)


206
207
208
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 206

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)


211
212
213
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 211

def name_required
  @name_required
end

#titleString

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

Returns:

  • (String)


217
218
219
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 217

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



224
225
226
227
228
229
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 224

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)
  @title = args[:title] if args.key?(:title)
end