Class: Google::Apis::WalletobjectsV1::GiftCardClass
- Inherits:
-
Object
- Object
- Google::Apis::WalletobjectsV1::GiftCardClass
- 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
-
#allow_barcode_redemption ⇒ Boolean
(also: #allow_barcode_redemption?)
Determines whether the merchant supports gift card redemption using barcode.
-
#allow_multiple_users_per_object ⇒ Boolean
(also: #allow_multiple_users_per_object?)
Deprecated.
-
#app_link_data ⇒ Google::Apis::WalletobjectsV1::AppLinkData
Optional app or website link that will be displayed as a button on the front of the pass.
-
#callback_options ⇒ Google::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.
-
#card_number_label ⇒ String
The label to display for the card number, such as "Card Number".
-
#class_template_info ⇒ Google::Apis::WalletobjectsV1::ClassTemplateInfo
Template information about how the class should be displayed.
-
#country_code ⇒ String
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.
-
#enable_smart_tap ⇒ Boolean
(also: #enable_smart_tap?)
Identifies whether this class supports Smart Tap.
-
#event_number_label ⇒ String
The label to display for event number, such as "Target Event #".
-
#hero_image ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images.
-
#hex_background_color ⇒ String
The background color for the card.
-
#homepage_uri ⇒ Google::Apis::WalletobjectsV1::Uri
The URI of your application's home page.
-
#id ⇒ String
Required.
-
#image_modules_data ⇒ Array<Google::Apis::WalletobjectsV1::ImageModuleData>
Image module data.
-
#info_module_data ⇒ Google::Apis::WalletobjectsV1::InfoModuleData
Deprecated.
-
#issuer_name ⇒ String
Required.
-
#kind ⇒ String
Identifies what kind of resource this is.
-
#links_module_data ⇒ Google::Apis::WalletobjectsV1::LinksModuleData
Links module data.
-
#localized_card_number_label ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the card_number_label.
-
#localized_event_number_label ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the event_number_label.
-
#localized_issuer_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the issuer_name.
-
#localized_merchant_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the merchant_name.
-
#localized_pin_label ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the pin_label.
-
#locations ⇒ Array<Google::Apis::WalletobjectsV1::LatLongPoint>
Note: This field is currently not supported to trigger geo notifications.
-
#merchant_name ⇒ String
Merchant name, such as "Adam's Apparel".
-
#messages ⇒ Array<Google::Apis::WalletobjectsV1::Message>
An array of messages displayed in the app.
-
#multiple_devices_and_holders_allowed_status ⇒ String
Identifies whether multiple users and devices will save the same object referencing this class.
-
#pin_label ⇒ String
The label to display for the PIN, such as "4-digit PIN".
-
#program_logo ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images.
-
#redemption_issuers ⇒ Array<Fixnum>
Identifies which redemption issuers can redeem the pass over Smart Tap.
-
#review ⇒ Google::Apis::WalletobjectsV1::Review
The review comments set by the platform when a class is marked
approved
orrejected
. -
#review_status ⇒ String
Required.
-
#security_animation ⇒ Google::Apis::WalletobjectsV1::SecurityAnimation
Optional information about the security animation.
-
#text_modules_data ⇒ Array<Google::Apis::WalletobjectsV1::TextModuleData>
Text module data.
-
#version ⇒ Fixnum
Deprecated Corresponds to the JSON property
version
. -
#view_unlock_requirement ⇒ String
View Unlock Requirement options for the gift card.
-
#wide_program_logo ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images.
-
#word_mark ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GiftCardClass
constructor
A new instance of GiftCardClass.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GiftCardClass
Returns a new instance of GiftCardClass.
3799 3800 3801 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3799 def initialize(**args) update!(**args) end |
Instance Attribute Details
#allow_barcode_redemption ⇒ Boolean 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
3563 3564 3565 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3563 def @allow_barcode_redemption end |
#allow_multiple_users_per_object ⇒ Boolean Also known as: allow_multiple_users_per_object?
Deprecated. Use multipleDevicesAndHoldersAllowedStatus
instead.
Corresponds to the JSON property allowMultipleUsersPerObject
3569 3570 3571 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3569 def allow_multiple_users_per_object @allow_multiple_users_per_object end |
#app_link_data ⇒ Google::Apis::WalletobjectsV1::AppLinkData
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
3577 3578 3579 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3577 def app_link_data @app_link_data end |
#callback_options ⇒ Google::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
3584 3585 3586 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3584 def @callback_options end |
#card_number_label ⇒ String
The label to display for the card number, such as "Card Number".
Corresponds to the JSON property cardNumberLabel
3589 3590 3591 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3589 def card_number_label @card_number_label end |
#class_template_info ⇒ Google::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
3595 3596 3597 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3595 def class_template_info @class_template_info end |
#country_code ⇒ String
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
3602 3603 3604 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3602 def country_code @country_code end |
#enable_smart_tap ⇒ Boolean 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
3609 3610 3611 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3609 def enable_smart_tap @enable_smart_tap end |
#event_number_label ⇒ String
The label to display for event number, such as "Target Event #".
Corresponds to the JSON property eventNumberLabel
3615 3616 3617 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3615 def event_number_label @event_number_label end |
#hero_image ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images. Next ID: 7
Corresponds to the JSON property heroImage
3620 3621 3622 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3620 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. 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
3629 3630 3631 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3629 def hex_background_color @hex_background_color end |
#homepage_uri ⇒ Google::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
3637 3638 3639 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3637 def homepage_uri @homepage_uri end |
#id ⇒ String
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
3646 3647 3648 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3646 def id @id end |
#image_modules_data ⇒ Array<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
3652 3653 3654 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3652 def image_modules_data @image_modules_data end |
#info_module_data ⇒ Google::Apis::WalletobjectsV1::InfoModuleData
Deprecated. Use textModulesData instead.
Corresponds to the JSON property infoModuleData
3657 3658 3659 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3657 def info_module_data @info_module_data end |
#issuer_name ⇒ String
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
3663 3664 3665 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3663 def issuer_name @issuer_name end |
#kind ⇒ String
Identifies what kind of resource this is. Value: the fixed string "
walletobjects#giftCardClass"
.
Corresponds to the JSON property kind
3669 3670 3671 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3669 def kind @kind end |
#links_module_data ⇒ Google::Apis::WalletobjectsV1::LinksModuleData
Links module data. If links module data is also defined on the object, both
will be displayed.
Corresponds to the JSON property linksModuleData
3675 3676 3677 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3675 def links_module_data @links_module_data end |
#localized_card_number_label ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the card_number_label.
Corresponds to the JSON property localizedCardNumberLabel
3680 3681 3682 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3680 def localized_card_number_label @localized_card_number_label end |
#localized_event_number_label ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the event_number_label.
Corresponds to the JSON property localizedEventNumberLabel
3685 3686 3687 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3685 def localized_event_number_label @localized_event_number_label end |
#localized_issuer_name ⇒ Google::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
3691 3692 3693 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3691 def localized_issuer_name @localized_issuer_name end |
#localized_merchant_name ⇒ Google::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
3698 3699 3700 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3698 def localized_merchant_name @localized_merchant_name end |
#localized_pin_label ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the pin_label.
Corresponds to the JSON property localizedPinLabel
3703 3704 3705 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3703 def localized_pin_label @localized_pin_label end |
#locations ⇒ Array<Google::Apis::WalletobjectsV1::LatLongPoint>
Note: This field is currently not supported to trigger geo notifications.
Corresponds to the JSON property locations
3708 3709 3710 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3708 def locations @locations end |
#merchant_name ⇒ String
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
3714 3715 3716 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3714 def merchant_name @merchant_name end |
#messages ⇒ Array<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
3720 3721 3722 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3720 def @messages end |
#multiple_devices_and_holders_allowed_status ⇒ String
Identifies whether multiple users and devices will save the same object
referencing this class.
Corresponds to the JSON property multipleDevicesAndHoldersAllowedStatus
3726 3727 3728 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3726 def multiple_devices_and_holders_allowed_status @multiple_devices_and_holders_allowed_status end |
#pin_label ⇒ String
The label to display for the PIN, such as "4-digit PIN".
Corresponds to the JSON property pinLabel
3731 3732 3733 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3731 def pin_label @pin_label end |
#program_logo ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images. Next ID: 7
Corresponds to the JSON property programLogo
3736 3737 3738 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3736 def program_logo @program_logo end |
#redemption_issuers ⇒ Array<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
3745 3746 3747 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3745 def redemption_issuers @redemption_issuers end |
#review ⇒ Google::Apis::WalletobjectsV1::Review
The review comments set by the platform when a class is marked approved
or
rejected
.
Corresponds to the JSON property review
3751 3752 3753 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3751 def review @review end |
#review_status ⇒ String
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
3764 3765 3766 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3764 def review_status @review_status end |
#security_animation ⇒ Google::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
3770 3771 3772 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3770 def security_animation @security_animation end |
#text_modules_data ⇒ Array<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
3777 3778 3779 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3777 def text_modules_data @text_modules_data end |
#version ⇒ Fixnum
Deprecated
Corresponds to the JSON property version
3782 3783 3784 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3782 def version @version end |
#view_unlock_requirement ⇒ String
View Unlock Requirement options for the gift card.
Corresponds to the JSON property viewUnlockRequirement
3787 3788 3789 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3787 def view_unlock_requirement @view_unlock_requirement end |
#wide_program_logo ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images. Next ID: 7
Corresponds to the JSON property wideProgramLogo
3792 3793 3794 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3792 def wide_program_logo @wide_program_logo end |
#word_mark ⇒ Google::Apis::WalletobjectsV1::Image
Wrapping type for Google hosted images. Next ID: 7
Corresponds to the JSON property wordMark
3797 3798 3799 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3797 def word_mark @word_mark end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 3804 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_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) @pin_label = args[:pin_label] if args.key?(:pin_label) @program_logo = 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) @version = args[:version] if args.key?(:version) @view_unlock_requirement = args[:view_unlock_requirement] if args.key?(:view_unlock_requirement) @wide_program_logo = args[:wide_program_logo] if args.key?(:wide_program_logo) @word_mark = args[:word_mark] if args.key?(:word_mark) end |