#ranvir-dotnet

1 messages · Page 1 of 1 (latest)

junior bone
#

@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
arctic root
junior bone
#

@arctic root yes!

#

sorry got into a phone call, but the event will not "expand" so it will map what is documented

arctic root
#

ohh, thanks