Class: Google::Apis::ContentV2_1::OrderCustomerMarketingRightsInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OrderCustomerMarketingRightsInfo

Returns a new instance of OrderCustomerMarketingRightsInfo.



5756
5757
5758
# File 'lib/google/apis/content_v2_1/classes.rb', line 5756

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

Instance Attribute Details

#explicit_marketing_preferenceString

Last known customer selection regarding marketing preferences. In certain cases this selection might not be known, so this field would be empty. If a customer selected granted in their most recent order, they can be subscribed to marketing emails. Customers who have chosen denied must not be subscribed, or must be unsubscribed if already opted-in. Acceptable values are: - " denied" - "granted" Corresponds to the JSON property explicitMarketingPreference

Returns:

  • (String)


5741
5742
5743
# File 'lib/google/apis/content_v2_1/classes.rb', line 5741

def explicit_marketing_preference
  @explicit_marketing_preference
end

#last_updated_timestampString

Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. Corresponds to the JSON property lastUpdatedTimestamp

Returns:

  • (String)


5747
5748
5749
# File 'lib/google/apis/content_v2_1/classes.rb', line 5747

def last_updated_timestamp
  @last_updated_timestamp
end

#marketing_email_addressString

Email address that can be used for marketing purposes. The field may be empty even if explicitMarketingPreference is 'granted'. This happens when retrieving an old order from the customer who deleted their account. Corresponds to the JSON property marketingEmailAddress

Returns:

  • (String)


5754
5755
5756
# File 'lib/google/apis/content_v2_1/classes.rb', line 5754

def marketing_email_address
  @marketing_email_address
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5761
5762
5763
5764
5765
# File 'lib/google/apis/content_v2_1/classes.rb', line 5761

def update!(**args)
  @explicit_marketing_preference = args[:explicit_marketing_preference] if args.key?(:explicit_marketing_preference)
  @last_updated_timestamp = args[:last_updated_timestamp] if args.key?(:last_updated_timestamp)
  @marketing_email_address = args[:marketing_email_address] if args.key?(:marketing_email_address)
end