Skip to content

Commit 32a936f

Browse files
committed
updated sandbox and Product mutations path
1 parent bc9ce10 commit 32a936f

File tree

12 files changed

+163
-42
lines changed

12 files changed

+163
-42
lines changed

packages/integrations/gei-stripe/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gei-stripe",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "Automatically generated by graphql-editor-cli",
55
"main": "lib/index.js",
66
"scripts": {

packages/integrations/gei-stripe/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { handler as createCustomerPortalHandler } from './Mutation/createCustome
55
import { handler as createCheckoutSessionHandler } from './Mutation/createCheckoutSession.js';
66
import { handler as createNewUserCheckoutSessionHandler } from './Mutation/createNewUserCheckoutSession.js';
77
import { handler as productsHandler } from './Query/products.js';
8-
import { handler as productDefaultPriceHandler } from './StripeProduct/default_price.js';
9-
import { handler as productPricesHandler } from './StripeProduct/prices.js';
8+
import { handler as productDefaultPriceHandler } from './Product/default_price.js';
9+
import { handler as productPricesHandler } from './Product/prices.js';
1010
import { handler as subscriptionsHandler } from './Query/subscriptions.js';
1111
import { handler as attachPaymentMethodHandler } from './Mutation/attachPaymentMethod.js';
1212
import { handler as createConnectAccountHandler } from './Mutation/createConnectAccount.js';

packages/sandboxes/gei-stripe-sandbox/schema.graphql

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,51 @@ type Mutation{
2929
payload: CreateConnectAccountInput!
3030
): Boolean!
3131
"""
32+
Gather payment method id using Stripe.js or a pre-built solution like Stripe Elements
33+
"""
34+
attachPaymentMethod(
35+
payload: AttachPaymentMethodInput!
36+
): Boolean!
37+
setDefaultPaymentMethod(
38+
payload: setDefaultPaymentMethodInput!
39+
): Boolean!
40+
"""
3241
entry point for Weebhooks.
3342
"""
3443
webhook: String
3544
}
3645

46+
input setDefaultPaymentMethodInput{
47+
attachedPaymentMethodId: String!
48+
customerId: String!
49+
}
50+
51+
input AttachPaymentMethodInput {
52+
paymentMethodId: String!
53+
customerId: String!
54+
}
55+
3756
input CreateConnectAccountInput {
38-
type: String!
57+
type: ConnectAccountType!
3958
country: String!
4059
email: String!
41-
business_type: String!
60+
business_type: ConnectAccountBusinessType!
4261
bankAccount: BankAccountInput!
4362
}
4463

64+
enum ConnectAccountBusinessType{
65+
company
66+
government_entity
67+
individual
68+
non_profit
69+
}
70+
71+
enum ConnectAccountType {
72+
standard
73+
express
74+
custom
75+
}
76+
4577
input BankAccountInput {
4678
country: String!
4779
"""
@@ -56,6 +88,7 @@ input BankAccountInput {
5688
Required when attaching the bank account to a Customer
5789
"""
5890
account_holder_name: String!
91+
account_holder_type: BankAccountHolderType!
5992
}
6093

6194
enum BankAccountHolderType {
@@ -118,6 +151,10 @@ input CreateNewUserCheckoutSessionInput{
118151
successUrl: String!
119152
cancelUrl: String!
120153
products: [ProductInput!]!
154+
"""
155+
Define amount to transfer into stripe connect account and set the rest for application fees
156+
"""
157+
applicationFee: ApplicationFeeInput
121158
}
122159

123160
input CreateCheckoutSessionInput{
@@ -138,7 +175,7 @@ input ApplicationFeeInput {
138175
"""
139176
Value from 0-100
140177
"""
141-
application_fee: Int!
178+
feePercentage: Int!
142179
"""
143180
Connect Account (not stripe customer) id
144181
"""

packages/sandboxes/gei-stripe-sandbox/src/models/StripeCustomerModel.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/sandboxes/gei-stripe-sandbox/src/models/StripeCustomerMutationOpsModel.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/sandboxes/gei-stripe-sandbox/src/models/StripeCustomerQueryOpsModel.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/sandboxes/gei-stripe-sandbox/src/models/StripeProductModel.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/sandboxes/gei-stripe-sandbox/src/zeus/const.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,29 @@ export const AllTypesProps: Record<string,any> = {
2424
},
2525
createConnectAccount:{
2626
payload:"CreateConnectAccountInput"
27+
},
28+
attachPaymentMethod:{
29+
payload:"AttachPaymentMethodInput"
30+
},
31+
setDefaultPaymentMethod:{
32+
payload:"setDefaultPaymentMethodInput"
2733
}
34+
},
35+
setDefaultPaymentMethodInput:{
36+
37+
},
38+
AttachPaymentMethodInput:{
39+
2840
},
2941
CreateConnectAccountInput:{
42+
type:"ConnectAccountType",
43+
business_type:"ConnectAccountBusinessType",
3044
bankAccount:"BankAccountInput"
3145
},
46+
ConnectAccountBusinessType: "enum" as const,
47+
ConnectAccountType: "enum" as const,
3248
BankAccountInput:{
33-
49+
account_holder_type:"BankAccountHolderType"
3450
},
3551
BankAccountHolderType: "enum" as const,
3652
SubscriptionFilter:{
@@ -41,7 +57,8 @@ export const AllTypesProps: Record<string,any> = {
4157
address:"AddressInput"
4258
},
4359
CreateNewUserCheckoutSessionInput:{
44-
products:"ProductInput"
60+
products:"ProductInput",
61+
applicationFee:"ApplicationFeeInput"
4562
},
4663
CreateCheckoutSessionInput:{
4764
products:"ProductInput",
@@ -100,6 +117,8 @@ export const ReturnTypes: Record<string,any> = {
100117
createNewUserCheckoutSession:"String",
101118
createCustomerPortal:"String",
102119
createConnectAccount:"Boolean",
120+
attachPaymentMethod:"Boolean",
121+
setDefaultPaymentMethod:"Boolean",
103122
webhook:"String"
104123
},
105124
Subscription:{

0 commit comments

Comments
 (0)