Class: Google::Apis::WalletobjectsV1::OfferClass

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OfferClass

Returns a new instance of OfferClass.



6110
6111
6112
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6110

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

Instance Attribute Details

#allow_multiple_users_per_objectBoolean Also known as: allow_multiple_users_per_object?

Deprecated. Use multipleDevicesAndHoldersAllowedStatus instead. Corresponds to the JSON property allowMultipleUsersPerObject

Returns:

  • (Boolean)


5852
5853
5854
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5852

def allow_multiple_users_per_object
  @allow_multiple_users_per_object
end

Optional app or website link that will be displayed as a button on the front of the pass. If AppLinkData is provided for the corresponding object that will be used instead. Corresponds to the JSON property appLinkData



5860
5861
5862
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5860

def app_link_data
  @app_link_data
end

#callback_optionsGoogle::Apis::WalletobjectsV1::CallbackOptions

Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback. Corresponds to the JSON property callbackOptions



5867
5868
5869
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5867

def callback_options
  @callback_options
end

#class_template_infoGoogle::Apis::WalletobjectsV1::ClassTemplateInfo

Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display. Corresponds to the JSON property classTemplateInfo



5873
5874
5875
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5873

def class_template_info
  @class_template_info
end

#country_codeString

Country code used to display the card's country (when the user is not in that country), as well as to display localized content when content is not available in the user's locale. Corresponds to the JSON property countryCode

Returns:

  • (String)


5880
5881
5882
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5880

def country_code
  @country_code
end

#detailsString

The details of the offer. Corresponds to the JSON property details

Returns:

  • (String)


5885
5886
5887
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5885

def details
  @details
end

#enable_smart_tapBoolean Also known as: enable_smart_tap?

Identifies whether this class supports Smart Tap. The redemptionIssuers and object level smartTapRedemptionLevel fields must also be set up correctly in order for a pass to support Smart Tap. Corresponds to the JSON property enableSmartTap

Returns:

  • (Boolean)


5892
5893
5894
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5892

def enable_smart_tap
  @enable_smart_tap
end

#fine_printString

The fine print or terms of the offer, such as "20% off any t-shirt at Adam's Apparel." Corresponds to the JSON property finePrint

Returns:

  • (String)


5899
5900
5901
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5899

def fine_print
  @fine_print
end

#help_uriGoogle::Apis::WalletobjectsV1::Uri

The help link for the offer, such as http://myownpersonaldomain.com/help Corresponds to the JSON property helpUri



5904
5905
5906
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5904

def help_uri
  @help_uri
end

#hero_imageGoogle::Apis::WalletobjectsV1::Image

Wrapping type for Google hosted images. Next ID: 7 Corresponds to the JSON property heroImage



5909
5910
5911
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5909

def hero_image
  @hero_image
end

#hex_background_colorString

The background color for the card. If not set the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used. The format is #rrggbb where rrggbb is a hex RGB triplet, such as # ffcc00. You can also use the shorthand version of the RGB triplet which is # rgb, such as #fc0. Corresponds to the JSON property hexBackgroundColor

Returns:

  • (String)


5918
5919
5920
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5918

def hex_background_color
  @hex_background_color
end

#homepage_uriGoogle::Apis::WalletobjectsV1::Uri

The URI of your application's home page. Populating the URI in this field results in the exact same behavior as populating an URI in linksModuleData ( when an object is rendered, a link to the homepage is shown in what would usually be thought of as the linksModuleData section of the object). Corresponds to the JSON property homepageUri



5926
5927
5928
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5926

def homepage_uri
  @homepage_uri
end

#idString

Required. The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'. Corresponds to the JSON property id

Returns:

  • (String)


5935
5936
5937
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5935

def id
  @id
end

#image_modules_dataArray<Google::Apis::WalletobjectsV1::ImageModuleData>

Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level. Corresponds to the JSON property imageModulesData



5941
5942
5943
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5941

def image_modules_data
  @image_modules_data
end

#info_module_dataGoogle::Apis::WalletobjectsV1::InfoModuleData

Deprecated. Use textModulesData instead. Corresponds to the JSON property infoModuleData



5946
5947
5948
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5946

def info_module_data
  @info_module_data
end

#issuer_nameString

Required. The issuer name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property issuerName

Returns:

  • (String)


5952
5953
5954
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5952

def issuer_name
  @issuer_name
end

#kindString

Identifies what kind of resource this is. Value: the fixed string " walletobjects#offerClass". Corresponds to the JSON property kind

Returns:

  • (String)


5958
5959
5960
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5958

def kind
  @kind
end

Links module data. If links module data is also defined on the object, both will be displayed. Corresponds to the JSON property linksModuleData



5964
5965
5966
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5964

def links_module_data
  @links_module_data
end

#localized_detailsGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the details. Corresponds to the JSON property localizedDetails



5969
5970
5971
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5969

def localized_details
  @localized_details
end

#localized_fine_printGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the fine_print. Corresponds to the JSON property localizedFinePrint



5974
5975
5976
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5974

def localized_fine_print
  @localized_fine_print
end

#localized_issuer_nameGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property localizedIssuerName



5980
5981
5982
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5980

def localized_issuer_name
  @localized_issuer_name
end

#localized_providerGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the provider. Recommended maximum length is 12 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property localizedProvider



5986
5987
5988
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5986

def localized_provider
  @localized_provider
end

#localized_short_titleGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the short title. Recommended maximum length is 20 characters. Corresponds to the JSON property localizedShortTitle



5992
5993
5994
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5992

def localized_short_title
  @localized_short_title
end

#localized_titleGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the title. Recommended maximum length is 60 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property localizedTitle



5998
5999
6000
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5998

def localized_title
  @localized_title
end

#locationsArray<Google::Apis::WalletobjectsV1::LatLongPoint>

Note: This field is currently not supported to trigger geo notifications. Corresponds to the JSON property locations



6003
6004
6005
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6003

def locations
  @locations
end

#messagesArray<Google::Apis::WalletobjectsV1::Message>

An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10. Corresponds to the JSON property messages



6009
6010
6011
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6009

def messages
  @messages
end

#multiple_devices_and_holders_allowed_statusString

Identifies whether multiple users and devices will save the same object referencing this class. Corresponds to the JSON property multipleDevicesAndHoldersAllowedStatus

Returns:

  • (String)


6015
6016
6017
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6015

def multiple_devices_and_holders_allowed_status
  @multiple_devices_and_holders_allowed_status
end

#providerString

Required. The offer provider (either the aggregator name or merchant name). Recommended maximum length is 12 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property provider

Returns:

  • (String)


6022
6023
6024
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6022

def provider
  @provider
end

#redemption_channelString

Required. The redemption channels applicable to this offer. Corresponds to the JSON property redemptionChannel

Returns:

  • (String)


6027
6028
6029
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6027

def redemption_channel
  @redemption_channel
end

#redemption_issuersArray<Fixnum>

Identifies which redemption issuers can redeem the pass over Smart Tap. Redemption issuers are identified by their issuer ID. Redemption issuers must have at least one Smart Tap key configured. The enableSmartTap and object level smartTapRedemptionLevel fields must also be set up correctly in order for a pass to support Smart Tap. Corresponds to the JSON property redemptionIssuers

Returns:

  • (Array<Fixnum>)


6036
6037
6038
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6036

def redemption_issuers
  @redemption_issuers
end

#reviewGoogle::Apis::WalletobjectsV1::Review

The review comments set by the platform when a class is marked approved or rejected. Corresponds to the JSON property review



6042
6043
6044
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6042

def review
  @review
end

#review_statusString

Required. The status of the class. This field can be set to draft or The status of the class. This field can be set to draft or underReview using the insert, patch, or update API calls. Once the review state is changed from draft it may not be changed back to draft. You should keep this field to draft when the class is under development. A draft class cannot be used to create any object. You should set this field to underReview when you believe the class is ready for use. The platform will automatically set this field to approved and it can be immediately used to create or migrate objects. When updating an already approved class you should keep setting this field to underReview. Corresponds to the JSON property reviewStatus

Returns:

  • (String)


6056
6057
6058
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6056

def review_status
  @review_status
end

#security_animationGoogle::Apis::WalletobjectsV1::SecurityAnimation

Optional information about the security animation. If this is set a security animation will be rendered on pass details. Corresponds to the JSON property securityAnimation



6062
6063
6064
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6062

def security_animation
  @security_animation
end

#short_titleString

A shortened version of the title of the offer, such as "20% off," shown to users as a quick reference to the offer contents. Recommended maximum length is 20 characters. Corresponds to the JSON property shortTitle

Returns:

  • (String)


6069
6070
6071
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6069

def short_title
  @short_title
end

#text_modules_dataArray<Google::Apis::WalletobjectsV1::TextModuleData>

Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class. Corresponds to the JSON property textModulesData



6076
6077
6078
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6076

def text_modules_data
  @text_modules_data
end

#titleString

Required. The title of the offer, such as "20% off any t-shirt." Recommended maximum length is 60 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property title

Returns:

  • (String)


6083
6084
6085
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6083

def title
  @title
end

#title_imageGoogle::Apis::WalletobjectsV1::Image

Wrapping type for Google hosted images. Next ID: 7 Corresponds to the JSON property titleImage



6088
6089
6090
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6088

def title_image
  @title_image
end

#versionFixnum

Deprecated Corresponds to the JSON property version

Returns:

  • (Fixnum)


6093
6094
6095
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6093

def version
  @version
end

#view_unlock_requirementString

View Unlock Requirement options for the offer. Corresponds to the JSON property viewUnlockRequirement

Returns:

  • (String)


6098
6099
6100
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6098

def view_unlock_requirement
  @view_unlock_requirement
end

#wide_title_imageGoogle::Apis::WalletobjectsV1::Image

Wrapping type for Google hosted images. Next ID: 7 Corresponds to the JSON property wideTitleImage



6103
6104
6105
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6103

def wide_title_image
  @wide_title_image
end

#word_markGoogle::Apis::WalletobjectsV1::Image

Wrapping type for Google hosted images. Next ID: 7 Corresponds to the JSON property wordMark



6108
6109
6110
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6108

def word_mark
  @word_mark
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6115

def update!(**args)
  @allow_multiple_users_per_object = args[:allow_multiple_users_per_object] if args.key?(:allow_multiple_users_per_object)
  @app_link_data = args[:app_link_data] if args.key?(:app_link_data)
  @callback_options = args[:callback_options] if args.key?(:callback_options)
  @class_template_info = args[:class_template_info] if args.key?(:class_template_info)
  @country_code = args[:country_code] if args.key?(:country_code)
  @details = args[:details] if args.key?(:details)
  @enable_smart_tap = args[:enable_smart_tap] if args.key?(:enable_smart_tap)
  @fine_print = args[:fine_print] if args.key?(:fine_print)
  @help_uri = args[:help_uri] if args.key?(:help_uri)
  @hero_image = args[:hero_image] if args.key?(:hero_image)
  @hex_background_color = args[:hex_background_color] if args.key?(:hex_background_color)
  @homepage_uri = args[:homepage_uri] if args.key?(:homepage_uri)
  @id = args[:id] if args.key?(:id)
  @image_modules_data = args[:image_modules_data] if args.key?(:image_modules_data)
  @info_module_data = args[:info_module_data] if args.key?(:info_module_data)
  @issuer_name = args[:issuer_name] if args.key?(:issuer_name)
  @kind = args[:kind] if args.key?(:kind)
  @links_module_data = args[:links_module_data] if args.key?(:links_module_data)
  @localized_details = args[:localized_details] if args.key?(:localized_details)
  @localized_fine_print = args[:localized_fine_print] if args.key?(:localized_fine_print)
  @localized_issuer_name = args[:localized_issuer_name] if args.key?(:localized_issuer_name)
  @localized_provider = args[:localized_provider] if args.key?(:localized_provider)
  @localized_short_title = args[:localized_short_title] if args.key?(:localized_short_title)
  @localized_title = args[:localized_title] if args.key?(:localized_title)
  @locations = args[:locations] if args.key?(:locations)
  @messages = args[:messages] if args.key?(:messages)
  @multiple_devices_and_holders_allowed_status = args[:multiple_devices_and_holders_allowed_status] if args.key?(:multiple_devices_and_holders_allowed_status)
  @provider = args[:provider] if args.key?(:provider)
  @redemption_channel = args[:redemption_channel] if args.key?(:redemption_channel)
  @redemption_issuers = args[:redemption_issuers] if args.key?(:redemption_issuers)
  @review = args[:review] if args.key?(:review)
  @review_status = args[:review_status] if args.key?(:review_status)
  @security_animation = args[:security_animation] if args.key?(:security_animation)
  @short_title = args[:short_title] if args.key?(:short_title)
  @text_modules_data = args[:text_modules_data] if args.key?(:text_modules_data)
  @title = args[:title] if args.key?(:title)
  @title_image = args[:title_image] if args.key?(:title_image)
  @version = args[:version] if args.key?(:version)
  @view_unlock_requirement = args[:view_unlock_requirement] if args.key?(:view_unlock_requirement)
  @wide_title_image = args[:wide_title_image] if args.key?(:wide_title_image)
  @word_mark = args[:word_mark] if args.key?(:word_mark)
end