Class: Google::Apis::WalletobjectsV1::LoyaltyClass

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

Returns a new instance of LoyaltyClass.



4778
4779
4780
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4778

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

Instance Attribute Details

#account_id_labelString

The account ID label, such as "Member ID." Recommended maximum length is 15 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property accountIdLabel

Returns:

  • (String)


4511
4512
4513
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4511

def 
  @account_id_label
end

#account_name_labelString

The account name label, such as "Member Name." Recommended maximum length is 15 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property accountNameLabel

Returns:

  • (String)


4517
4518
4519
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4517

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


4522
4523
4524
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4522

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



4530
4531
4532
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4530

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



4536
4537
4538
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4536

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)


4543
4544
4545
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4543

def country_code
  @country_code
end

#discoverable_programGoogle::Apis::WalletobjectsV1::DiscoverableProgram

Information about how a class may be discovered and instantiated from within the Android Pay app. This is done by searching for a loyalty or gift card program and scanning or manually entering. Corresponds to the JSON property discoverableProgram



4550
4551
4552
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4550

def discoverable_program
  @discoverable_program
end

#enable_smart_tapBoolean Also known as: enable_smart_tap?

Identifies whether this class supports Smart Tap. The redemptionIssuers and one of object level smartTapRedemptionLevel, barcode.value, oraccountId fields must also be set up correctly in order for a pass to support Smart Tap. Corresponds to the JSON propertyenableSmartTap`

Returns:

  • (Boolean)


4557
4558
4559
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4557

def enable_smart_tap
  @enable_smart_tap
end

#hero_imageGoogle::Apis::WalletobjectsV1::Image

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



4563
4564
4565
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4563

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)


4572
4573
4574
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4572

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



4580
4581
4582
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4580

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)


4589
4590
4591
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4589

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



4595
4596
4597
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4595

def image_modules_data
  @image_modules_data
end

#info_module_dataGoogle::Apis::WalletobjectsV1::InfoModuleData

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



4600
4601
4602
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4600

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)


4606
4607
4608
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4606

def issuer_name
  @issuer_name
end

#kindString

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

Returns:

  • (String)


4612
4613
4614
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4612

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



4618
4619
4620
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4618

def links_module_data
  @links_module_data
end

#localized_account_id_labelGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the account_id_label. Recommended maximum length is 15 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property localizedAccountIdLabel



4624
4625
4626
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4624

def 
  @localized_account_id_label
end

#localized_account_name_labelGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the account_name_label. Recommended maximum length is 15 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property localizedAccountNameLabel



4630
4631
4632
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4630

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



4636
4637
4638
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4636

def localized_issuer_name
  @localized_issuer_name
end

#localized_program_nameGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the program_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 localizedProgramName



4642
4643
4644
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4642

def localized_program_name
  @localized_program_name
end

#localized_rewards_tierGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the rewards_tier. Recommended maximum length is 7 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property localizedRewardsTier



4648
4649
4650
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4648

def localized_rewards_tier
  @localized_rewards_tier
end

#localized_rewards_tier_labelGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the rewards_tier_label. Recommended maximum length is 9 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property localizedRewardsTierLabel



4654
4655
4656
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4654

def localized_rewards_tier_label
  @localized_rewards_tier_label
end

#localized_secondary_rewards_tierGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the secondary_rewards_tier. Corresponds to the JSON property localizedSecondaryRewardsTier



4659
4660
4661
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4659

def localized_secondary_rewards_tier
  @localized_secondary_rewards_tier
end

#localized_secondary_rewards_tier_labelGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the secondary_rewards_tier_label. Corresponds to the JSON property localizedSecondaryRewardsTierLabel



4664
4665
4666
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4664

def localized_secondary_rewards_tier_label
  @localized_secondary_rewards_tier_label
end

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

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



4669
4670
4671
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4669

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



4675
4676
4677
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4675

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)


4681
4682
4683
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4681

def multiple_devices_and_holders_allowed_status
  @multiple_devices_and_holders_allowed_status
end

#program_logoGoogle::Apis::WalletobjectsV1::Image

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



4686
4687
4688
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4686

def 
  @program_logo
end

#program_nameString

Required. The program 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 programName

Returns:

  • (String)


4693
4694
4695
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4693

def program_name
  @program_name
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 one of object level smartTapRedemptionValue, barcode.value, oraccountIdfields must also be set up correctly in order for a pass to support Smart Tap. Corresponds to the JSON propertyredemptionIssuers`

Returns:

  • (Array<Fixnum>)


4702
4703
4704
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4702

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



4708
4709
4710
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4708

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)


4721
4722
4723
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4721

def review_status
  @review_status
end

#rewards_tierString

The rewards tier, such as "Gold" or "Platinum." Recommended maximum length is 7 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property rewardsTier

Returns:

  • (String)


4727
4728
4729
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4727

def rewards_tier
  @rewards_tier
end

#rewards_tier_labelString

The rewards tier label, such as "Rewards Tier." Recommended maximum length is 9 characters to ensure full string is displayed on smaller screens. Corresponds to the JSON property rewardsTierLabel

Returns:

  • (String)


4733
4734
4735
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4733

def rewards_tier_label
  @rewards_tier_label
end

#secondary_rewards_tierString

The secondary rewards tier, such as "Gold" or "Platinum." Corresponds to the JSON property secondaryRewardsTier

Returns:

  • (String)


4738
4739
4740
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4738

def secondary_rewards_tier
  @secondary_rewards_tier
end

#secondary_rewards_tier_labelString

The secondary rewards tier label, such as "Rewards Tier." Corresponds to the JSON property secondaryRewardsTierLabel

Returns:

  • (String)


4743
4744
4745
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4743

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



4749
4750
4751
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4749

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



4756
4757
4758
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4756

def text_modules_data
  @text_modules_data
end

#versionFixnum

Deprecated Corresponds to the JSON property version

Returns:

  • (Fixnum)


4761
4762
4763
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4761

def version
  @version
end

#view_unlock_requirementString

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

Returns:

  • (String)


4766
4767
4768
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4766

def view_unlock_requirement
  @view_unlock_requirement
end

#wide_program_logoGoogle::Apis::WalletobjectsV1::Image

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



4771
4772
4773
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4771

def 
  @wide_program_logo
end

#word_markGoogle::Apis::WalletobjectsV1::Image

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



4776
4777
4778
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4776

def word_mark
  @word_mark
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 4783

def update!(**args)
  @account_id_label = args[:account_id_label] if args.key?(:account_id_label)
  @account_name_label = args[:account_name_label] if args.key?(:account_name_label)
  @allow_multiple_users_per_object = args[:allow_multiple_users_per_object] if args.key?(:allow_multiple_users_per_object)
  @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)
  @discoverable_program = args[:discoverable_program] if args.key?(:discoverable_program)
  @enable_smart_tap = args[:enable_smart_tap] if args.key?(:enable_smart_tap)
  @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_account_id_label = args[:localized_account_id_label] if args.key?(:localized_account_id_label)
  @localized_account_name_label = args[:localized_account_name_label] if args.key?(:localized_account_name_label)
  @localized_issuer_name = args[:localized_issuer_name] if args.key?(:localized_issuer_name)
  @localized_program_name = args[:localized_program_name] if args.key?(:localized_program_name)
  @localized_rewards_tier = args[:localized_rewards_tier] if args.key?(:localized_rewards_tier)
  @localized_rewards_tier_label = args[:localized_rewards_tier_label] if args.key?(:localized_rewards_tier_label)
  @localized_secondary_rewards_tier = args[:localized_secondary_rewards_tier] if args.key?(:localized_secondary_rewards_tier)
  @localized_secondary_rewards_tier_label = args[:localized_secondary_rewards_tier_label] if args.key?(:localized_secondary_rewards_tier_label)
  @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)
  @program_logo = args[:program_logo] if args.key?(:program_logo)
  @program_name = args[:program_name] if args.key?(:program_name)
  @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)
  @rewards_tier = args[:rewards_tier] if args.key?(:rewards_tier)
  @rewards_tier_label = args[:rewards_tier_label] if args.key?(:rewards_tier_label)
  @secondary_rewards_tier = args[:secondary_rewards_tier] if args.key?(:secondary_rewards_tier)
  @secondary_rewards_tier_label = args[:secondary_rewards_tier_label] if args.key?(:secondary_rewards_tier_label)
  @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