PaymentPagesCheckoutSessionConsentCollection.fromJson constructor

PaymentPagesCheckoutSessionConsentCollection.fromJson(
  1. Object? json
)

Implementation

factory PaymentPagesCheckoutSessionConsentCollection.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentPagesCheckoutSessionConsentCollection(
    paymentMethodReuseAgreement: map['payment_method_reuse_agreement'] == null
        ? null
        : PaymentLinksResourcePaymentMethodReuseAgreement.fromJson(
            map['payment_method_reuse_agreement']),
    promotions: map['promotions'] == null
        ? null
        : CheckoutSessionConsentCollectionPromotions.fromJson(
            map['promotions']),
    termsOfService: map['terms_of_service'] == null
        ? null
        : CheckoutSessionConsentCollectionTermsOfService.fromJson(
            map['terms_of_service']),
  );
}