Class: Google::Apis::WalletobjectsV1::GiftCardClass

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) ⇒ GiftCardClass

Returns a new instance of GiftCardClass.



3977
3978
3979
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3977

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

Instance Attribute Details

#allow_barcode_redemptionBoolean Also known as: allow_barcode_redemption?

Determines whether the merchant supports gift card redemption using barcode. If true, app displays a barcode for the gift card on the Gift card details screen. If false, a barcode is not displayed. Corresponds to the JSON property allowBarcodeRedemption

Returns:

  • (Boolean)


3717
3718
3719
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3717

def allow_barcode_redemption
  @allow_barcode_redemption
end

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


3723
3724
3725
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3723

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



3731
3732
3733
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3731

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



3738
3739
3740
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3738

def callback_options
  @callback_options
end

#card_number_labelString

The label to display for the card number, such as "Card Number". Corresponds to the JSON property cardNumberLabel

Returns:

  • (String)


3743
3744
3745
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3743

def card_number_label
  @card_number_label
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



3749
3750
3751
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3749

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)


3756
3757
3758
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3756

def country_code
  @country_code
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)


3763
3764
3765
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3763

def enable_smart_tap
  @enable_smart_tap
end

#event_number_labelString

The label to display for event number, such as "Target Event #". Corresponds to the JSON property eventNumberLabel

Returns:

  • (String)


3769
3770
3771
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3769

def event_number_label
  @event_number_label
end

#hero_imageGoogle::Apis::WalletobjectsV1::Image

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



3774
3775
3776
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3774

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)


3783
3784
3785
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3783

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



3791
3792
3793
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3791

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)


3800
3801
3802
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3800

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



3806
3807
3808
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3806

def image_modules_data
  @image_modules_data
end

#info_module_dataGoogle::Apis::WalletobjectsV1::InfoModuleData

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



3811
3812
3813
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3811

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)


3817
3818
3819
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3817

def issuer_name
  @issuer_name
end

#kindString

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

Returns:

  • (String)


3823
3824
3825
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3823

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



3829
3830
3831
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3829

def links_module_data
  @links_module_data
end

#localized_card_number_labelGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the card_number_label. Corresponds to the JSON property localizedCardNumberLabel



3834
3835
3836
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3834

def localized_card_number_label
  @localized_card_number_label
end

#localized_event_number_labelGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the event_number_label. Corresponds to the JSON property localizedEventNumberLabel



3839
3840
3841
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3839

def localized_event_number_label
  @localized_event_number_label
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



3845
3846
3847
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3845

def localized_issuer_name
  @localized_issuer_name
end

#localized_merchant_nameGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the merchant_name. The app may display an ellipsis after the first 20 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property localizedMerchantName



3852
3853
3854
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3852

def localized_merchant_name
  @localized_merchant_name
end

#localized_pin_labelGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the pin_label. Corresponds to the JSON property localizedPinLabel



3857
3858
3859
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3857

def localized_pin_label
  @localized_pin_label
end

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

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



3862
3863
3864
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3862

def locations
  @locations
end

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

Merchant locations. There is a maximum of ten on the class. 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



3870
3871
3872
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3870

def merchant_locations
  @merchant_locations
end

#merchant_nameString

Merchant name, such as "Adam's Apparel". The app may display an ellipsis after the first 20 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property merchantName

Returns:

  • (String)


3876
3877
3878
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3876

def merchant_name
  @merchant_name
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



3882
3883
3884
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3882

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)


3888
3889
3890
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3888

def multiple_devices_and_holders_allowed_status
  @multiple_devices_and_holders_allowed_status
end

#notify_preferenceString

Whether or not field updates to this class should trigger notifications. When set to NOTIFY, we will attempt to trigger a field update notification to users. These notifications will only be sent to users if the field is part of an allowlist. If not specified, no notification will be triggered. This setting is ephemeral and needs to be set with each PATCH or UPDATE request, otherwise a notification will not be triggered. Corresponds to the JSON property notifyPreference

Returns:

  • (String)


3898
3899
3900
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3898

def notify_preference
  @notify_preference
end

#pin_labelString

The label to display for the PIN, such as "4-digit PIN". Corresponds to the JSON property pinLabel

Returns:

  • (String)


3903
3904
3905
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3903

def pin_label
  @pin_label
end

#program_logoGoogle::Apis::WalletobjectsV1::Image

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



3908
3909
3910
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3908

def 
  
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>)


3917
3918
3919
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3917

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



3923
3924
3925
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3923

def review
  @review
end

#review_statusString

Required. 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)


3936
3937
3938
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3936

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



3942
3943
3944
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3942

def security_animation
  @security_animation
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



3949
3950
3951
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3949

def text_modules_data
  @text_modules_data
end

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

Optional value added module data. Maximum of ten on the class. For a pass only ten will be displayed, prioritizing those from the object. Corresponds to the JSON property valueAddedModuleData



3955
3956
3957
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3955

def value_added_module_data
  @value_added_module_data
end

#versionFixnum

Deprecated Corresponds to the JSON property version

Returns:

  • (Fixnum)


3960
3961
3962
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3960

def version
  @version
end

#view_unlock_requirementString

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

Returns:

  • (String)


3965
3966
3967
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3965

def view_unlock_requirement
  @view_unlock_requirement
end

#wide_program_logoGoogle::Apis::WalletobjectsV1::Image

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



3970
3971
3972
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3970

def 
  
end

#word_markGoogle::Apis::WalletobjectsV1::Image

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



3975
3976
3977
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3975

def word_mark
  @word_mark
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3982

def update!(**args)
  @allow_barcode_redemption = args[:allow_barcode_redemption] if args.key?(:allow_barcode_redemption)
  @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)
  @card_number_label = args[:card_number_label] if args.key?(:card_number_label)
  @class_template_info = args[:class_template_info] if args.key?(:class_template_info)
  @country_code = args[:country_code] if args.key?(:country_code)
  @enable_smart_tap = args[:enable_smart_tap] if args.key?(:enable_smart_tap)
  @event_number_label = args[:event_number_label] if args.key?(:event_number_label)
  @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_card_number_label = args[:localized_card_number_label] if args.key?(:localized_card_number_label)
  @localized_event_number_label = args[:localized_event_number_label] if args.key?(:localized_event_number_label)
  @localized_issuer_name = args[:localized_issuer_name] if args.key?(:localized_issuer_name)
  @localized_merchant_name = args[:localized_merchant_name] if args.key?(:localized_merchant_name)
  @localized_pin_label = args[:localized_pin_label] if args.key?(:localized_pin_label)
  @locations = args[:locations] if args.key?(:locations)
  @merchant_locations = args[:merchant_locations] if args.key?(:merchant_locations)
  @merchant_name = args[:merchant_name] if args.key?(:merchant_name)
  @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)
  @notify_preference = args[:notify_preference] if args.key?(:notify_preference)
  @pin_label = args[:pin_label] if args.key?(:pin_label)
   = args[:program_logo] if args.key?(:program_logo)
  @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)
  @text_modules_data = args[:text_modules_data] if args.key?(:text_modules_data)
  @value_added_module_data = args[:value_added_module_data] if args.key?(:value_added_module_data)
  @version = args[:version] if args.key?(:version)
  @view_unlock_requirement = args[:view_unlock_requirement] if args.key?(:view_unlock_requirement)
   = args[:wide_program_logo] if args.key?(:wide_program_logo)
  @word_mark = args[:word_mark] if args.key?(:word_mark)
end