toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'object'] = this.object;
json[r'id'] = this.id;
json[r'payment_id'] = this.paymentId;
json[r'instance_id'] = this.instanceId;
json[r'charge_type'] = this.chargeType;
json[r'payee_id'] = this.payeeId;
json[r'payee'] = this.payee;
json[r'payer_id'] = this.payerId;
json[r'payer'] = this.payer;
if (this.subscriptionItemId != null) {
json[r'subscription_item_id'] = this.subscriptionItemId;
} else {
json[r'subscription_item_id'] = null;
}
if (this.subscriptionItem != null) {
json[r'subscription_item'] = this.subscriptionItem;
} else {
json[r'subscription_item'] = null;
}
json[r'amount'] = this.amount;
json[r'payment_method_id'] = this.paymentMethodId;
json[r'payment_method'] = this.paymentMethod;
json[r'statement_id'] = this.statementId;
if (this.gatewayExternalId != null) {
json[r'gateway_external_id'] = this.gatewayExternalId;
} else {
json[r'gateway_external_id'] = null;
}
if (this.gatewayExternalUrl != null) {
json[r'gateway_external_url'] = this.gatewayExternalUrl;
} else {
json[r'gateway_external_url'] = null;
}
json[r'status'] = this.status;
if (this.paidAt != null) {
json[r'paid_at'] = this.paidAt;
} else {
json[r'paid_at'] = null;
}
if (this.failedAt != null) {
json[r'failed_at'] = this.failedAt;
} else {
json[r'failed_at'] = null;
}
json[r'created_at'] = this.createdAt;
json[r'updated_at'] = this.updatedAt;
return json;
}