CreateWalletObjectsRequest.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
Sets the Gift Card wallet object to be created.
Sets the Loyalty wallet object to be created.
Sets the Offer wallet object to be created.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eCreateWalletObjectsRequest.Builder\u003c/code\u003e facilitates the creation of \u003ccode\u003eCreateWalletObjectsRequest\u003c/code\u003e instances for saving objects to Google Pay.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to specify the object type (gift card, loyalty, or offer) and the desired creation mode (save prompt or immediate save).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild()\u003c/code\u003e method finalizes the request creation process.\u003c/p\u003e\n"],["\u003cp\u003eWhile \u003ccode\u003eREQUEST_IMMEDIATE_SAVE\u003c/code\u003e can be specified, the system might still use \u003ccode\u003eSHOW_SAVE_PROMPT\u003c/code\u003e based on factors like multiple Google accounts.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should use \u003ccode\u003eREQUEST_IMMEDIATE_SAVE\u003c/code\u003e only when the user explicitly intends to save, such as clicking a "Save to Google Pay" button.\u003c/p\u003e\n"]]],[],null,["# CreateWalletObjectsRequest.Builder\n\npublic final class **CreateWalletObjectsRequest.Builder** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nBuilder to create a [CreateWalletObjectsRequest](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest). \n\n### Public Method Summary\n\n|---------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CreateWalletObjectsRequest](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest) | [build](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder#build())() Returns the [CreateWalletObjectsRequest](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest) created using the data passed to the Builder. |\n| [CreateWalletObjectsRequest.Builder](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder) | [setCreateMode](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder#setCreateMode(int))(int createMode) Sets the creation mode to use. |\n| [CreateWalletObjectsRequest.Builder](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder) | [setGiftCardWalletObject](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder#setGiftCardWalletObject(com.google.android.gms.wallet.GiftCardWalletObject))([GiftCardWalletObject](/android/reference/com/google/android/gms/wallet/GiftCardWalletObject) giftCardWalletObject) Sets the Gift Card wallet object to be created. |\n| [CreateWalletObjectsRequest.Builder](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder) | [setLoyaltyWalletObject](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder#setLoyaltyWalletObject(com.google.android.gms.wallet.LoyaltyWalletObject))([LoyaltyWalletObject](/android/reference/com/google/android/gms/wallet/LoyaltyWalletObject) loyaltyWalletObject) Sets the Loyalty wallet object to be created. |\n| [CreateWalletObjectsRequest.Builder](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder) | [setOfferWalletObject](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder#setOfferWalletObject(com.google.android.gms.wallet.OfferWalletObject))([OfferWalletObject](/android/reference/com/google/android/gms/wallet/OfferWalletObject) offerWalletObject) Sets the Offer wallet object to be created. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public [CreateWalletObjectsRequest](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest)\n**build** ()\n\nReturns the [CreateWalletObjectsRequest](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest)\ncreated using the data passed to the Builder. \n\n#### public [CreateWalletObjectsRequest.Builder](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder)\n**setCreateMode** (int createMode)\n\nSets the creation mode to use. If the value is [CreateWalletObjectsRequest.SHOW_SAVE_PROMPT](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest#SHOW_SAVE_PROMPT), a save prompt dialog appears,\nwith a save button that the user must click before the save occurs. If the value is\n[CreateWalletObjectsRequest.REQUEST_IMMEDIATE_SAVE](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest#REQUEST_IMMEDIATE_SAVE), the save happens\nimmediately, followed by a confirmation dialog to show the save is successful. Note the\ncalling application must only use [CreateWalletObjectsRequest.REQUEST_IMMEDIATE_SAVE](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest#REQUEST_IMMEDIATE_SAVE) if the user shows they\nintend to save the Wallet Object to Google Pay, such as by clicking a button in the\ncalling application with the label \"Save to Google Pay\". Sometimes the implementation\nwill still use [CreateWalletObjectsRequest.SHOW_SAVE_PROMPT](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest#SHOW_SAVE_PROMPT) mode, even when the Caller\nspecifies [CreateWalletObjectsRequest.REQUEST_IMMEDIATE_SAVE](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest#REQUEST_IMMEDIATE_SAVE). For example, if multiple\nGoogle accounts exist on the device, the implementation may still show the save prompt\ndialog in order to allow the user to select which account to save to. \n\n#### public [CreateWalletObjectsRequest.Builder](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder)\n**setGiftCardWalletObject** ([GiftCardWalletObject](/android/reference/com/google/android/gms/wallet/GiftCardWalletObject) giftCardWalletObject)\n\nSets the Gift Card wallet object to be created. \n\n#### public [CreateWalletObjectsRequest.Builder](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder)\n**setLoyaltyWalletObject** ([LoyaltyWalletObject](/android/reference/com/google/android/gms/wallet/LoyaltyWalletObject) loyaltyWalletObject)\n\nSets the Loyalty wallet object to be created. \n\n#### public [CreateWalletObjectsRequest.Builder](/android/reference/com/google/android/gms/wallet/CreateWalletObjectsRequest.Builder)\n**setOfferWalletObject** ([OfferWalletObject](/android/reference/com/google/android/gms/wallet/OfferWalletObject) offerWalletObject)\n\nSets the Offer wallet object to be created."]]