#ranvir-dotnet
1 messages · Page 1 of 1 (latest)
@arctic root by default the API returns a string here (the customer id). You can optionally turn this into a full Customer object. This is related to our API expansion feature https://stripe.com/docs/expand which allows you to fetch one object and get related objects in one go, a bit like graphql
To support this, dotnet (and other typed languages like java/go) have basically both options in the class
So if you do var service = new PaymentMethodService(); var pm = service.Get("pm_123"); then you'll have pm.CustomerId set but not pm.Customer.
On the other hand if you expand
var service = new PaymentMethodService();
var options = new PaymentMethodGetOptions();
options.AddExpand("customer");
var pm = service.Get("pm_123", options);```
you will get both set
Well I was looking at the event payment_method.card_automatically_updated and I just need customerId , so if I just use CustomerId https://github.com/stripe/stripe-dotnet/blob/master/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs#L68 in this case will it work fine?
@arctic root yes!
sorry got into a phone call, but the event will not "expand" so it will map what is documented
ohh, thanks