public SubscriptionScheduleServiceTest(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service = new SubscriptionScheduleService();

            this.cancelOptions = new SubscriptionScheduleCancelOptions
            {
                InvoiceNow = true,
                Prorate    = true,
            };

            this.createOptions = new SubscriptionScheduleCreateOptions
            {
                CustomerId = "cus_123",
            };

            this.releaseOptions = new SubscriptionScheduleReleaseOptions
            {
                PreserveCancelDate = true,
            };

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

            this.listOptions = new SubscriptionScheduleListOptions
            {
                Limit = 1,
            };
        }
Example #2
0
 public SubscriptionScheduleController(SubscriptionScheduleService subscriptionScheduleService)
 {
     _subscriptionScheduleService = subscriptionScheduleService;
     _requestOptions = new RequestOptions
     {
         ApiKey = "sk_test_ThCObWFxHZdKzd7flb4xEm2200hvFDoAoy"
     };
 }
Example #3
0
        public SubscriptionScheduleServiceTest(
            StripeMockFixture stripeMockFixture,
            MockHttpClientFixture mockHttpClientFixture)
            : base(stripeMockFixture, mockHttpClientFixture)
        {
            this.service = new SubscriptionScheduleService(this.StripeClient);

            this.cancelOptions = new SubscriptionScheduleCancelOptions
            {
                InvoiceNow = true,
                Prorate    = true,
            };

            this.createOptions = new SubscriptionScheduleCreateOptions
            {
                Customer        = "cus_123",
                StartDate       = SubscriptionScheduleStartDate.Now,
                DefaultSettings = new SubscriptionScheduleDefaultSettingsOptions
                {
                    CollectionMethod = "send_invoice",
                },
                Phases = new List <SubscriptionSchedulePhaseOptions>
                {
                    new SubscriptionSchedulePhaseOptions
                    {
                        Items = new List <SubscriptionSchedulePhaseItemOptions>
                        {
                            new SubscriptionSchedulePhaseItemOptions
                            {
                                Price = "price_123",
                            },
                        },
                    },
                },
            };

            this.releaseOptions = new SubscriptionScheduleReleaseOptions
            {
                PreserveCancelDate = true,
            };

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

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