Skip to content

Commit

Permalink
Update OpenAPI specification
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Jun 21, 2023
1 parent 54661c5 commit f52bc22
Show file tree
Hide file tree
Showing 2 changed files with 244 additions and 0 deletions.
134 changes: 134 additions & 0 deletions openapi/spec3.beta.sdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -9805,6 +9805,77 @@
]
}
},
"customer_session": {
"description": "A customer session allows you to grant client access to Stripe's frontend SDKs (like BillingJs)\ncontrol over a customer.",
"properties": {
"client_secret": {
"description": "The client secret of this customer session. Used on the client to set up secure access to the given `customer`.\n\nThe client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.",
"maxLength": 5000,
"type": "string"
},
"customer": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/customer"
}
],
"description": "The customer the customer session was created for.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/customer"
}
]
}
},
"expires_at": {
"description": "The timestamp at which this customer session will expire.",
"format": "unix-time",
"type": "integer"
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"customer_session"
],
"type": "string"
}
},
"required": [
"client_secret",
"customer",
"expires_at",
"livemode",
"object"
],
"title": "CustomerSessionResourceCustomerSession",
"type": "object",
"x-expandableFields": [
"customer"
],
"x-resourceId": "customer_session",
"x-stripeOperations": [
{
"method_name": "create",
"method_on": "service",
"method_type": "create",
"operation": "post",
"path": "/v1/customer_sessions"
}
],
"x-stripeResource": {
"class_name": "CustomerSession",
"in_package": ""
}
},
"customer_tax": {
"description": "",
"properties": {
Expand Down Expand Up @@ -75469,6 +75540,69 @@
}
}
},
"/v1/customer_sessions": {
"post": {
"description": "<p>Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.</p>",
"operationId": "PostCustomerSessions",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"encoding": {
"expand": {
"explode": true,
"style": "deepObject"
}
},
"schema": {
"additionalProperties": false,
"properties": {
"customer": {
"description": "The ID of an existing customer for which to create the customer session.",
"maxLength": 5000,
"type": "string"
},
"expand": {
"description": "Specifies which fields in the response should be expanded.",
"items": {
"maxLength": 5000,
"type": "string"
},
"type": "array"
}
},
"required": [
"customer"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/customer_session"
}
}
},
"description": "Successful response."
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error response."
}
}
}
},
"/v1/customers": {
"get": {
"description": "<p>Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.</p>",
Expand Down
110 changes: 110 additions & 0 deletions openapi/spec3.beta.sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9397,6 +9397,70 @@ components:
customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction
- >-
customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction
customer_session:
description: >-
A customer session allows you to grant client access to Stripe's
frontend SDKs (like BillingJs)

control over a customer.
properties:
client_secret:
description: >-
The client secret of this customer session. Used on the client to
set up secure access to the given `customer`.


The client secret can be used to provide access to `customer` from
your frontend. It should not be stored, logged, or exposed to anyone
other than the relevant customer. Make sure that you have TLS
enabled on any page that includes the client secret.
maxLength: 5000
type: string
customer:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/customer'
description: The customer the customer session was created for.
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/customer'
expires_at:
description: The timestamp at which this customer session will expire.
format: unix-time
type: integer
livemode:
description: >-
Has the value `true` if the object exists in live mode or the value
`false` if the object exists in test mode.
type: boolean
object:
description: >-
String representing the object's type. Objects of the same type
share the same value.
enum:
- customer_session
type: string
required:
- client_secret
- customer
- expires_at
- livemode
- object
title: CustomerSessionResourceCustomerSession
type: object
x-expandableFields:
- customer
x-resourceId: customer_session
x-stripeOperations:
- method_name: create
method_on: service
method_type: create
operation: post
path: /v1/customer_sessions
x-stripeResource:
class_name: CustomerSession
in_package: ''
customer_tax:
description: ''
properties:
Expand Down Expand Up @@ -69268,6 +69332,52 @@ paths:
schema:
$ref: '#/components/schemas/error'
description: Error response.
/v1/customer_sessions:
post:
description: >-
<p>Creates a customer session object that includes a single-use client
secret that you can use on your front-end to grant client-side API
access for certain customer resources.</p>
operationId: PostCustomerSessions
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
properties:
customer:
description: >-
The ID of an existing customer for which to create the
customer session.
maxLength: 5000
type: string
expand:
description: Specifies which fields in the response should be expanded.
items:
maxLength: 5000
type: string
type: array
required:
- customer
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/customer_session'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
/v1/customers:
get:
description: >-
Expand Down

0 comments on commit f52bc22

Please sign in to comment.