Если вы отправите свои изменения на информационной панели Stripe, вы увидите следующее тело запроса
{
"account_balance": "0",
"description": "Customer for Testing",
"invoice_prefix": "KarenPrefix",
"shipping": {
"phone": "+12016262852",
"name": "",
"address": {
"line1": "",
"line2": "",
"city": "",
"state": "",
"postal_code": "",
"country": ""
}
},
"tax_info": {
"tax_id": "",
"type": "vat"
},
"invoicing": {
"email_to": [
"test@test.com"
],
"email_cc": [
"test2@test.com"
]
}
}
, поэтому оно сопоставляется с телом запроса, показанным в Stripe API doc .
CustomerUpdateOptions выглядит следующим образом, см. doc
namespace Stripe
{
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
public class CustomerUpdateOptions : BaseOptions
{
[JsonProperty("account_balance")]
public long? AccountBalance { get; set; }
[JsonProperty("coupon")]
public string Coupon { get; set; }
[JsonProperty("default_source")]
public string DefaultSource { get; set; }
[JsonProperty("description")]
public string Description { get; set; }
[JsonProperty("email")]
public string Email { get; set; }
[JsonProperty("invoice_prefix")]
public string InvoicePrefix { get; set; }
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }
[JsonProperty("shipping")]
public ShippingOptions Shipping { get; set; }
[JsonProperty("source")]
public string SourceToken { get; set; }
[JsonProperty("source")]
public CardCreateNestedOptions SourceCard { get; set; }
[JsonProperty("tax_info")]
public CustomerTaxInfoOptions TaxInfo { get; set; }
[JsonProperty("validate")]
public bool? Validate { get; set; }
}
}
Таким образом, вы должны установить ShippingOptions
для обновления address.line1
Надеюсь, это поможет