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



500
501
502
503
504
505
506
507
508
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 500

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.



511
512
513
514
515
516
517
518
519
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 511

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.



522
523
524
525
526
527
528
529
530
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 522

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.



533
534
535
536
537
538
539
540
541
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 533

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