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



494
495
496
497
498
499
500
501
502
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 494

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.



505
506
507
508
509
510
511
512
513
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 505

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.



516
517
518
519
520
521
522
523
524
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 516

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.



527
528
529
530
531
532
533
534
535
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 527

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