toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  if (this.object != null) data['object'] = this.object;
  if (this.clientSecret != null) data['client_secret'] = this.clientSecret;
  if (this.created != null) data['created'] = this.created;
  if (this.currency != null) data['currency'] = this.currency;
  if (this.flow != null) data['flow'] = this.flow;
  if (this.sourceId != null) data['sourceId'] = this.sourceId;
  if (this.livemode != null) data['livemode'] = this.livemode;
  if (this.statementDescriptor != null) data['statement_descriptor'] = this.statementDescriptor;
  if (this.status != null) data['status'] = this.status;
  if (this.type != null) data['type'] = this.type;
  if (this.usage != null) data['usage'] = this.usage;
  if (this.receiver != null) {
    data['receiver'] = this.receiver!.toJson();
  }
  if (this.achCreditTransfer != null) {
    data['ach_credit_transfer'] = this.achCreditTransfer!.toJson();
  }
  if (this.amount != null) data['amount'] = this.amount;
  if (this.metadata != null) {
    if (this.metadata != null) data['metadata'] = this.metadata;
  }
  if (this.owner != null) {
    data['owner'] = this.owner!.toJson();
  }
  return data;
}