toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['`object`'] = this.object;
data['amount'] = this.amount;
data['amount_capturable'] = this.amountCapturable;
data['amount_received'] = this.amountReceived;
data['application'] = this.application;
data['application_fee_amount'] = this.applicationFeeAmount;
data['canceled_at'] = this.canceledAt;
data['cancellation_reason'] = this.cancellationReason;
data['capture_method'] = this.captureMethod;
data['client_secret'] = this.clientSecret;
data['confirmation_method'] = this.confirmationMethod;
data['created'] = this.created;
data['currency'] = this.currency;
data['customer'] = this.customer;
data['description'] = this.description;
data['id'] = this.id;
data['invoice'] = this.invoice;
data['last_payment_error'] = this.lastPaymentError;
data['livemode'] = this.livemode;
data['next_action'] = this.nextAction;
data['on_behalf_of'] = this.onBehalfOf;
data['payment_method'] = this.paymentMethod;
data['receipt_email'] = this.receiptEmail;
data['review'] = this.review;
data['setup_future_usage'] = this.setupFutureUsage;
data['shipping'] = this.shipping;
data['source'] = this.source;
data['statement_descriptor'] = this.statementDescriptor;
data['statement_descriptor_suffix'] = this.statementDescriptorSuffix;
data['status'] = this.status;
data['transfer_data'] = this.transferData;
data['transfer_group'] = this.transferGroup;
if (this.charges != null) {
data['charges'] = this.charges!.toJson();
}
if (this.paymentMethodOptions != null) {
data['payment_method_options'] = this.paymentMethodOptions!.toJson();
}
if (this.paymentMethodTypes != null) {
data['payment_method_types'] = this.paymentMethodTypes;
}
return data;
}