Skip to content

Commit

Permalink
updated sandbox and Product mutations path
Browse files Browse the repository at this point in the history
  • Loading branch information
Matnabru committed Aug 3, 2023
1 parent bc9ce10 commit 32a936f
Show file tree
Hide file tree
Showing 12 changed files with 163 additions and 42 deletions.
2 changes: 1 addition & 1 deletion packages/integrations/gei-stripe/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gei-stripe",
"version": "0.3.2",
"version": "0.3.3",
"description": "Automatically generated by graphql-editor-cli",
"main": "lib/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/integrations/gei-stripe/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { handler as createCustomerPortalHandler } from './Mutation/createCustome
import { handler as createCheckoutSessionHandler } from './Mutation/createCheckoutSession.js';
import { handler as createNewUserCheckoutSessionHandler } from './Mutation/createNewUserCheckoutSession.js';
import { handler as productsHandler } from './Query/products.js';
import { handler as productDefaultPriceHandler } from './StripeProduct/default_price.js';
import { handler as productPricesHandler } from './StripeProduct/prices.js';
import { handler as productDefaultPriceHandler } from './Product/default_price.js';
import { handler as productPricesHandler } from './Product/prices.js';
import { handler as subscriptionsHandler } from './Query/subscriptions.js';
import { handler as attachPaymentMethodHandler } from './Mutation/attachPaymentMethod.js';
import { handler as createConnectAccountHandler } from './Mutation/createConnectAccount.js';
Expand Down
43 changes: 40 additions & 3 deletions packages/sandboxes/gei-stripe-sandbox/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,51 @@ type Mutation{
payload: CreateConnectAccountInput!
): Boolean!
"""
Gather payment method id using Stripe.js or a pre-built solution like Stripe Elements
"""
attachPaymentMethod(
payload: AttachPaymentMethodInput!
): Boolean!
setDefaultPaymentMethod(
payload: setDefaultPaymentMethodInput!
): Boolean!
"""
entry point for Weebhooks.
"""
webhook: String
}

input setDefaultPaymentMethodInput{
attachedPaymentMethodId: String!
customerId: String!
}

input AttachPaymentMethodInput {
paymentMethodId: String!
customerId: String!
}

input CreateConnectAccountInput {
type: String!
type: ConnectAccountType!
country: String!
email: String!
business_type: String!
business_type: ConnectAccountBusinessType!
bankAccount: BankAccountInput!
}

enum ConnectAccountBusinessType{
company
government_entity
individual
non_profit
}

enum ConnectAccountType {
standard
express
custom
}

input BankAccountInput {
country: String!
"""
Expand All @@ -56,6 +88,7 @@ input BankAccountInput {
Required when attaching the bank account to a Customer
"""
account_holder_name: String!
account_holder_type: BankAccountHolderType!
}

enum BankAccountHolderType {
Expand Down Expand Up @@ -118,6 +151,10 @@ input CreateNewUserCheckoutSessionInput{
successUrl: String!
cancelUrl: String!
products: [ProductInput!]!
"""
Define amount to transfer into stripe connect account and set the rest for application fees
"""
applicationFee: ApplicationFeeInput
}

input CreateCheckoutSessionInput{
Expand All @@ -138,7 +175,7 @@ input ApplicationFeeInput {
"""
Value from 0-100
"""
application_fee: Int!
feePercentage: Int!
"""
Connect Account (not stripe customer) id
"""
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

23 changes: 21 additions & 2 deletions packages/sandboxes/gei-stripe-sandbox/src/zeus/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,29 @@ export const AllTypesProps: Record<string,any> = {
},
createConnectAccount:{
payload:"CreateConnectAccountInput"
},
attachPaymentMethod:{
payload:"AttachPaymentMethodInput"
},
setDefaultPaymentMethod:{
payload:"setDefaultPaymentMethodInput"
}
},
setDefaultPaymentMethodInput:{

},
AttachPaymentMethodInput:{

},
CreateConnectAccountInput:{
type:"ConnectAccountType",
business_type:"ConnectAccountBusinessType",
bankAccount:"BankAccountInput"
},
ConnectAccountBusinessType: "enum" as const,
ConnectAccountType: "enum" as const,
BankAccountInput:{

account_holder_type:"BankAccountHolderType"
},
BankAccountHolderType: "enum" as const,
SubscriptionFilter:{
Expand All @@ -41,7 +57,8 @@ export const AllTypesProps: Record<string,any> = {
address:"AddressInput"
},
CreateNewUserCheckoutSessionInput:{
products:"ProductInput"
products:"ProductInput",
applicationFee:"ApplicationFeeInput"
},
CreateCheckoutSessionInput:{
products:"ProductInput",
Expand Down Expand Up @@ -100,6 +117,8 @@ export const ReturnTypes: Record<string,any> = {
createNewUserCheckoutSession:"String",
createCustomerPortal:"String",
createConnectAccount:"Boolean",
attachPaymentMethod:"Boolean",
setDefaultPaymentMethod:"Boolean",
webhook:"String"
},
Subscription:{
Expand Down
Loading

0 comments on commit 32a936f

Please sign in to comment.