public PaymentMethodServiceTest( StripeMockFixture stripeMockFixture, MockHttpClientFixture mockHttpClientFixture) : base(stripeMockFixture, mockHttpClientFixture) { this.service = new PaymentMethodService(this.StripeClient); this.attachOptions = new PaymentMethodAttachOptions { Customer = "cus_123", }; this.createOptions = new PaymentMethodCreateOptions { Card = new PaymentMethodCardOptions { Token = "tok_123", }, Type = "card", }; this.detachOptions = new PaymentMethodDetachOptions { }; this.listOptions = new PaymentMethodListOptions { Customer = "cus_123", Type = "card", }; this.updateOptions = new PaymentMethodUpdateOptions { Metadata = new Dictionary <string, string> { { "key", "value" }, }, }; }
public virtual Task <PaymentMethod> DetachAsync(string paymentMethodId, PaymentMethodDetachOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { return(this.RequestAsync(HttpMethod.Post, $"{this.InstanceUrl(paymentMethodId)}/detach", options, requestOptions, cancellationToken)); }
public virtual PaymentMethod Detach(string paymentMethodId, PaymentMethodDetachOptions options, RequestOptions requestOptions = null) { return(this.Request(HttpMethod.Post, $"{this.InstanceUrl(paymentMethodId)}/detach", options, requestOptions)); }