  import 'billing_address.dart';

class Billing {
  BillingAddress? billingAddress;
  String? paymentReference;
  String? gateway;
  String? paymentStatus;

  Billing(
      {this.billingAddress,
      this.paymentReference,
      this.gateway,
      this.paymentStatus});

  Billing.fromJson(Map<String, dynamic> json) {
    billingAddress = json['billing_address'] != null
        ? new BillingAddress.fromJson(json['billing_address'])
        : null;
    paymentReference = json['payment_reference'];
    gateway = json['gateway'];
    paymentStatus = json['payment_status'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.billingAddress != null) {
      data['billing_address'] = this.billingAddress!.toJson();
    }
    data['payment_reference'] = this.paymentReference;
    data['gateway'] = this.gateway;
    data['payment_status'] = this.paymentStatus;
    return data;
  }
}
