encode<V> static method

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

Implementation

static V encode<V>(
  SubscriptionBillingThresholds instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.amountGte != null) {
    container.encodeInt(
      'amount_gte',
      instance.amountGte!,
    );
  }
  if (instance.resetBillingCycleAnchor != null) {
    container.encodeBool(
      'reset_billing_cycle_anchor',
      instance.resetBillingCycleAnchor!,
    );
  }
  return container.value;
}