Ejemplo n.º 1
0
        public async Task DoNotRetrievePricingWhenIncludeIsNull()
        {
            // When: retrieving the ideal method with the include parameter set to null
            PaymentMethodResponse paymentMethod = await PaymentMethodClient.GetPaymentMethodAsync(PaymentMethods.Ideal, includePricing : null);

            // Then: Issuers should not be included
            Assert.IsNull(paymentMethod.Pricing);
        }
Ejemplo n.º 2
0
        public async Task DoNotRetrieveIssuersWhenIncludeIsFalse()
        {
            // When: retrieving the ideal method with the include parameter set to false
            PaymentMethodResponse paymentMethod = await PaymentMethodClient.GetPaymentMethodAsync(PaymentMethods.Ideal, false);

            // Then: Issuers should not be included
            Assert.IsNull(paymentMethod.Issuers);
        }
Ejemplo n.º 3
0
        public async Task CanRetrievePricing()
        {
            // When: retrieving the ideal method we can include the issuers
            PaymentMethodResponse paymentMethod = await PaymentMethodClient.GetPaymentMethodAsync(PaymentMethods.Ideal, includePricing : true);

            // Then: We should have one or multiple issuers
            Assert.IsNotNull(paymentMethod);
            Assert.IsTrue(paymentMethod.Pricing.Any());
        }
        public async Task CanRetrieveIdealIssuers()
        {
            // When: retrieving the ideal method we can include the issuers
            var paymentMethod = await PaymentMethodClient.GetPaymentMethodAsync(PaymentMethods.Ideal, true);

            // Then: We should have one or multiple issuers
            Assert.NotNull(paymentMethod);
            Assert.True(paymentMethod.Issuers.Any());
        }
        public async Task CanRetrieveSinglePaymentMethod(PaymentMethods method)
        {
            // When: retrieving a payment method
            var paymentMethod = await PaymentMethodClient.GetPaymentMethodAsync(method);

            // Then: Make sure it can be retrieved
            Assert.NotNull(paymentMethod);
            Assert.Equal(method, paymentMethod.Id);
        }