encode<V> static method

V encode<V>(
  1. PortalFeatures instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  PortalFeatures instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  PortalCustomerUpdate.encode(
    instance.customerUpdate,
    container.nestedSingleValueContainer('customer_update').encoder,
  );
  PortalInvoiceList.encode(
    instance.invoiceHistory,
    container.nestedSingleValueContainer('invoice_history').encoder,
  );
  PortalPaymentMethodUpdate.encode(
    instance.paymentMethodUpdate,
    container.nestedSingleValueContainer('payment_method_update').encoder,
  );
  PortalSubscriptionCancel.encode(
    instance.subscriptionCancel,
    container.nestedSingleValueContainer('subscription_cancel').encoder,
  );
  PortalSubscriptionPause.encode(
    instance.subscriptionPause,
    container.nestedSingleValueContainer('subscription_pause').encoder,
  );
  PortalSubscriptionUpdate.encode(
    instance.subscriptionUpdate,
    container.nestedSingleValueContainer('subscription_update').encoder,
  );
  return container.value;
}