Edits history of script submission #265 for ' Get recently added customers (stripe)'

  • deno
    One script reply has been approved by the moderators
    Ap­pro­ved
    import {
      getState,
      setState,
    } from "https://deno.land/x/[email protected]/mod.ts";
    import Stripe from "https://esm.sh/[email protected]?target=deno";
    
    type Stripe = {
      token: string;
    };
    export async function main(auth: Stripe) {
      const stripe = new Stripe(auth.token, {
        httpClient: Stripe.createFetchHttpClient(),
      });
      const lastCheck = (await getState()) || 0;
      await setState(Date.now());
      const customers = await stripe.customers.list({
        created: { gt: lastCheck },
      });
      return customers.data;
    }
    

    Submitted by hugo697 386 days ago

  • deno
    import {
      getState,
      setState,
    } from "https://deno.land/x/[email protected]/mod.ts";
    import Stripe from "https://esm.sh/[email protected]?target=deno";
    
    type Stripe = {
      token: string;
    };
    export async function main(auth: Stripe) {
      const stripe = new Stripe(auth.token, {
        httpClient: Stripe.createFetchHttpClient(),
      });
      const lastCheck = (await getState()) || 0;
      await setState(Date.now());
      const customers = await stripe.customers.list({
        created: { gt: lastCheck },
      });
      return customers.data;
    }
    

    Submitted by admin 1018 days ago

  • deno
    import { getState, setState } from "https://deno.land/x/[email protected]/mod.ts"
    import Stripe from "https://esm.sh/[email protected]?target=deno"
    
    type Stripe = {
      token: string;
    };
    export async function main(auth: Stripe) {
      const stripe = new Stripe(
        auth.token,
        { httpClient: Stripe.createFetchHttpClient() }
      )
      const lastCheck = await getState() || 0
      await setState(Date.now())
      const customers = await stripe.customers.list({
        created: { gt: lastCheck }
      })
      return customers.data
    }
    

    Submitted by admin 1022 days ago

  • deno
    import { Resource, getState, setState } from "https://deno.land/x/[email protected]/mod.ts"
    import Stripe from "https://esm.sh/[email protected]?target=deno"
    
    export async function main(auth: Resource<'stripe'>) {
      const stripe = new Stripe(
        auth.token,
        { httpClient: Stripe.createFetchHttpClient() }
      )
      const lastCheck = await getState() || 0
      await setState(Date.now())
      const customers = await stripe.customers.list({
        created: { gt: lastCheck }
      })
      return customers.data
    }
    

    Submitted by adam186 1150 days ago

  • deno
    import { Resource, getState, setState } from "https://deno.land/x/[email protected]/mod.ts"
    import Stripe from "https://esm.sh/[email protected]?target=deno"
    
    export async function main(auth: Resource<'stripe'>) {
      const stripe = new Stripe(
        auth.token,
        { httpClient: Stripe.createFetchHttpClient() }
      )
      const lastCheck = await getState() || 0
      await setState(Date.now())
      const customers = await stripe.customers.list({
        created: { gt: lastCheck }
      })
      return customers.data
    }
    

    Submitted by adam186 1185 days ago

  • deno
    import { Resource, getState, setState } from "https://deno.land/x/[email protected]/mod.ts"
    import Stripe from "https://esm.sh/[email protected]?target=deno"
    
    export async function main(auth: Resource<'stripe'>) {
      const stripe = new Stripe(
        auth.token,
        { httpClient: Stripe.createFetchHttpClient() }
      )
      const lastCheck = await getState() || 0
      await setState(Date.now())
      const customers = await stripe.customers.list({
        created: { gt: lastCheck }
      })
      return customers.data
    }
    

    Submitted by adam186 1253 days ago

  • deno
    import { Resource, getState, setState } from "https://deno.land/x/[email protected]/mod.ts"
    import Stripe from "https://esm.sh/[email protected]?target=deno"
    
    export async function main(auth: Resource<'stripe'>) {
      const stripe = new Stripe(
        auth.token,
        { httpClient: Stripe.createFetchHttpClient() }
      )
      const lastCheck = await getState()
      await setState(Date.now())
      const customers = await stripe.customers.list({
        created: { gt: lastCheck }
      })
      return customers.data
    }
    

    Submitted by adam186 1253 days ago

  • deno
    import { Resource, getState, setState } from "https://deno.land/x/[email protected]/mod.ts"
    import Stripe from "https://esm.sh/[email protected]?target=deno"
    
    export async function main(
      auth: Resource<'stripe'>
    ) {
      const stripe = new Stripe(
        auth.token,
        { httpClient: Stripe.createFetchHttpClient() }
      )
      const lastCheck = await getState()
      await setState(Date.now())
      const customers = await stripe.customers.list({
        created: { gt: lastCheck }
      })
      return customers.data
    }
    

    Submitted by adam186 1253 days ago