You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/models/apple_pay_request.dart

136 lines
4.3 KiB
Dart

class ApplePayRequest {
String currency;
String language;
String customername;
dynamic customerEmail;
String orderdescription;
String liveServiceid;
dynamic longitude;
dynamic latitude;
String devicetoken;
String clientrequestid;
String projectid;
String serviceid;
String patientid;
String amount;
String appleData;
String appleSignature;
AppleHeader appleHeader;
ApplePaymentMethod applePaymentMethod;
ApplePayRequest(
{this.currency,
this.language,
this.customername,
this.customerEmail,
this.orderdescription,
this.liveServiceid,
this.longitude,
this.latitude,
this.devicetoken,
this.clientrequestid,
this.projectid,
this.serviceid,
this.patientid,
this.amount,
this.appleData,
this.appleSignature,
this.appleHeader,
this.applePaymentMethod});
ApplePayRequest.fromJson(Map<String, dynamic> json) {
currency = json['currency'];
language = json['language'];
customername = json['customername'];
customerEmail = json['customer_email'];
orderdescription = json['orderdescription'];
liveServiceid = json['live_serviceid'];
longitude = json['longitude'];
latitude = json['latitude'];
devicetoken = json['devicetoken'];
clientrequestid = json['clientrequestid'];
projectid = json['projectid'];
serviceid = json['serviceid'];
patientid = json['patientid'];
amount = json['Amount'];
appleData = json['apple_data'];
appleSignature = json['apple_signature'];
appleHeader = json['apple_header'] != null ? new AppleHeader.fromJson(json['apple_header']) : null;
applePaymentMethod = json['apple_paymentMethod'] != null ? new ApplePaymentMethod.fromJson(json['apple_paymentMethod']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['currency'] = this.currency;
data['language'] = this.language;
data['customername'] = this.customername;
data['customer_email'] = this.customerEmail;
data['orderdescription'] = this.orderdescription;
data['live_serviceid'] = this.liveServiceid;
data['longitude'] = this.longitude;
data['latitude'] = this.latitude;
data['devicetoken'] = this.devicetoken;
data['clientrequestid'] = this.clientrequestid;
data['projectid'] = this.projectid;
data['serviceid'] = this.serviceid;
data['patientid'] = this.patientid;
data['Amount'] = this.amount;
data['apple_data'] = this.appleData;
data['apple_signature'] = this.appleSignature;
if (this.appleHeader != null) {
data['apple_header'] = this.appleHeader.toJson();
}
if (this.applePaymentMethod != null) {
data['apple_paymentMethod'] = this.applePaymentMethod.toJson();
}
return data;
}
}
class AppleHeader {
String appleApplicationData;
String appleEphemeralPublicKey;
String applePublicKeyHash;
String appleTransactionId;
AppleHeader({this.appleApplicationData, this.appleEphemeralPublicKey, this.applePublicKeyHash, this.appleTransactionId});
AppleHeader.fromJson(Map<String, dynamic> json) {
appleApplicationData = json['apple_applicationData'];
appleEphemeralPublicKey = json['apple_ephemeralPublicKey'];
applePublicKeyHash = json['apple_publicKeyHash'];
appleTransactionId = json['apple_transactionId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['apple_applicationData'] = this.appleApplicationData;
data['apple_ephemeralPublicKey'] = this.appleEphemeralPublicKey;
data['apple_publicKeyHash'] = this.applePublicKeyHash;
data['apple_transactionId'] = this.appleTransactionId;
return data;
}
}
class ApplePaymentMethod {
String appleDisplayName;
String appleNetwork;
String appleType;
ApplePaymentMethod({this.appleDisplayName, this.appleNetwork, this.appleType});
ApplePaymentMethod.fromJson(Map<String, dynamic> json) {
appleDisplayName = json['apple_displayName'];
appleNetwork = json['apple_network'];
appleType = json['apple_type'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['apple_displayName'] = this.appleDisplayName;
data['apple_network'] = this.appleNetwork;
data['apple_type'] = this.appleType;
return data;
}
}