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()); }
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 }); }
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 }; }