-- Fetch all the Charges belonging to the Stripe
-- account of a particular user.
SELECT *
FROM fiber.stripe_charge
WHERE account_id = '{user.stripe_id}'
-- Fetch all the Charges belonging to the Stripe
-- account of a particular user.
SELECT *
FROM fiber.stripe_charge
WHERE account_id = '{user.stripe_id}'
Code
CREATE TABLE fiber.stripe_charge (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
amount DOUBLE PRECISION,
balance_transaction TEXT,
billing_details JSONB,
currency TEXT,
customer TEXT,
description TEXT,
disputed BOOLEAN,
invoice TEXT,
metadata JSONB,
payment_intent TEXT,
payment_method_details JSONB,
receipt_email TEXT,
refunded BOOLEAN,
shipping JSONB,
statement_descriptor TEXT,
statement_descriptor_suffix TEXT,
status TEXT,
object TEXT,
amount_captured DOUBLE PRECISION,
amount_refunded DOUBLE PRECISION,
application TEXT,
application_fee TEXT,
application_fee_amount DOUBLE PRECISION,
calculated_statement_descriptor TEXT,
captured BOOLEAN,
created DOUBLE PRECISION,
failure_balance_transaction TEXT,
failure_code TEXT,
failure_message TEXT,
fraud_details JSONB,
livemode BOOLEAN,
on_behalf_of TEXT,
outcome JSONB,
paid BOOLEAN,
payment_method TEXT,
radar_options JSONB,
receipt_number TEXT,
receipt_url TEXT,
refunds JSONB,
review TEXT,
source_transfer TEXT,
transfer TEXT,
transfer_data JSONB,
transfer_group TEXT
)
CREATE TABLE fiber.stripe_charge (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
amount DOUBLE PRECISION,
balance_transaction TEXT,
billing_details JSONB,
currency TEXT,
customer TEXT,
description TEXT,
disputed BOOLEAN,
invoice TEXT,
metadata JSONB,
payment_intent TEXT,
payment_method_details JSONB,
receipt_email TEXT,
refunded BOOLEAN,
shipping JSONB,
statement_descriptor TEXT,
statement_descriptor_suffix TEXT,
status TEXT,
object TEXT,
amount_captured DOUBLE PRECISION,
amount_refunded DOUBLE PRECISION,
application TEXT,
application_fee TEXT,
application_fee_amount DOUBLE PRECISION,
calculated_statement_descriptor TEXT,
captured BOOLEAN,
created DOUBLE PRECISION,
failure_balance_transaction TEXT,
failure_code TEXT,
failure_message TEXT,
fraud_details JSONB,
livemode BOOLEAN,
on_behalf_of TEXT,
outcome JSONB,
paid BOOLEAN,
payment_method TEXT,
radar_options JSONB,
receipt_number TEXT,
receipt_url TEXT,
refunds JSONB,
review TEXT,
source_transfer TEXT,
transfer TEXT,
transfer_data JSONB,
transfer_group TEXT
)
Model definition