Example #1
0
 public virtual StripeFileLink Update(string fileLinkId, StripeFileLinkUpdateOptions updateOptions, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeFileLink> .MapFromJson(
                Requestor.PostString(
                    this.ApplyAllParameters(updateOptions, $"{classUrl}/{WebUtility.UrlEncode(fileLinkId)}", false),
                    this.SetupRequestOptions(requestOptions))));
 }
Example #2
0
 public virtual async Task <StripeFileLink> UpdateAsync(string fileLinkId, StripeFileLinkUpdateOptions updateOptions, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeFileLink> .MapFromJson(
                await Requestor.PostStringAsync(
                    this.ApplyAllParameters(updateOptions, $"{classUrl}/{WebUtility.UrlEncode(fileLinkId)}", false),
                    this.SetupRequestOptions(requestOptions),
                    cancellationToken).ConfigureAwait(false)));
 }
        public StripeFileLinkServiceTest()
        {
            this.service = new StripeFileLinkService();

            this.createOptions = new StripeFileLinkCreateOptions()
            {
                FileId = "file_123",
            };

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

            this.listOptions = new StripeFileLinkListOptions()
            {
                FileId = "file_123",
                Limit  = 1,
            };
        }