Skip to content
Merged

1390 #1727

Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ private PropertiesEntry getRequestBodyPropertiesItem(Operation operation, OpenAP
bodyContentType = switch (mimeType) {
case "application/json" -> "JSON";
case "application/xml" -> "XML";
case "application/x-www-form-urlencoded" -> "FORM_URLENCODED";
case "application/x-www-form-urlencoded" -> "FORM_URL_ENCODED";
case "application/octet-stream" -> "BINARY";
case "multipart/form-data" -> "FORM_DATA";
default -> "RAW";
Expand Down
177 changes: 177 additions & 0 deletions docs/src/content/docs/reference/components/stripe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---
title: "Stripe"
description: "Stripe is a payment processing platform that allows businesses to accept online payments and manage transactions securely."
---
## Reference
<hr />

Stripe is a payment processing platform that allows businesses to accept online payments and manage transactions securely.


Categories: [payment-processing]


Version: 1

<hr />



## Connections

Version: 1


### Bearer Token

#### Properties

| Name | Type | Control Type | Description |
|:--------------:|:------------:|:--------------------:|:-------------------:|
| Token | STRING | TEXT | |





<hr />



## Triggers


### New Customer
Triggers when a new customer is created.

#### Type: DYNAMIC_WEBHOOK
#### Properties

| Name | Type | Control Type | Description |
|:--------------:|:------------:|:--------------------:|:-------------------:|
null


### Output



Type: OBJECT


#### Properties

| Type | Control Type |
|:------------:|:--------------------:|
| STRING | TEXT |
| STRING | TEXT |
| STRING | TEXT |
| STRING | TEXT |
| STRING | TEXT |
| STRING | TEXT |
| {STRING\(city), STRING\(country), STRING\(line1), STRING\(line2), STRING\(postal_code), STRING\(state)} | OBJECT_BUILDER |







### New Invoice
Triggers on a new invoice.

#### Type: DYNAMIC_WEBHOOK
#### Properties

| Name | Type | Control Type | Description |
|:--------------:|:------------:|:--------------------:|:-------------------:|
null


### Output



Type: OBJECT


#### Properties

| Type | Control Type |
|:------------:|:--------------------:|
| STRING | TEXT |
| STRING | TEXT |
| STRING | TEXT |
| STRING | TEXT |
| STRING | TEXT |
| STRING | TEXT |







<hr />



## Actions


### Create Customer
Creates a new customer.

#### Properties

| Name | Type | Control Type | Description |
|:--------------:|:------------:|:--------------------:|:-------------------:|
| Customer | {STRING\(email), STRING\(name), STRING\(description), STRING\(phone), {STRING\(city), STRING\(country), STRING\(line1), STRING\(line2), STRING\(postal_code), STRING\(state)}\(address)} | OBJECT_BUILDER | |


### Output



Type: OBJECT


#### Properties

| Type | Control Type |
|:------------:|:--------------------:|
| {STRING\(id), STRING\(description), STRING\(email), STRING\(name), STRING\(phone), {STRING\(city), STRING\(country), STRING\(line1), STRING\(line2), STRING\(postal_code), STRING\(state)}\(address)} | OBJECT_BUILDER |






### Create Invoice
Creates a new invoice.

#### Properties

| Name | Type | Control Type | Description |
|:--------------:|:------------:|:--------------------:|:-------------------:|
| Invoice | {STRING\(customer), STRING\(currency), STRING\(description)} | OBJECT_BUILDER | |


### Output



Type: OBJECT


#### Properties

| Type | Control Type |
|:------------:|:--------------------:|
| {STRING\(id), STRING\(customer), STRING\(currency), STRING\(description)} | OBJECT_BUILDER |






1 change: 1 addition & 0 deletions server/apps/server-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ dependencies {
implementation(project(":server:libs:modules:components:shopify"))
implementation(project(":server:libs:modules:components:slack"))
implementation(project(":server:libs:modules:components:spotify"))
implementation(project(":server:libs:modules:components:stripe"))
implementation(project(":server:libs:modules:components:teamwork"))
implementation(project(":server:libs:modules:components:text-helper"))
implementation(project(":server:libs:modules:components:todoist"))
Expand Down
1 change: 1 addition & 0 deletions server/ee/apps/worker-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ dependencies {
implementation(project(":server:libs:modules:components:shopify"))
implementation(project(":server:libs:modules:components:slack"))
implementation(project(":server:libs:modules:components:spotify"))
implementation(project(":server:libs:modules:components:stripe"))
implementation(project(":server:libs:modules:components:teamwork"))
implementation(project(":server:libs:modules:components:text-helper"))
implementation(project(":server:libs:modules:components:todoist"))
Expand Down
136 changes: 136 additions & 0 deletions server/libs/modules/components/stripe/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
openapi: "3.0.1"
info:
title: "Stripe"
description: "Stripe is a payment processing platform that allows businesses to accept online payments and manage transactions securely."
version: "v1"
servers:
- url: "https://api.stripe.com/v1"
paths:
/customers:
post:
summary: "Create Customer"
description: "Creates a new customer."
operationId: "createCustomer"
requestBody:
content:
application/x-www-form-urlencoded:
schema:
title: "Customer"
type: "object"
properties:
email:
type: "string"
description: "Customer’s email address."
maxLength: 512
name:
type: "string"
description: "The customer's full name."
description:
type: "string"
phone:
type: "string"
address:
type: "object"
properties:
city:
type: "string"
country:
type: "string"
line1:
type: "string"
title: "Address Line 1"
line2:
type: "string"
title: "Address Line 2"
postal_code:
type: "string"
title: "Postal Code"
state:
type: "string"
description: "State, country, province, or region."
responses:
200:
description: "Successful operation."
content:
application/json:
schema:
type: "object"
properties:
body:
type: "object"
properties:
id:
type: "string"
description:
type: "string"
email:
type: "string"
name:
type: "string"
phone:
type: "string"
address:
type: "object"
properties:
city:
type: "string"
country:
type: "string"
line1:
type: "string"
line2:
type: "string"
postal_code:
type: "string"
state:
type: "string"
/invoices:
post:
summary: "Create Invoice"
description: "Creates a new invoice."
operationId: "createInvoice"
requestBody:
content:
application/x-www-form-urlencoded:
schema:
title: "Invoice"
type: "object"
required:
- "customer_id"
- "currency"
properties:
customer:
type: "string"
title: "Customer"
description: "Customer who will be billed."
currency:
type: "string"
description: "Currency used for invoice."
description:
type: "string"
description: "Description for the invoice."
responses:
200:
description: "Successful operation."
content:
application/json:
schema:
type: "object"
properties:
body:
type: "object"
properties:
id:
type: "string"
customer:
type: "string"
currency:
type: "string"
description:
type: "string"
components:
securitySchemes:
bearerAuth:
scheme: "bearer"
type: "http"
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright 2023-present ByteChef Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.bytechef.component.stripe;

import static com.bytechef.component.definition.ComponentDsl.component;

import com.bytechef.component.OpenApiComponentHandler;
import com.bytechef.component.definition.ComponentDefinition;
import com.bytechef.component.stripe.action.StripeCreateCustomerAction;
import com.bytechef.component.stripe.action.StripeCreateInvoiceAction;
import com.bytechef.component.stripe.connection.StripeConnection;

/**
* Provides the base implementation for the REST based component.
*
* @generated
*/
public abstract class AbstractStripeComponentHandler implements OpenApiComponentHandler {
private final ComponentDefinition componentDefinition = modifyComponent(
component("stripe")
.title("Stripe")
.description(
"Stripe is a payment processing platform that allows businesses to accept online payments and manage transactions securely."))
.actions(modifyActions(StripeCreateCustomerAction.ACTION_DEFINITION,
StripeCreateInvoiceAction.ACTION_DEFINITION))
.connection(modifyConnection(StripeConnection.CONNECTION_DEFINITION))
.triggers(getTriggers());

@Override
public ComponentDefinition getDefinition() {
return componentDefinition;
}
}
Loading
Loading