PaymentPagesCheckoutSessionCustomText.fromJson constructor

PaymentPagesCheckoutSessionCustomText.fromJson(
  1. Object? json
)

Implementation

factory PaymentPagesCheckoutSessionCustomText.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentPagesCheckoutSessionCustomText(
    afterSubmit: map['after_submit'] == null
        ? null
        : PaymentLinksResourceCustomTextPosition.fromJson(
            map['after_submit']),
    shippingAddress: map['shipping_address'] == null
        ? null
        : PaymentLinksResourceCustomTextPosition.fromJson(
            map['shipping_address']),
    submit: map['submit'] == null
        ? null
        : PaymentLinksResourceCustomTextPosition.fromJson(map['submit']),
    termsOfServiceAcceptance: map['terms_of_service_acceptance'] == null
        ? null
        : PaymentLinksResourceCustomTextPosition.fromJson(
            map['terms_of_service_acceptance']),
  );
}