コード例 #1
0
ファイル: DeliveryAddressTests.cs プロジェクト: FdjNL/.Net
        public void DeliveryAddress_Serialize_PropertyNamesAsExpected()
        {
            // Arrange
            var deliveryAddress = new DeliveryAddress();

            // Act
            var serializedObject = JsonConvert.SerializeObject(deliveryAddress);

            // Assert
            Assert.AreEqual(@"{
		        ""first_name"": null,
		        ""last_name"": null,
		        ""address1"": null,
		        ""address2"": null,
		        ""house_number"": null,
		        ""zip_code"": null,
		        ""city"": null,
		        ""state"": null,
		        ""country"": null,
		        ""phone"": null
	        }".RemoveWhiteSpace(), serializedObject.RemoveWhiteSpace());
        }
コード例 #2
0
 public static OrderRequest CreateDirectEinvoiceOrder(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions, GatewayInfo gatewayInfo, ShoppingCart shoppingCart, CheckoutOptions checkoutOptions, Customer customer, DeliveryAddress deliveryAddress)
 {
     return(new OrderRequest(
                OrderType.Direct,
                orderId,
                description,
                amountInCents,
                currencyCode,
                paymentOptions)
     {
         GatewayId = "EINVOICE",
         GatewayInfo = gatewayInfo,
         ShoppingCart = shoppingCart,
         Customer = customer,
         DeliveryAddress = deliveryAddress,
         CheckoutOptions = checkoutOptions
     });
 }
コード例 #3
0
ファイル: OrderRequest.cs プロジェクト: kaharmanny/.Net
 public static OrderRequest CreateDirectKlarnaOrder(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions, GatewayInfo gatewayInfo, ShoppingCart shoppingCart, CheckoutOptions checkoutOptions, Customer customer, DeliveryAddress deliveryAddress)
 {
     return new OrderRequest(
         OrderType.Direct,
         orderId,
         description,
         amountInCents,
         currencyCode,
         paymentOptions)
     {
         GatewayId = "KLARNA",
         GatewayInfo = gatewayInfo,
         ShoppingCart = shoppingCart,
         Customer = customer,
         DeliveryAddress = deliveryAddress,
         CheckoutOptions = checkoutOptions
     };
 }