407 lines
12 KiB
Dart
407 lines
12 KiB
Dart
class ProfileModel {
|
|
String? status;
|
|
int? statusCode;
|
|
String? message;
|
|
Data? data;
|
|
|
|
ProfileModel({this.status, this.statusCode, this.message, this.data});
|
|
|
|
ProfileModel.fromJson(Map<String, dynamic> json) {
|
|
status = json['status'];
|
|
statusCode = json['status_code'];
|
|
message = json['message'];
|
|
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['status'] = this.status;
|
|
data['status_code'] = this.statusCode;
|
|
data['message'] = this.message;
|
|
if (this.data != null) {
|
|
data['data'] = this.data!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Data {
|
|
int? id;
|
|
int? principalTypeXid;
|
|
int? principalSourceXid;
|
|
String? userName;
|
|
String? gender;
|
|
String? dateOfBirth;
|
|
String? phoneNumber;
|
|
String? otherPhoneNumber;
|
|
String? emailAddress;
|
|
String? addressLine1;
|
|
String? addressLine2;
|
|
String? city;
|
|
String? postCode;
|
|
String? profilePhoto;
|
|
String? referralCode;
|
|
String? description;
|
|
int? whatsappUpdate;
|
|
int? profileUpdated;
|
|
int? riskProfileUpdated;
|
|
int? kycUpdated;
|
|
int? securedAccess;
|
|
String? playerId;
|
|
int? notificationAlert;
|
|
String? isActive;
|
|
bool? isSubscriptionTaken;
|
|
bool? isSubscriptionCancelled;
|
|
SubscriptionData? subscriptionData;
|
|
int? alertWhatsAppNotification;
|
|
int? alertInAppNotification;
|
|
int? alertPushAppNotification;
|
|
int? alertSmsAppNotification;
|
|
|
|
Data(
|
|
{this.id,
|
|
this.principalTypeXid,
|
|
this.principalSourceXid,
|
|
this.userName,
|
|
this.gender,
|
|
this.dateOfBirth,
|
|
this.phoneNumber,
|
|
this.otherPhoneNumber,
|
|
this.emailAddress,
|
|
this.addressLine1,
|
|
this.addressLine2,
|
|
this.city,
|
|
this.postCode,
|
|
this.profilePhoto,
|
|
this.referralCode,
|
|
this.description,
|
|
this.whatsappUpdate,
|
|
this.profileUpdated,
|
|
this.riskProfileUpdated,
|
|
this.kycUpdated,
|
|
this.securedAccess,
|
|
this.playerId,
|
|
this.notificationAlert,
|
|
this.isActive,
|
|
this.isSubscriptionTaken,
|
|
this.isSubscriptionCancelled,
|
|
this.subscriptionData,
|
|
this.alertWhatsAppNotification,
|
|
this.alertInAppNotification,
|
|
this.alertPushAppNotification,
|
|
this.alertSmsAppNotification});
|
|
|
|
Data.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
principalTypeXid = json['principal_type_xid'];
|
|
principalSourceXid = json['principal_source_xid'];
|
|
userName = json['user_name'];
|
|
gender = json['gender'];
|
|
dateOfBirth = json['date_of_birth'];
|
|
phoneNumber = json['phone_number'];
|
|
otherPhoneNumber = json['other_phone_number'];
|
|
emailAddress = json['email_address'];
|
|
addressLine1 = json['address_line1'];
|
|
addressLine2 = json['address_line2'];
|
|
city = json['city'];
|
|
postCode = json['post_code'];
|
|
profilePhoto = json['profile_photo'];
|
|
referralCode = json['referral_code'];
|
|
description = json['description'];
|
|
whatsappUpdate = json['whatsapp_update'];
|
|
profileUpdated = json['profile_updated'];
|
|
riskProfileUpdated = json['risk_profile_updated'];
|
|
kycUpdated = json['kyc_updated'];
|
|
securedAccess = json['secured_access'];
|
|
playerId = json['player_id'];
|
|
notificationAlert = json['notification_alert'];
|
|
isActive = json['is_active'];
|
|
isSubscriptionTaken = json['is_subscription_taken'];
|
|
isSubscriptionCancelled = json['is_subscription_cancelled'];
|
|
subscriptionData = json['subscription_data'] != null
|
|
? new SubscriptionData.fromJson(json['subscription_data'])
|
|
: null;
|
|
alertWhatsAppNotification = json['alert_whats_app_notification'];
|
|
alertInAppNotification = json['alert_in_app_notification'];
|
|
alertPushAppNotification = json['alert_push_app_notification'];
|
|
alertSmsAppNotification = json['alert_sms_app_notification'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['principal_type_xid'] = this.principalTypeXid;
|
|
data['principal_source_xid'] = this.principalSourceXid;
|
|
data['user_name'] = this.userName;
|
|
data['gender'] = this.gender;
|
|
data['date_of_birth'] = this.dateOfBirth;
|
|
data['phone_number'] = this.phoneNumber;
|
|
data['other_phone_number'] = this.otherPhoneNumber;
|
|
data['email_address'] = this.emailAddress;
|
|
data['address_line1'] = this.addressLine1;
|
|
data['address_line2'] = this.addressLine2;
|
|
data['city'] = this.city;
|
|
data['post_code'] = this.postCode;
|
|
data['profile_photo'] = this.profilePhoto;
|
|
data['referral_code'] = this.referralCode;
|
|
data['description'] = this.description;
|
|
data['whatsapp_update'] = this.whatsappUpdate;
|
|
data['profile_updated'] = this.profileUpdated;
|
|
data['risk_profile_updated'] = this.riskProfileUpdated;
|
|
data['kyc_updated'] = this.kycUpdated;
|
|
data['secured_access'] = this.securedAccess;
|
|
data['player_id'] = this.playerId;
|
|
data['notification_alert'] = this.notificationAlert;
|
|
data['is_active'] = this.isActive;
|
|
data['is_subscription_taken'] = this.isSubscriptionTaken;
|
|
data['is_subscription_cancelled'] = this.isSubscriptionCancelled;
|
|
if (this.subscriptionData != null) {
|
|
data['subscription_data'] = this.subscriptionData!.toJson();
|
|
}
|
|
data['alert_whats_app_notification'] = this.alertWhatsAppNotification;
|
|
data['alert_in_app_notification'] = this.alertInAppNotification;
|
|
data['alert_push_app_notification'] = this.alertPushAppNotification;
|
|
data['alert_sms_app_notification'] = this.alertSmsAppNotification;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class SubscriptionData {
|
|
int? id;
|
|
int? iamPrincipalXid;
|
|
int? manageProductXid;
|
|
String? razorpayPlanId;
|
|
String? subscriptionId;
|
|
String? razorpayCustomerId;
|
|
String? status;
|
|
String? paymentMethod;
|
|
int? quantity;
|
|
String? chargeAt;
|
|
String? startAt;
|
|
String? endAt;
|
|
String? totalCount;
|
|
int? isCancelledSubscription;
|
|
String? cancelledAt;
|
|
String? expireBy;
|
|
String? shortUrl;
|
|
String? hasScheduledChanges;
|
|
int? isActive;
|
|
String? createdBy;
|
|
String? modifiedBy;
|
|
String? deletedAt;
|
|
String? createdAt;
|
|
String? updatedAt;
|
|
String? amount;
|
|
ProductData? productData;
|
|
|
|
SubscriptionData(
|
|
{this.id,
|
|
this.iamPrincipalXid,
|
|
this.manageProductXid,
|
|
this.razorpayPlanId,
|
|
this.subscriptionId,
|
|
this.razorpayCustomerId,
|
|
this.status,
|
|
this.paymentMethod,
|
|
this.quantity,
|
|
this.chargeAt,
|
|
this.startAt,
|
|
this.endAt,
|
|
this.totalCount,
|
|
this.isCancelledSubscription,
|
|
this.cancelledAt,
|
|
this.expireBy,
|
|
this.shortUrl,
|
|
this.hasScheduledChanges,
|
|
this.isActive,
|
|
this.createdBy,
|
|
this.modifiedBy,
|
|
this.deletedAt,
|
|
this.createdAt,
|
|
this.updatedAt,
|
|
this.amount,
|
|
this.productData});
|
|
|
|
SubscriptionData.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
iamPrincipalXid = json['iam_principal_xid'];
|
|
manageProductXid = json['manage_product_xid'];
|
|
razorpayPlanId = json['razorpay_plan_id'];
|
|
subscriptionId = json['subscription_id'];
|
|
razorpayCustomerId = json['razorpay_customer_id'];
|
|
status = json['status'];
|
|
paymentMethod = json['payment_method'];
|
|
quantity = json['quantity'];
|
|
chargeAt = json['charge_at'];
|
|
startAt = json['start_at'];
|
|
endAt = json['end_at'];
|
|
totalCount = json['total_count'];
|
|
isCancelledSubscription = json['isCancelledSubscription'];
|
|
cancelledAt = json['cancelled_at'];
|
|
expireBy = json['expire_by'];
|
|
shortUrl = json['short_url'];
|
|
hasScheduledChanges = json['has_scheduled_changes'];
|
|
isActive = json['is_active'];
|
|
createdBy = json['created_by'];
|
|
modifiedBy = json['modified_by'];
|
|
deletedAt = json['deleted_at'];
|
|
createdAt = json['created_at'];
|
|
updatedAt = json['updated_at'];
|
|
amount = json['amount'];
|
|
productData = json['product_data'] != null
|
|
? new ProductData.fromJson(json['product_data'])
|
|
: null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['iam_principal_xid'] = this.iamPrincipalXid;
|
|
data['manage_product_xid'] = this.manageProductXid;
|
|
data['razorpay_plan_id'] = this.razorpayPlanId;
|
|
data['subscription_id'] = this.subscriptionId;
|
|
data['razorpay_customer_id'] = this.razorpayCustomerId;
|
|
data['status'] = this.status;
|
|
data['payment_method'] = this.paymentMethod;
|
|
data['quantity'] = this.quantity;
|
|
data['charge_at'] = this.chargeAt;
|
|
data['start_at'] = this.startAt;
|
|
data['end_at'] = this.endAt;
|
|
data['total_count'] = this.totalCount;
|
|
data['isCancelledSubscription'] = this.isCancelledSubscription;
|
|
data['cancelled_at'] = this.cancelledAt;
|
|
data['expire_by'] = this.expireBy;
|
|
data['short_url'] = this.shortUrl;
|
|
data['has_scheduled_changes'] = this.hasScheduledChanges;
|
|
data['is_active'] = this.isActive;
|
|
data['created_by'] = this.createdBy;
|
|
data['modified_by'] = this.modifiedBy;
|
|
data['deleted_at'] = this.deletedAt;
|
|
data['created_at'] = this.createdAt;
|
|
data['updated_at'] = this.updatedAt;
|
|
data['amount'] = this.amount;
|
|
if (this.productData != null) {
|
|
data['product_data'] = this.productData!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class ProductData {
|
|
int? id;
|
|
String? razorpayPlanId;
|
|
int? productTypeXid;
|
|
int? productTierXid;
|
|
String? productName;
|
|
String? productDescription;
|
|
String? productPrice;
|
|
String? productImage;
|
|
String? template;
|
|
int? isActive;
|
|
String? createdBy;
|
|
String? modifiedBy;
|
|
String? deletedAt;
|
|
String? createdAt;
|
|
String? updatedAt;
|
|
ProductTier? productTier;
|
|
|
|
ProductData(
|
|
{this.id,
|
|
this.razorpayPlanId,
|
|
this.productTypeXid,
|
|
this.productTierXid,
|
|
this.productName,
|
|
this.productDescription,
|
|
this.productPrice,
|
|
this.productImage,
|
|
this.template,
|
|
this.isActive,
|
|
this.createdBy,
|
|
this.modifiedBy,
|
|
this.deletedAt,
|
|
this.createdAt,
|
|
this.updatedAt,
|
|
this.productTier});
|
|
|
|
ProductData.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
razorpayPlanId = json['razorpay_plan_id'];
|
|
productTypeXid = json['product_type_xid'];
|
|
productTierXid = json['product_tier_xid'];
|
|
productName = json['product_name'];
|
|
productDescription = json['product_description'];
|
|
productPrice = json['product_price'];
|
|
productImage = json['product_image'];
|
|
template = json['template'];
|
|
isActive = json['is_active'];
|
|
createdBy = json['created_by'];
|
|
modifiedBy = json['modified_by'];
|
|
deletedAt = json['deleted_at'];
|
|
createdAt = json['created_at'];
|
|
updatedAt = json['updated_at'];
|
|
productTier = json['product_tier'] != null
|
|
? new ProductTier.fromJson(json['product_tier'])
|
|
: null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['razorpay_plan_id'] = this.razorpayPlanId;
|
|
data['product_type_xid'] = this.productTypeXid;
|
|
data['product_tier_xid'] = this.productTierXid;
|
|
data['product_name'] = this.productName;
|
|
data['product_description'] = this.productDescription;
|
|
data['product_price'] = this.productPrice;
|
|
data['product_image'] = this.productImage;
|
|
data['template'] = this.template;
|
|
data['is_active'] = this.isActive;
|
|
data['created_by'] = this.createdBy;
|
|
data['modified_by'] = this.modifiedBy;
|
|
data['deleted_at'] = this.deletedAt;
|
|
data['created_at'] = this.createdAt;
|
|
data['updated_at'] = this.updatedAt;
|
|
if (this.productTier != null) {
|
|
data['product_tier'] = this.productTier!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class ProductTier {
|
|
int? id;
|
|
String? name;
|
|
int? isActive;
|
|
String? createdAt;
|
|
String? updatedAt;
|
|
String? deletedAt;
|
|
|
|
ProductTier(
|
|
{this.id,
|
|
this.name,
|
|
this.isActive,
|
|
this.createdAt,
|
|
this.updatedAt,
|
|
this.deletedAt});
|
|
|
|
ProductTier.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
name = json['name'];
|
|
isActive = json['is_active'];
|
|
createdAt = json['created_at'];
|
|
updatedAt = json['updated_at'];
|
|
deletedAt = json['deleted_at'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['name'] = this.name;
|
|
data['is_active'] = this.isActive;
|
|
data['created_at'] = this.createdAt;
|
|
data['updated_at'] = this.updatedAt;
|
|
data['deleted_at'] = this.deletedAt;
|
|
return data;
|
|
}
|
|
}
|