#suzz1911

1 messages · Page 1 of 1 (latest)

uncut micaBOT
languid oak
#

var session = await service.CreateAsync(options);

var service = new SessionService(_client);
    var session = await service.GetAsync(sessionId);
wispy orchid
languid oak
#

var service = new SessionService(_client);
service.AddExpand("data.line_items");
var session = await service.GetAsync(sessionId);

Cannot resolve symbol 'AddExpand'

#

use like this right?

#

i used the expand object like this

var options = new SubscriptionListOptions
    {
        Customer = customerId,
        Status = "all"
    };
    options.AddExpand("data.default_payment_method");

and is working

#

how to use in this case
var service = new SessionService(_client);
service.AddExpand("data.line_items");
var session = await service.GetAsync(sessionId);

wispy orchid
#

You're missing:

var options = new SessionGetOptions()
options.AddExpand('line_items')
languid oak
#

ok

#

but how will i add sessionid in this case?

wispy orchid
#
var service = new SessionService()
var options = new SessionGetOptions()
options.AddExpand('line_items')

service.Get(id, options);
languid oak
#

ok

#

one more question is there

wispy orchid
#

Sure!

languid oak
#

i set the cancellation like this in dashboard

#

and right after i cancelled the production, the status of the subscription in the subscription api is not set to cancelled
var options = new SubscriptionListOptions { Customer = customerId, Status = "all" }; options.AddExpand("data.default_payment_method"); var service = new SubscriptionService(); var subscriptions = service.List(options)

wispy orchid
#

Sure, that's because you have the 'cancel at end of billing period' option set

#

So we update the Subscription's cancel_at_period_end field and it's automatically cancelled on the period_end timestamp

languid oak
#

how will i set the kow that the subscription will get cancelled at the end of the perios. now the status is active same as before its get cancelled

wispy orchid
languid oak
#

ok