示例#1
0
        public OrderServiceTest()
        {
            this.service = new OrderService();

            this.createOptions = new OrderCreateOptions
            {
                Currency = "usd",
                Items    = new List <OrderItemOptions>
                {
                    new OrderItemOptions
                    {
                        Parent   = "sku_123",
                        Quantity = 1
                    },
                }
            };

            this.updateOptions = new OrderUpdateOptions
            {
                Metadata = new Dictionary <string, string>
                {
                    { "key", "value" },
                },
            };

            this.payOptions = new OrderPayOptions
            {
                CustomerId = "cus_123",
            };

            this.listOptions = new OrderListOptions
            {
                Limit = 1,
            };
        }
示例#2
0
        public OrderServiceTest(
            StripeMockFixture stripeMockFixture,
            MockHttpClientFixture mockHttpClientFixture)
            : base(stripeMockFixture, mockHttpClientFixture)
        {
            this.service = new OrderService(this.StripeClient);

            this.createOptions = new OrderCreateOptions
            {
                Currency = "usd",
                Items    = new List <OrderItemOptions>
                {
                    new OrderItemOptions
                    {
                        Parent   = "sku_123",
                        Quantity = 1,
                    },
                },
            };

            this.listOptions = new OrderListOptions
            {
                Limit = 1,
            };

            this.payOptions = new OrderPayOptions
            {
                Customer = "cus_123",
            };

            this.returnOptions = new OrderReturnOptions
            {
                Items = new List <OrderReturnItemOptions>
                {
                    new OrderReturnItemOptions
                    {
                        Parent   = "sku_123",
                        Quantity = 1,
                    },
                },
            };

            this.updateOptions = new OrderUpdateOptions
            {
                Metadata = new Dictionary <string, string>
                {
                    { "key", "value" },
                },
            };
        }