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" },
                },
            };
        }
예제 #2
0
 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));
 }
예제 #3
0
 public virtual PaymentMethod Detach(string paymentMethodId, PaymentMethodDetachOptions options, RequestOptions requestOptions = null)
 {
     return(this.Request(HttpMethod.Post, $"{this.InstanceUrl(paymentMethodId)}/detach", options, requestOptions));
 }