first commit

This commit is contained in:
2024-02-28 16:08:07 -05:00
commit 7556d1a75c
32 changed files with 1309 additions and 0 deletions

0
app/create/__init__.py Normal file
View File

41
app/create/views.py Normal file
View File

@@ -0,0 +1,41 @@
from flask import jsonify
import stripe
from app.create import create
@create.route("/create/product", methods=["GET"])
def create_product():
"""
Creates a product
"""
create_a_product = stripe.Product.create(
name="Oil",
active=True,
description="One Gallon of Oil",
shippable=False,
)
return jsonify({
"ok": True,
'info': create_a_product,
}), 200
@create.route("/create/price", methods=["GET"])
def create_product_price():
"""
Sets the price of the product
"""
create_price = stripe.Price.create(
product_data={"name": "Oil"},
unit_amount=350,
currency="usd",
)
return jsonify({
"ok": True,
'info': create_price,
}), 200