Skip to content

Commit eef33c3

Browse files
authored
feat: Adds support for product marketing_features field (#134)
1 parent b026a31 commit eef33c3

File tree

5 files changed

+6
-0
lines changed

5 files changed

+6
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE IF EXISTS stripe.products ADD COLUMN IF NOT EXISTS marketing_features JSONB;
2+

src/schemas/product.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const productSchema: JsonSchema = {
1212
name: { type: 'string' },
1313
created: { type: 'integer' },
1414
images: { type: 'object' },
15+
marketing_features: { type: 'object' },
1516
livemode: { type: 'boolean' },
1617
package_dimensions: { type: 'object' },
1718
shippable: { type: 'boolean' },

test/helpers/stripe.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ export default {
548548
created: 1623149335,
549549
description: null,
550550
images: [],
551+
marketing_features: [],
551552
livemode: false,
552553
metadata: {},
553554
name: 'fake product',

test/stripe/product_created.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"created": 1623149335,
1313
"description": null,
1414
"images": [],
15+
"marketing_features": [],
1516
"livemode": false,
1617
"metadata": {},
1718
"name": "fake product",

test/stripe/product_updated.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"created": 1612339919,
1313
"description": "Test",
1414
"images": [],
15+
"marketing_features": [],
1516
"livemode": false,
1617
"metadata": {},
1718
"name": "Pro tier",

0 commit comments

Comments
 (0)