chatwoot/chatwoot

View on GitHub
enterprise/app/services/enterprise/billing/create_session_service.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class Enterprise::Billing::CreateSessionService
  def create_session(customer_id, return_url = ENV.fetch('FRONTEND_URL'))
    Stripe::BillingPortal::Session.create(
      {
        customer: customer_id,
        return_url: return_url
      }
    )
  end
end