encode<V> static method
Implementation
static V encode<V>(
RefundDestinationDetails instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.affirm != null) {
DestinationDetailsUnimplemented.encode(
instance.affirm!,
container.nestedSingleValueContainer('affirm').encoder,
);
}
if (instance.afterpayClearpay != null) {
DestinationDetailsUnimplemented.encode(
instance.afterpayClearpay!,
container.nestedSingleValueContainer('afterpay_clearpay').encoder,
);
}
if (instance.alipay != null) {
DestinationDetailsUnimplemented.encode(
instance.alipay!,
container.nestedSingleValueContainer('alipay').encoder,
);
}
if (instance.auBankTransfer != null) {
DestinationDetailsUnimplemented.encode(
instance.auBankTransfer!,
container.nestedSingleValueContainer('au_bank_transfer').encoder,
);
}
if (instance.blik != null) {
RefundDestinationDetailsGeneric.encode(
instance.blik!,
container.nestedSingleValueContainer('blik').encoder,
);
}
if (instance.brBankTransfer != null) {
RefundDestinationDetailsGeneric.encode(
instance.brBankTransfer!,
container.nestedSingleValueContainer('br_bank_transfer').encoder,
);
}
if (instance.card != null) {
RefundDestinationDetailsCard.encode(
instance.card!,
container.nestedSingleValueContainer('card').encoder,
);
}
if (instance.cashapp != null) {
DestinationDetailsUnimplemented.encode(
instance.cashapp!,
container.nestedSingleValueContainer('cashapp').encoder,
);
}
if (instance.customerCashBalance != null) {
DestinationDetailsUnimplemented.encode(
instance.customerCashBalance!,
container.nestedSingleValueContainer('customer_cash_balance').encoder,
);
}
if (instance.eps != null) {
DestinationDetailsUnimplemented.encode(
instance.eps!,
container.nestedSingleValueContainer('eps').encoder,
);
}
if (instance.euBankTransfer != null) {
RefundDestinationDetailsGeneric.encode(
instance.euBankTransfer!,
container.nestedSingleValueContainer('eu_bank_transfer').encoder,
);
}
if (instance.gbBankTransfer != null) {
RefundDestinationDetailsGeneric.encode(
instance.gbBankTransfer!,
container.nestedSingleValueContainer('gb_bank_transfer').encoder,
);
}
if (instance.giropay != null) {
DestinationDetailsUnimplemented.encode(
instance.giropay!,
container.nestedSingleValueContainer('giropay').encoder,
);
}
if (instance.grabpay != null) {
DestinationDetailsUnimplemented.encode(
instance.grabpay!,
container.nestedSingleValueContainer('grabpay').encoder,
);
}
if (instance.jpBankTransfer != null) {
RefundDestinationDetailsGeneric.encode(
instance.jpBankTransfer!,
container.nestedSingleValueContainer('jp_bank_transfer').encoder,
);
}
if (instance.klarna != null) {
DestinationDetailsUnimplemented.encode(
instance.klarna!,
container.nestedSingleValueContainer('klarna').encoder,
);
}
if (instance.mxBankTransfer != null) {
RefundDestinationDetailsGeneric.encode(
instance.mxBankTransfer!,
container.nestedSingleValueContainer('mx_bank_transfer').encoder,
);
}
if (instance.p24 != null) {
RefundDestinationDetailsGeneric.encode(
instance.p24!,
container.nestedSingleValueContainer('p24').encoder,
);
}
if (instance.paynow != null) {
DestinationDetailsUnimplemented.encode(
instance.paynow!,
container.nestedSingleValueContainer('paynow').encoder,
);
}
if (instance.paypal != null) {
DestinationDetailsUnimplemented.encode(
instance.paypal!,
container.nestedSingleValueContainer('paypal').encoder,
);
}
if (instance.pix != null) {
DestinationDetailsUnimplemented.encode(
instance.pix!,
container.nestedSingleValueContainer('pix').encoder,
);
}
if (instance.revolut != null) {
DestinationDetailsUnimplemented.encode(
instance.revolut!,
container.nestedSingleValueContainer('revolut').encoder,
);
}
if (instance.sofort != null) {
DestinationDetailsUnimplemented.encode(
instance.sofort!,
container.nestedSingleValueContainer('sofort').encoder,
);
}
if (instance.swish != null) {
RefundDestinationDetailsGeneric.encode(
instance.swish!,
container.nestedSingleValueContainer('swish').encoder,
);
}
if (instance.thBankTransfer != null) {
RefundDestinationDetailsGeneric.encode(
instance.thBankTransfer!,
container.nestedSingleValueContainer('th_bank_transfer').encoder,
);
}
container.encodeString(
'type',
instance.type,
);
if (instance.usBankTransfer != null) {
RefundDestinationDetailsGeneric.encode(
instance.usBankTransfer!,
container.nestedSingleValueContainer('us_bank_transfer').encoder,
);
}
if (instance.wechatPay != null) {
DestinationDetailsUnimplemented.encode(
instance.wechatPay!,
container.nestedSingleValueContainer('wechat_pay').encoder,
);
}
if (instance.zip != null) {
DestinationDetailsUnimplemented.encode(
instance.zip!,
container.nestedSingleValueContainer('zip').encoder,
);
}
return container.value;
}