Class: Google::Apis::WebcontentpublisherV1::Cta

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

Represents a Call-To-Action (CTA) configuration for a publication.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Cta

Returns a new instance of Cta.



100
101
102
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 100

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

Instance Attribute Details

#display_nameString

Required. The user-visible display name of the CTA. Corresponds to the JSON property displayName

Returns:

  • (String)


77
78
79
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 77

def display_name
  @display_name
end

#nameString

Identifier. The resource name of the Cta. Format: organizations/organization/ publications/publication/ctas/cta Corresponds to the JSON property name

Returns:

  • (String)


83
84
85
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 83

def name
  @name
end

#newsletter_configGoogle::Apis::WebcontentpublisherV1::NewsletterConfig

Configuration for newsletter signup calls-to-action (CTAs). Corresponds to the JSON property newsletterConfig



88
89
90
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 88

def newsletter_config
  @newsletter_config
end

#stateString

Output only. The current state of this CTA. Corresponds to the JSON property state

Returns:

  • (String)


93
94
95
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 93

def state
  @state
end

#typeString

Required. The type of this CTA. Corresponds to the JSON property type

Returns:

  • (String)


98
99
100
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 98

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



105
106
107
108
109
110
111
# File 'lib/google/apis/webcontentpublisher_v1/classes.rb', line 105

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @name = args[:name] if args.key?(:name)
  @newsletter_config = args[:newsletter_config] if args.key?(:newsletter_config)
  @state = args[:state] if args.key?(:state)
  @type = args[:type] if args.key?(:type)
end