PaymentPagesCheckoutSessionShippingOption.fromJson constructor

PaymentPagesCheckoutSessionShippingOption.fromJson(
  1. Object? json
)

Implementation

factory PaymentPagesCheckoutSessionShippingOption.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentPagesCheckoutSessionShippingOption(
    shippingAmount: (map['shipping_amount'] as num).toInt(),
    shippingRate: ShippingRateOrId.fromJson(map['shipping_rate']),
  );
}