toJson method

Map<String, dynamic> toJson()

Converts MobileMoneyRequest instance to json

Implementation

Map<String, dynamic> toJson() {
  return {
    'amount': this.amount,
    'currency': this.currency,
    'network': this.network,
    'tx_ref': this.txRef,
    'fullname': this.fullName,
    'email': this.email,
    'phone_number': this.phoneNumber,
    'redirect_url': (this.redirectUrl == null || this.redirectUrl!.isEmpty)
        ? FlutterwaveURLS.DEFAULT_REDIRECT_URL
        : this.redirectUrl,
    'voucher': this.voucher,
    'country': this.country
  };
}