Esempio n. 1
0
        internal static void SetYekPayRequest(IInvoiceBuilder builder, YekPayRequest yekPayRequest)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }
            if (yekPayRequest == null)
            {
                throw new ArgumentNullException(nameof(yekPayRequest));
            }

            builder.AddOrUpdateAdditionalData(YekPayRequestKey, yekPayRequest);
        }
Esempio n. 2
0
        /// <summary>
        /// The invoice will be sent to YekPay gateway.
        /// </summary>
        public static IInvoiceBuilder SetYekPayData(this IInvoiceBuilder builder, YekPayRequest yekPayRequest)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }
            if (yekPayRequest == null)
            {
                throw new ArgumentNullException(nameof(yekPayRequest));
            }

            SetYekPayRequest(builder, yekPayRequest);

            return(builder);
        }
Esempio n. 3
0
        /// <summary>
        /// The invoice will be sent to YekPay gateway.
        /// </summary>
        public static IInvoiceBuilder SetYekPayData(this IInvoiceBuilder builder, Action <YekPayRequest> configureYekPay)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }
            if (configureYekPay == null)
            {
                throw new ArgumentNullException(nameof(configureYekPay));
            }

            var yekPayRequest = new YekPayRequest();

            configureYekPay(yekPayRequest);

            return(SetYekPayData(builder, yekPayRequest));
        }