encode<V> static method
Implementation
static V encode<V>(
SubscriptionResumeOptions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.billingCycleAnchor != null) {
SubscriptionBillingCycleAnchor.encode(
instance.billingCycleAnchor!,
container.nestedSingleValueContainer('billing_cycle_anchor').encoder,
);
}
if (instance.expand != null) {
container.encodeList(
'expand',
(container) =>
instance.expand!.forEach((el) => container.encodeString(el)),
);
}
if (instance.prorationBehavior != null) {
PortalSubscriptionCancelProrationBehavior.encode(
instance.prorationBehavior!,
container.nestedSingleValueContainer('proration_behavior').encoder,
);
}
if (instance.prorationDate != null) {
container.encodeDateTime(
'proration_date',
instance.prorationDate!,
);
}
return container.value;
}