toJson method
Implementation
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {
'application_id': getApplicationId(),
'pg': pg,
'name': name,
'price': price,
'tax_free': taxFree,
'order_id': orderId,
'use_order_id': useOrderId,
'params': params,
'account_expire_at': accountExpireAt,
'show_agree_window': showAgreeWindow,
'user_token': userToken
};
if(this.methods != null && this.methods!.length > 0) {
if(kIsWeb) result['methods'] = this.methods;
else result['methods'] = methodListString();
} else if(this.method != null && this.method!.length > 0) {
result['method'] = this.method;
}
if(extra != null) {
result['extra'] = extra!.toJson();
}
if(user != null) {
result['user_info'] = user!.toJson();
}
if(items!.length > 0) {
result['items'] = items!.map((e) => e.toJson()).toList();
}
return result;
}