Stay organized with collections
Save and categorize content based on your preferences.
firebase::gma::AdReward
#include <types.h>
Describes a reward credited to a user for interacting with a RewardedAd.
Summary
Constructors and Destructors
|
AdReward(const std::string & type, int64_t amount)
|
Public functions
|
amount() const
|
int64_t
Returns the reward amount.
|
type() const
|
const std::string &
Returns the type of the reward.
|
Public functions
AdReward
AdReward(
const std::string & type,
int64_t amount
)
amount
int64_t amount() const
Returns the reward amount.
type
const std::string & type() const
Returns the type of the reward.
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 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003efirebase::gma::AdReward\u003c/code\u003e describes a reward given to a user for interacting with a RewardedAd.\u003c/p\u003e\n"],["\u003cp\u003eIt includes the reward amount (accessed via \u003ccode\u003eamount()\u003c/code\u003e) and the reward type (accessed via \u003ccode\u003etype()\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can create an \u003ccode\u003eAdReward\u003c/code\u003e instance by providing the reward type and amount.\u003c/p\u003e\n"]]],["The `AdReward` class describes a user's reward for interacting with a `RewardedAd`. Key actions include constructing an `AdReward` with a reward type (string) and amount (integer). The class provides two public functions: `amount()`, which returns the reward's numerical amount, and `type()`, which returns the string describing the reward type. These functions allow access to the details of a given user reward.\n"],null,["# firebase::gma::AdReward Class Reference\n\nfirebase::gma::AdReward\n=======================\n\n\n`#include \u003ctypes.h\u003e`\n\nDescribes a reward credited to a user for interacting with a [RewardedAd](/admob/cpp/reference/class/firebase/gma/rewarded-ad#classfirebase_1_1gma_1_1_rewarded_ad).\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [AdReward](#classfirebase_1_1gma_1_1_ad_reward_1afe5565b61d17a486b251261e637ec21a)`(const std::string & type, int64_t amount)` Creates an [AdReward](/admob/cpp/reference/class/firebase/gma/ad-reward#classfirebase_1_1gma_1_1_ad_reward). ||\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------|-------------------------------------------------------|\n| [amount](#classfirebase_1_1gma_1_1_ad_reward_1a290d225da091febe0db09891742934f6)`() const ` | `int64_t` Returns the reward amount. |\n| [type](#classfirebase_1_1gma_1_1_ad_reward_1a91aa15427aa9328ae143dee05abab793)`() const ` | `const std::string &` Returns the type of the reward. |\n\nPublic functions\n----------------\n\n### AdReward\n\n```c++\n AdReward(\n const std::string & type,\n int64_t amount\n)\n``` \nCreates an [AdReward](/admob/cpp/reference/class/firebase/gma/ad-reward#classfirebase_1_1gma_1_1_ad_reward). \n\n### amount\n\n```c++\nint64_t amount() const \n``` \nReturns the reward amount. \n\n### type\n\n```c++\nconst std::string & type() const \n``` \nReturns the type of the reward."]]