Class: Stripe::BillingPortal::Configuration

Inherits:
APIResource show all
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 you embed in a portal session. Related guide: Configure the customer portal.

Defined Under Namespace

Classes: BusinessProfile, Features, LoginPage

Constant Summary collapse

OBJECT_NAME =
"billing_portal.configuration"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods included from APIOperations::Create

create

Methods included from APIOperations::List

list

Methods included from APIOperations::Save

included, #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

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #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

#activeObject (readonly)

Whether the configuration is active and can be used to create portal sessions.



237
238
239
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 237

def active
  @active
end

#applicationObject (readonly)

ID of the Connect Application that created the configuration.



239
240
241
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 239

def application
  @application
end

#business_profileObject (readonly)

Attribute for field business_profile



241
242
243
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 241

def business_profile
  @business_profile
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



243
244
245
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 243

def created
  @created
end

#default_return_urlObject (readonly)

The default URL to redirect customers to when they click on the portal's link to return to your website. This can be overridden when creating the session.



245
246
247
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 245

def default_return_url
  @default_return_url
end

#featuresObject (readonly)

Attribute for field features



247
248
249
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 247

def features
  @features
end

#idObject (readonly)

Unique identifier for the object.



249
250
251
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 249

def id
  @id
end

#is_defaultObject (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.



251
252
253
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 251

def is_default
  @is_default
end

#livemodeObject (readonly)

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.



253
254
255
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 253

def livemode
  @livemode
end

#login_pageObject (readonly)

Attribute for field login_page



255
256
257
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 255

def 
  @login_page
end

#metadataObject (readonly)

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



257
258
259
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 257

def 
  @metadata
end

#nameObject (readonly)

The name of the configuration.



259
260
261
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 259

def name
  @name
end

#objectObject (readonly)

String representing the object's type. Objects of the same type share the same value.



261
262
263
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 261

def object
  @object
end

#updatedObject (readonly)

Time at which the object was last updated. Measured in seconds since the Unix epoch.



263
264
265
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 263

def updated
  @updated
end

Class Method Details

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

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



266
267
268
269
270
271
272
273
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 266

def self.create(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: "/v1/billing_portal/configurations",
    params: params,
    opts: opts
  )
end

.field_remappingsObject



303
304
305
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 303

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



295
296
297
298
299
300
301
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 295

def self.inner_class_types
  @inner_class_types = {
    business_profile: BusinessProfile,
    features: Features,
    login_page: LoginPage,
  }
end

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

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



276
277
278
279
280
281
282
283
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 276

def self.list(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/billing_portal/configurations",
    params: params,
    opts: opts
  )
end

.object_nameObject



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.



286
287
288
289
290
291
292
293
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 286

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