Files
keyboard/keyBoard/Class/Pay/M/KBPayProductModel.h
2025-12-12 14:46:38 +08:00

45 lines
1.3 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// KBPayProductModel.h
// keyBoard
//
// Created to map /products/inApp/list responses to strongly typed objects.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// 内购商品模型
@interface KBPayProductModel : NSObject
/// 主键 id
@property (nonatomic, assign) NSInteger identifier;
/// Apple IAP 商品编号
@property (nonatomic, copy, nullable) NSString *productId;
/// 商品类型(例如 in-app-purchase
@property (nonatomic, copy, nullable) NSString *type;
/// 商品名称(如 100、1000
@property (nonatomic, copy, nullable) NSString *name;
/// 单位(如 金币)
@property (nonatomic, copy, nullable) NSString *unit;
/// 有效期数值(可能为 0
@property (nonatomic, assign) NSInteger durationValue;
/// 有效期单位(如 day/week
@property (nonatomic, copy, nullable) NSString *durationUnit;
/// 有效期天数
@property (nonatomic, assign) NSInteger durationDays;
/// 价格
@property (nonatomic, assign) double price;
/// 货币符号
@property (nonatomic, copy, nullable) NSString *currency;
/// 文案描述
@property (nonatomic, copy, nullable) NSString *productDescription;
/// 展示金币(自动拼接单位)
- (NSString *)coinsDisplayText;
/// 展示价格,保留两位小数
- (NSString *)priceDisplayText;
@end
NS_ASSUME_NONNULL_END