Beispiel #1
0
        public RefundServiceTest(
            StripeMockFixture stripeMockFixture,
            MockHttpClientFixture mockHttpClientFixture)
            : base(stripeMockFixture, mockHttpClientFixture)
        {
            this.service = new RefundService(this.StripeClient);

            this.createOptions = new RefundCreateOptions
            {
                Amount   = 123,
                ChargeId = "ch_123",
            };

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

            this.listOptions = new RefundListOptions
            {
                Limit = 1,
            };
        }
        public virtual async Task <Refund> Update(string chargeId, string refundId, RefundUpdateOptions options)
        {
            var url = string.Format("{0}/{1}/refunds/{2}", Urls.Charges, chargeId, refundId);

            url = this.ApplyAllParameters(options, url, false);

            var response = await Requestor.Post(url);

            return(Mapper <Refund> .MapFromJson(response));
        }
Beispiel #3
0
        public RefundServiceTest()
        {
            this.service = new RefundService();

            this.createOptions = new RefundCreateOptions
            {
                Amount   = 123,
                ChargeId = "ch_123",
            };

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

            this.listOptions = new RefundListOptions
            {
                Limit = 1,
            };
        }
Beispiel #4
0
 public virtual Task <Refund> Update(string refundId, RefundUpdateOptions updateOptions, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
 {
     return(UpdateEntity(refundId, updateOptions, requestOptions, cancellationToken));
 }