IAPProductInfo.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // IAPProductInfo.h
  3. // bulldog_sdk
  4. //
  5. // Created by zhuge on 2024/3/14.
  6. //
  7. #ifndef IAPProductInfo_h
  8. #define IAPProductInfo_h
  9. #include <string>
  10. namespace iap {
  11. class IAPProductInfo {
  12. public:
  13. IAPProductInfo(const std::string& productId, const std::string& name, const std::string& desc, const std::string& displayPrice );
  14. IAPProductInfo(const std::string& jsonString);
  15. ~IAPProductInfo();
  16. public:
  17. // getter & setter
  18. std::string getProductId() const { return _productId; }
  19. std::string getName() const { return _name; }
  20. std::string getDesc() const { return _desc; }
  21. std::string getDisplayPrice() const { return _displayPrice; }
  22. private:
  23. // 唯一标识后,在GooglePlay和AppStore后台创建时,手动填入
  24. std::string _productId;
  25. // 显示名字
  26. std::string _name;
  27. // 详细信息
  28. std::string _desc;
  29. // 显示价格,按本地格式化的价格显示
  30. std::string _displayPrice;
  31. };
  32. } // end of iap
  33. #endif /* IAPProductInfo_h */