public CreditNoteServiceTest(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service = new CreditNoteService();

            this.createOptions = new CreditNoteCreateOptions
            {
                Amount    = 100,
                InvoiceId = "in_123",
                Reason    = "duplicate",
            };

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

            this.listOptions = new CreditNoteListOptions
            {
                Limit     = 1,
                InvoiceId = "in_123",
            };

            this.voidOptions = new CreditNoteVoidOptions
            {
            };
        }
Пример #2
0
        public CreditNoteServiceTest(
            StripeMockFixture stripeMockFixture,
            MockHttpClientFixture mockHttpClientFixture)
            : base(stripeMockFixture, mockHttpClientFixture)
        {
            this.service = new CreditNoteService(this.StripeClient);

            this.createOptions = new CreditNoteCreateOptions
            {
                Amount  = 100,
                Invoice = "in_123",
                Reason  = "duplicate",
            };

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

            this.listOptions = new CreditNoteListOptions
            {
                Limit   = 1,
                Invoice = "in_123",
            };

            this.listLineItemsOptions = new CreditNoteListLineItemsOptions
            {
                Limit = 1,
            };

            this.previewOptions = new CreditNotePreviewOptions
            {
                Amount  = 1000,
                Invoice = "in_123",
            };

            this.listPreviewLineItemsOptions = new CreditNoteListPreviewLineItemsOptions
            {
                Amount  = 1000,
                Invoice = "in_123",
            };

            this.voidOptions = new CreditNoteVoidOptions
            {
            };
        }
Пример #3
0
        // POST api/<controller>
        public void Post(CustomerInvoice value)
        {
            var service = new CreditNoteService();

            service.Add(GlobalVariables.SapSessionId, value);
        }