toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'object'] = this.object;
  json[r'id'] = this.id;
  json[r'payer_id'] = this.payerId;
  json[r'payment_type'] = this.paymentType;
  if (this.isDefault != null) {
    json[r'is_default'] = this.isDefault;
  } else {
    json[r'is_default'] = null;
  }
  json[r'gateway'] = this.gateway;
  json[r'gateway_external_id'] = this.gatewayExternalId;
  if (this.gatewayExternalAccountId != null) {
    json[r'gateway_external_account_id'] = this.gatewayExternalAccountId;
  } else {
    json[r'gateway_external_account_id'] = null;
  }
  if (this.last4 != null) {
    json[r'last4'] = this.last4;
  } else {
    json[r'last4'] = null;
  }
  json[r'status'] = this.status;
  if (this.walletType != null) {
    json[r'wallet_type'] = this.walletType;
  } else {
    json[r'wallet_type'] = null;
  }
  if (this.cardType != null) {
    json[r'card_type'] = this.cardType;
  } else {
    json[r'card_type'] = null;
  }
  if (this.expiryYear != null) {
    json[r'expiry_year'] = this.expiryYear;
  } else {
    json[r'expiry_year'] = null;
  }
  if (this.expiryMonth != null) {
    json[r'expiry_month'] = this.expiryMonth;
  } else {
    json[r'expiry_month'] = null;
  }
  if (this.createdAt != null) {
    json[r'created_at'] = this.createdAt;
  } else {
    json[r'created_at'] = null;
  }
  if (this.updatedAt != null) {
    json[r'updated_at'] = this.updatedAt;
  } else {
    json[r'updated_at'] = null;
  }
  if (this.isRemovable != null) {
    json[r'is_removable'] = this.isRemovable;
  } else {
    json[r'is_removable'] = null;
  }
  return json;
}