private Session ExpandAsSession(Stripe.Event stripeEvent) { var session = stripeEvent.Data.Object as Session; var service = new SessionService(); var options = new SessionGetOptions(); options.AddExpand("customer"); return(service.Get(session.Id, options)); }
public async Task <Session> GetCheckoutSession(string sessionId) { var options = new SessionGetOptions(); options.AddExpand("setup_intent"); options.AddExpand("payment_intent"); var service = new SessionService(); return(await service.GetAsync(sessionId, options)); }
public virtual Task <Session> GetAsync(string sessionId, SessionGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { return(this.GetEntityAsync(sessionId, options, requestOptions, cancellationToken)); }
public virtual Session Get(string sessionId, SessionGetOptions options = null, RequestOptions requestOptions = null) { return(this.GetEntity(sessionId, options, requestOptions)); }