Class: Stripe::BillingPortal::Configuration
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::BillingPortal::Configuration
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/billing_portal/configuration.rb
Overview
A portal configuration describes the functionality and behavior of a portal session.
Defined Under Namespace
Classes: BusinessProfile, CreateParams, Features, ListParams, LoginPage, UpdateParams
Constant Summary collapse
- OBJECT_NAME =
"billing_portal.configuration"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Whether the configuration is active and can be used to create portal sessions.
-
#application ⇒ Object
readonly
ID of the Connect Application that created the configuration.
-
#business_profile ⇒ Object
readonly
Attribute for field business_profile.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#default_return_url ⇒ Object
readonly
The default URL to redirect customers to when they click on the portal’s link to return to your website.
-
#features ⇒ Object
readonly
Attribute for field features.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#is_default ⇒ Object
readonly
Whether the configuration is the default.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#login_page ⇒ Object
readonly
Attribute for field login_page.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#name ⇒ Object
readonly
The name of the configuration.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#updated ⇒ Object
readonly
Time at which the object was last updated.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Creates a configuration that describes the functionality and behavior of a PortalSession.
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of configurations that describe the functionality of the customer portal.
- .object_name ⇒ Object
-
.update(configuration, params = {}, opts = {}) ⇒ Object
Updates a configuration that describes the functionality of the customer portal.
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Save
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#active ⇒ Object (readonly)
Whether the configuration is active and can be used to create portal sessions.
596 597 598 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 596 def active @active end |
#application ⇒ Object (readonly)
ID of the Connect Application that created the configuration.
598 599 600 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 598 def application @application end |
#business_profile ⇒ Object (readonly)
Attribute for field business_profile
600 601 602 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 600 def business_profile @business_profile end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
602 603 604 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 602 def created @created end |
#default_return_url ⇒ Object (readonly)
The default URL to redirect customers to when they click on the portal’s link to return to your website. This can be [overriden](stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
604 605 606 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 604 def default_return_url @default_return_url end |
#features ⇒ Object (readonly)
Attribute for field features
606 607 608 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 606 def features @features end |
#id ⇒ Object (readonly)
Unique identifier for the object.
608 609 610 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 608 def id @id end |
#is_default ⇒ Object (readonly)
Whether the configuration is the default. If ‘true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
610 611 612 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 610 def is_default @is_default end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
612 613 614 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 612 def livemode @livemode end |
#login_page ⇒ Object (readonly)
Attribute for field login_page
614 615 616 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 614 def login_page @login_page end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
616 617 618 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 616 def @metadata end |
#name ⇒ Object (readonly)
The name of the configuration.
618 619 620 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 618 def name @name end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
620 621 622 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 620 def object @object end |
#updated ⇒ Object (readonly)
Time at which the object was last updated. Measured in seconds since the Unix epoch.
622 623 624 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 622 def updated @updated end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Creates a configuration that describes the functionality and behavior of a PortalSession
625 626 627 628 629 630 631 632 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 625 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/billing_portal/configurations", params: params, opts: opts ) end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of configurations that describe the functionality of the customer portal.
635 636 637 638 639 640 641 642 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 635 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing_portal/configurations", params: params, opts: opts ) end |
.object_name ⇒ Object
13 14 15 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 13 def self.object_name "billing_portal.configuration" end |
.update(configuration, params = {}, opts = {}) ⇒ Object
Updates a configuration that describes the functionality of the customer portal.
645 646 647 648 649 650 651 652 |
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 645 def self.update(configuration, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/billing_portal/configurations/%<configuration>s", { configuration: CGI.escape(configuration) }), params: params, opts: opts ) end |