Class: Google::Apis::WalletobjectsV1::GenericObject
- Inherits:
-
Object
- Object
- Google::Apis::WalletobjectsV1::GenericObject
- 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
Overview
Generic Object Next ID: 121
Instance Attribute Summary collapse
-
#app_link_data ⇒ Google::Apis::WalletobjectsV1::AppLinkData
Information about the partner app link.
-
#barcode ⇒ Google::Apis::WalletobjectsV1::Barcode
The barcode type and value.
-
#card_title ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Required.
-
#class_id ⇒ String
Required.
-
#generic_type ⇒ String
Specify which
GenericTypethe card belongs to. -
#grouping_info ⇒ Google::Apis::WalletobjectsV1::GroupingInfo
Information that controls how passes are grouped together.
-
#has_users ⇒ Boolean
(also: #has_users?)
Indicates if the object has users.
-
#header ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Required.
-
#hero_image ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images.
-
#hex_background_color ⇒ String
The background color for the card.
-
#id ⇒ String
Required.
-
#image_modules_data ⇒ Array<Google::Apis::WalletobjectsV1::ImageModuleData>
Image module data.
-
#links_module_data ⇒ Google::Apis::WalletobjectsV1::LinksModuleData
Links module data.
-
#logo ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images.
-
#notifications ⇒ Google::Apis::WalletobjectsV1::Notifications
Indicates if the object needs to have notification enabled.
-
#pass_constraints ⇒ Google::Apis::WalletobjectsV1::PassConstraints
Container for any constraints that may be placed on passes.
-
#rotating_barcode ⇒ Google::Apis::WalletobjectsV1::RotatingBarcode
The rotating barcode settings/details.
-
#smart_tap_redemption_value ⇒ String
The value that will be transmitted to a Smart Tap certified terminal over NFC for this object.
-
#state ⇒ String
The state of the object.
-
#subheader ⇒ Google::Apis::WalletobjectsV1::LocalizedString
The title label of the pass, such as location where this pass can be used.
-
#text_modules_data ⇒ Array<Google::Apis::WalletobjectsV1::TextModuleData>
Text module data.
-
#valid_time_interval ⇒ Google::Apis::WalletobjectsV1::TimeInterval
The time period this object will be considered valid or usable.
-
#wide_logo ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GenericObject
constructor
A new instance of GenericObject.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GenericObject
Returns a new instance of GenericObject.
3341 3342 3343 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3341 def initialize(**args) update!(**args) end |
Instance Attribute Details
#app_link_data ⇒ Google::Apis::WalletobjectsV1::AppLinkData
Information about the partner app link. The maximum number of these fields
displayed is 10.
Corresponds to the JSON property appLinkData
3197 3198 3199 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3197 def app_link_data @app_link_data end |
#barcode ⇒ Google::Apis::WalletobjectsV1::Barcode
The barcode type and value. If pass does not have a barcode, we can allow the
issuer to set Barcode.alternate_text and display just that.
Corresponds to the JSON property barcode
3203 3204 3205 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3203 def @barcode end |
#card_title ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Required. The header of the pass. This is usually the Business name such as "
XXX Gym", "AAA Insurance". This field is required and appears in the header
row at the very top of the pass.
Corresponds to the JSON property cardTitle
3210 3211 3212 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3210 def card_title @card_title end |
#class_id ⇒ String
Required. The class associated with this object. The class must be of the same
type as this object, must already exist, and must be approved. Class IDs
should follow the format issuerID.identifier where issuerID is issued by
Google and identifier is chosen by you.
Corresponds to the JSON property classId
3218 3219 3220 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3218 def class_id @class_id end |
#generic_type ⇒ String
Specify which GenericType the card belongs to.
Corresponds to the JSON property genericType
3223 3224 3225 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3223 def generic_type @generic_type end |
#grouping_info ⇒ Google::Apis::WalletobjectsV1::GroupingInfo
Information that controls how passes are grouped together.
Corresponds to the JSON property groupingInfo
3228 3229 3230 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3228 def grouping_info @grouping_info end |
#has_users ⇒ Boolean Also known as: has_users?
Indicates if the object has users. This field is set by the platform.
Corresponds to the JSON property hasUsers
3233 3234 3235 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3233 def has_users @has_users end |
#header ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Required. The title of the pass, such as "50% off coupon" or "Library card" or
"Voucher". This field is required and appears in the title row of the pass
detail view.
Corresponds to the JSON property header
3241 3242 3243 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3241 def header @header end |
#hero_image ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images. Next ID: 7
Corresponds to the JSON property heroImage
3246 3247 3248 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3246 def hero_image @hero_image end |
#hex_background_color ⇒ String
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 and if logo is not set, a color would be chosen by Google.
Corresponds to the JSON property hexBackgroundColor
3253 3254 3255 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3253 def hex_background_color @hex_background_color end |
#id ⇒ String
Required. The unique identifier for an object. This ID must be unique across
all objects from an issuer. This value needs to follow the format issuerID.
identifier where issuerID is issued by Google and identifier is chosen by
you. The unique identifier can only include alphanumeric characters, ., _,
or -.
Corresponds to the JSON property id
3262 3263 3264 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3262 def id @id end |
#image_modules_data ⇒ Array<Google::Apis::WalletobjectsV1::ImageModuleData>
Image module data. Only one of the image from class and one from object level
will be rendered when both set.
Corresponds to the JSON property imageModulesData
3268 3269 3270 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3268 def image_modules_data @image_modules_data end |
#links_module_data ⇒ Google::Apis::WalletobjectsV1::LinksModuleData
Links module data. If linksModuleData is also defined on the class, both
will be displayed. The maximum number of these fields displayed is 10 from
class and 10 from object.
Corresponds to the JSON property linksModuleData
3275 3276 3277 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3275 def links_module_data @links_module_data end |
#logo ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images. Next ID: 7
Corresponds to the JSON property logo
3280 3281 3282 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3280 def logo @logo end |
#notifications ⇒ Google::Apis::WalletobjectsV1::Notifications
Indicates if the object needs to have notification enabled. We support only
one of ExpiryNotification/UpcomingNotification. expiryNotification takes
precedence over upcomingNotification. In other words if expiryNotification
is set, we ignore the upcomingNotification field.
Corresponds to the JSON property notifications
3288 3289 3290 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3288 def notifications @notifications end |
#pass_constraints ⇒ Google::Apis::WalletobjectsV1::PassConstraints
Container for any constraints that may be placed on passes.
Corresponds to the JSON property passConstraints
3293 3294 3295 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3293 def pass_constraints @pass_constraints end |
#rotating_barcode ⇒ Google::Apis::WalletobjectsV1::RotatingBarcode
The rotating barcode settings/details.
Corresponds to the JSON property rotatingBarcode
3298 3299 3300 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3298 def @rotating_barcode end |
#smart_tap_redemption_value ⇒ String
The value that will be transmitted to a Smart Tap certified terminal over NFC
for this object. The class level fields enableSmartTap and
redemptionIssuers must also be set up correctly in order for the pass to
support Smart Tap. Only ASCII characters are supported.
Corresponds to the JSON property smartTapRedemptionValue
3306 3307 3308 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3306 def smart_tap_redemption_value @smart_tap_redemption_value end |
#state ⇒ String
The state of the object. This field is used to determine how an object is
displayed in the app. For example, an inactive object is moved to the "
Expired passes" section. If this is not provided, the object would be
considered ACTIVE.
Corresponds to the JSON property state
3314 3315 3316 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3314 def state @state end |
#subheader ⇒ Google::Apis::WalletobjectsV1::LocalizedString
The title label of the pass, such as location where this pass can be used.
Appears right above the title in the title row in the pass detail view.
Corresponds to the JSON property subheader
3320 3321 3322 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3320 def subheader @subheader end |
#text_modules_data ⇒ Array<Google::Apis::WalletobjectsV1::TextModuleData>
Text module data. If textModulesData is also defined on the class, both will
be displayed. The maximum number of these fields displayed is 10 from class
and 10 from object.
Corresponds to the JSON property textModulesData
3327 3328 3329 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3327 def text_modules_data @text_modules_data end |
#valid_time_interval ⇒ Google::Apis::WalletobjectsV1::TimeInterval
The time period this object will be considered valid or usable. When the time
period is passed, the object will be considered expired, which will affect the
rendering on user's devices.
Corresponds to the JSON property validTimeInterval
3334 3335 3336 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3334 def valid_time_interval @valid_time_interval end |
#wide_logo ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images. Next ID: 7
Corresponds to the JSON property wideLogo
3339 3340 3341 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3339 def wide_logo @wide_logo end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3346 def update!(**args) @app_link_data = args[:app_link_data] if args.key?(:app_link_data) @barcode = args[:barcode] if args.key?(:barcode) @card_title = args[:card_title] if args.key?(:card_title) @class_id = args[:class_id] if args.key?(:class_id) @generic_type = args[:generic_type] if args.key?(:generic_type) @grouping_info = args[:grouping_info] if args.key?(:grouping_info) @has_users = args[:has_users] if args.key?(:has_users) @header = args[:header] if args.key?(:header) @hero_image = args[:hero_image] if args.key?(:hero_image) @hex_background_color = args[:hex_background_color] if args.key?(:hex_background_color) @id = args[:id] if args.key?(:id) @image_modules_data = args[:image_modules_data] if args.key?(:image_modules_data) @links_module_data = args[:links_module_data] if args.key?(:links_module_data) @logo = args[:logo] if args.key?(:logo) @notifications = args[:notifications] if args.key?(:notifications) @pass_constraints = args[:pass_constraints] if args.key?(:pass_constraints) @rotating_barcode = args[:rotating_barcode] if args.key?(:rotating_barcode) @smart_tap_redemption_value = args[:smart_tap_redemption_value] if args.key?(:smart_tap_redemption_value) @state = args[:state] if args.key?(:state) @subheader = args[:subheader] if args.key?(:subheader) @text_modules_data = args[:text_modules_data] if args.key?(:text_modules_data) @valid_time_interval = args[:valid_time_interval] if args.key?(:valid_time_interval) @wide_logo = args[:wide_logo] if args.key?(:wide_logo) end |