Class: Google::Apis::WalletobjectsV1::GenericObject

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

Overview

Generic Object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GenericObject

Returns a new instance of GenericObject.



3637
3638
3639
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3637

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

Instance Attribute Details

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 class only object AppLinkData will be displayed. Corresponds to the JSON property appLinkData



3451
3452
3453
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3451

def app_link_data
  @app_link_data
end

#barcodeGoogle::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



3457
3458
3459
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3457

def barcode
  @barcode
end

#card_titleGoogle::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



3464
3465
3466
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3464

def card_title
  @card_title
end

#class_idString

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

Returns:

  • (String)


3472
3473
3474
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3472

def class_id
  @class_id
end

#generic_typeString

Specify which GenericType the card belongs to. Corresponds to the JSON property genericType

Returns:

  • (String)


3477
3478
3479
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3477

def generic_type
  @generic_type
end

#grouping_infoGoogle::Apis::WalletobjectsV1::GroupingInfo

Information that controls how passes are grouped together. Corresponds to the JSON property groupingInfo



3482
3483
3484
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3482

def grouping_info
  @grouping_info
end

#has_usersBoolean Also known as: has_users?

Indicates if the object has users. This field is set by the platform. Corresponds to the JSON property hasUsers

Returns:

  • (Boolean)


3487
3488
3489
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3487

def has_users
  @has_users
end

#headerGoogle::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



3495
3496
3497
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3495

def header
  @header
end

#hero_imageGoogle::Apis::WalletobjectsV1::Image

Wrapping type for Google hosted images. Corresponds to the JSON property heroImage



3500
3501
3502
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3500

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 and if logo is not set, a color would be chosen by Google. Corresponds to the JSON property hexBackgroundColor

Returns:

  • (String)


3507
3508
3509
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3507

def hex_background_color
  @hex_background_color
end

#idString

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

Returns:

  • (String)


3516
3517
3518
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3516

def id
  @id
end

#image_modules_dataArray<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



3522
3523
3524
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3522

def image_modules_data
  @image_modules_data
end

#linked_object_idsArray<String>

linked_object_ids are a list of other objects such as event ticket, loyalty, offer, generic, giftcard, transit and boarding pass that should be automatically attached to this generic object. If a user had saved this generic card, then these linked_object_ids would be automatically pushed to the user's wallet (unless they turned off the setting to receive such linked passes). Make sure that objects present in linked_object_ids are already inserted - if not, calls would fail. Once linked, the linked objects cannot be unlinked. You cannot link objects belonging to another issuer. There is a limit to the number of objects that can be linked to a single object. After the limit is reached, new linked objects in the call will be ignored silently. Object IDs should follow the format issuer ID. identifier where the former is issued by Google and the latter is chosen by you. Corresponds to the JSON property linkedObjectIds

Returns:

  • (Array<String>)


3538
3539
3540
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3538

def linked_object_ids
  @linked_object_ids
end

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



3545
3546
3547
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3545

def links_module_data
  @links_module_data
end

#logoGoogle::Apis::WalletobjectsV1::Image

Wrapping type for Google hosted images. Corresponds to the JSON property logo



3550
3551
3552
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3550

def 
  @logo
end

#merchant_locationsArray<Google::Apis::WalletobjectsV1::MerchantLocation>

Merchant locations. There is a maximum of ten on the object. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints. Corresponds to the JSON property merchantLocations



3558
3559
3560
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3558

def merchant_locations
  @merchant_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



3564
3565
3566
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3564

def messages
  @messages
end

#notificationsGoogle::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



3572
3573
3574
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3572

def notifications
  @notifications
end

#pass_constraintsGoogle::Apis::WalletobjectsV1::PassConstraints

Container for any constraints that may be placed on passes. Corresponds to the JSON property passConstraints



3577
3578
3579
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3577

def pass_constraints
  @pass_constraints
end

#rotating_barcodeGoogle::Apis::WalletobjectsV1::RotatingBarcode

The rotating barcode settings/details. Corresponds to the JSON property rotatingBarcode



3582
3583
3584
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3582

def rotating_barcode
  @rotating_barcode
end

#save_restrictionsGoogle::Apis::WalletobjectsV1::SaveRestrictions

Defines restrictions on the object that will be verified during save. Note: this is an advanced feature, please contact Google for implementation support. Corresponds to the JSON property saveRestrictions



3588
3589
3590
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3588

def save_restrictions
  @save_restrictions
end

#smart_tap_redemption_valueString

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

Returns:

  • (String)


3596
3597
3598
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3596

def smart_tap_redemption_value
  @smart_tap_redemption_value
end

#stateString

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

Returns:

  • (String)


3604
3605
3606
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3604

def state
  @state
end

#subheaderGoogle::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



3610
3611
3612
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3610

def subheader
  @subheader
end

#text_modules_dataArray<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



3617
3618
3619
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3617

def text_modules_data
  @text_modules_data
end

#valid_time_intervalGoogle::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



3624
3625
3626
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3624

def valid_time_interval
  @valid_time_interval
end

#value_added_module_dataArray<Google::Apis::WalletobjectsV1::ValueAddedModuleData>

Optional value added module data. Maximum of fifteen on the object. For a pass only fifteen will be displayed. Corresponds to the JSON property valueAddedModuleData



3630
3631
3632
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3630

def value_added_module_data
  @value_added_module_data
end

#wide_logoGoogle::Apis::WalletobjectsV1::Image

Wrapping type for Google hosted images. Corresponds to the JSON property wideLogo



3635
3636
3637
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3635

def 
  @wide_logo
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3642

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)
  @linked_object_ids = args[:linked_object_ids] if args.key?(:linked_object_ids)
  @links_module_data = args[:links_module_data] if args.key?(:links_module_data)
  @logo = args[:logo] if args.key?(:logo)
  @merchant_locations = args[:merchant_locations] if args.key?(:merchant_locations)
  @messages = args[:messages] if args.key?(:messages)
  @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)
  @save_restrictions = args[:save_restrictions] if args.key?(:save_restrictions)
  @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)
  @value_added_module_data = args[:value_added_module_data] if args.key?(:value_added_module_data)
  @wide_logo = args[:wide_logo] if args.key?(:wide_logo)
end