From d99616df5c686d85818ab2dae6238f96183abb94 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Thu, 15 Feb 2024 16:48:29 +0100 Subject: [PATCH] add payment intents --- .../stripe/stg_stripe__payment_intents.sql | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 models/staging/stripe/stg_stripe__payment_intents.sql diff --git a/models/staging/stripe/stg_stripe__payment_intents.sql b/models/staging/stripe/stg_stripe__payment_intents.sql new file mode 100644 index 0000000..b630689 --- /dev/null +++ b/models/staging/stripe/stg_stripe__payment_intents.sql @@ -0,0 +1,53 @@ +with + raw_payment_intents as (select * from {{ source("stripe_uk", "payment_intents") }}), + stg_stripe__payment_intents as ( + select + {{ adapter.quote("id") }}, + {{ adapter.quote("amount") }}, + {{ adapter.quote("object") }}, + {{ adapter.quote("review") }}, + {{ adapter.quote("source") }}, + {{ adapter.quote("status") }}, + {{ adapter.quote("charges") }}, + {{ adapter.quote("created") }}, + {{ adapter.quote("invoice") }}, + {{ adapter.quote("updated") }}, + {{ adapter.quote("currency") }}, + {{ adapter.quote("customer") }}, + {{ adapter.quote("livemode") }}, + {{ adapter.quote("metadata") }}, + {{ adapter.quote("shipping") }}, + {{ adapter.quote("processing") }}, + {{ adapter.quote("application") }}, + {{ adapter.quote("canceled_at") }}, + {{ adapter.quote("description") }}, + {{ adapter.quote("next_action") }}, + {{ adapter.quote("on_behalf_of") }}, + {{ adapter.quote("client_secret") }}, + {{ adapter.quote("latest_charge") }}, + {{ adapter.quote("receipt_email") }}, + {{ adapter.quote("transfer_data") }}, + {{ adapter.quote("amount_details") }}, + {{ adapter.quote("capture_method") }}, + {{ adapter.quote("payment_method") }}, + {{ adapter.quote("transfer_group") }}, + {{ adapter.quote("amount_received") }}, + {{ adapter.quote("amount_capturable") }}, + {{ adapter.quote("last_payment_error") }}, + {{ adapter.quote("setup_future_usage") }}, + {{ adapter.quote("cancellation_reason") }}, + {{ adapter.quote("confirmation_method") }}, + {{ adapter.quote("payment_method_types") }}, + {{ adapter.quote("statement_descriptor") }}, + {{ adapter.quote("statement_description") }}, + {{ adapter.quote("application_fee_amount") }}, + {{ adapter.quote("payment_method_options") }}, + {{ adapter.quote("automatic_payment_methods") }}, + {{ adapter.quote("statement_descriptor_suffix") }}, + {{ adapter.quote("payment_method_configuration_details") }}, + {{ adapter.quote("_airbyte_extracted_at") }} as dwh_loaded_at_date + + from raw_payment_intents + ) +select * +from stg_stripe__payment_intents