class ChangeTransactionPinRequest {
  String oldTransPincode = "";
  String newTransPincode = "";
  String channelCode = "";
  String pctCstycode = "";
  String porOrgacode = "";
  String cmpCustcode = "";
  bool isOtpRequired = false;
  String pinType = "";

  ChangeTransactionPinRequest({
    this.oldTransPincode = "",
    this.newTransPincode = "",
    this.channelCode = "",
    this.pctCstycode = "",
    this.porOrgacode = "",
    this.cmpCustcode = "",
    this.isOtpRequired = false,
    this.pinType = "",
  });

  ChangeTransactionPinRequest.empty()
      : this.oldTransPincode = "",
        this.newTransPincode = "",
        this.channelCode = "",
        this.pctCstycode = "",
        this.porOrgacode = "",
        this.cmpCustcode = "",
        this.isOtpRequired = false,
        this.pinType = "";

  // Convert object to a Map
  Map<String, dynamic> toMap() {
    return {
      'oldTransPincode': oldTransPincode,
      'newTransPincode': newTransPincode,
      'channelCode': channelCode,
      'pctCstycode': pctCstycode,
      'porOrgacode': porOrgacode,
      'cmpCustcode': cmpCustcode,
      'isOtpRequire': isOtpRequired,
      'pinType': pinType,
    };
  }

  // Create object from a Map
  factory ChangeTransactionPinRequest.fromMap(Map<String, dynamic> map) {
    return ChangeTransactionPinRequest(
      oldTransPincode: map['oldTransPincode'] ?? '' ,
      newTransPincode: map['newTransPincode'] ?? '',
      channelCode: map['channelCode'] ?? '',
      pctCstycode: map['pctCstycode'] ?? '',
      porOrgacode: map['porOrgacode'] ?? '',
      cmpCustcode: map['cmpCustcode'] ?? '',
      isOtpRequired: map['isOtpRequire'] ?? '',
      pinType: map['pinType'],
    );
  }

  @override
  String toString() {
    return 'ChangeTransactionPinRequest{oldTransPincode: $oldTransPincode, newTransPincode: $newTransPincode, channelCode: $channelCode, pctCstycode: $pctCstycode, porOrgacode: $porOrgacode, cmpCustcode: $cmpCustcode, isOtpRequired: $isOtpRequired, pinType: $pinType}';
  }
}
