Class: Stripe::BillingPortal::ConfigurationService

Inherits:
StripeService
  • Object
show all
Defined in:
lib/stripe/services/billing_portal/configuration_service.rb

Defined Under Namespace

Classes: CreateParams, ListParams, RetrieveParams, UpdateParams

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#create(params = {}, opts = {}) ⇒ Object

Creates a configuration that describes the functionality and behavior of a PortalSession



486
487
488
489
490
491
492
493
494
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 486

def create(params = {}, opts = {})
  request(
    method: :post,
    path: "/v1/billing_portal/configurations",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#list(params = {}, opts = {}) ⇒ Object

Returns a list of configurations that describe the functionality of the customer portal.



497
498
499
500
501
502
503
504
505
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 497

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v1/billing_portal/configurations",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(configuration, params = {}, opts = {}) ⇒ Object

Retrieves a configuration that describes the functionality of the customer portal.



508
509
510
511
512
513
514
515
516
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 508

def retrieve(configuration, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/billing_portal/configurations/%<configuration>s", { configuration: CGI.escape(configuration) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#update(configuration, params = {}, opts = {}) ⇒ Object

Updates a configuration that describes the functionality of the customer portal.



519
520
521
522
523
524
525
526
527
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 519

def update(configuration, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/billing_portal/configurations/%<configuration>s", { configuration: CGI.escape(configuration) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end