-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from Pinelab-studio/feat/stripe-subscription-…
…cleanup feat(stripe-subscription): Leaner, more extensible subscriptions
- Loading branch information
Showing
46 changed files
with
2,703 additions
and
4,508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
510 changes: 240 additions & 270 deletions
510
packages/vendure-plugin-stripe-subscription/README.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@pinelab/vendure-plugin-stripe-subscription", | ||
"version": "1.4.0", | ||
"version": "2.0.0", | ||
"description": "Vendure plugin for selling subscriptions via Stripe", | ||
"author": "Martijn van de Brug <[email protected]>", | ||
"homepage": "https://pinelab-plugins.com/", | ||
|
62 changes: 62 additions & 0 deletions
62
packages/vendure-plugin-stripe-subscription/src/api/graphql-schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { gql } from 'graphql-tag'; | ||
|
||
/** | ||
* Needed for gql codegen | ||
*/ | ||
const _codegenAdditions = gql` | ||
scalar DateTime | ||
scalar JSON | ||
`; | ||
|
||
export const shopSchemaExtensions = gql` | ||
enum StripeSubscriptionInterval { | ||
week | ||
month | ||
year | ||
} | ||
type StripeSubscription { | ||
name: String! | ||
variantId: ID! | ||
amountDueNow: Int! | ||
priceIncludesTax: Boolean! | ||
recurring: StripeSubscriptionRecurringPayment! | ||
} | ||
type StripeSubscriptionRecurringPayment { | ||
amount: Int! | ||
interval: StripeSubscriptionInterval! | ||
intervalCount: Int! | ||
startDate: DateTime! | ||
endDate: DateTime | ||
} | ||
enum StripeSubscriptionIntentType { | ||
PaymentIntent | ||
SetupIntent | ||
} | ||
type StripeSubscriptionIntent { | ||
clientSecret: String! | ||
intentType: StripeSubscriptionIntentType! | ||
} | ||
extend type PaymentMethodQuote { | ||
stripeSubscriptionPublishableKey: String | ||
} | ||
extend type Query { | ||
previewStripeSubscriptions( | ||
productVariantId: ID! | ||
customInputs: JSON | ||
): [StripeSubscription!]! | ||
previewStripeSubscriptionsForProduct( | ||
productId: ID! | ||
customInputs: JSON | ||
): [StripeSubscription!]! | ||
} | ||
extend type Mutation { | ||
createStripeSubscriptionIntent: StripeSubscriptionIntent! | ||
} | ||
`; |
182 changes: 0 additions & 182 deletions
182
packages/vendure-plugin-stripe-subscription/src/api/graphql-schemas.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.