Skip to content

Instantly share code, notes, and snippets.

@john-osullivan
Created September 16, 2019 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save john-osullivan/a882dde107182c6c5f82af934bd8df3d to your computer and use it in GitHub Desktop.
Save john-osullivan/a882dde107182c6c5f82af934bd8df3d to your computer and use it in GitHub Desktop.
Dev Diaries #2 - StripeTypes Import
import API from '@eximchain/dappbot-api-client';
import Payment, { StripeTypes } from '@eximchain/dappbot-types/spec/methods/payment';
// Nested namespaces make for legible collision-free names
const res:Payment.Read.Response = await API.payment.read.call();
// Helper namespace cuts down on extra text
const subscription:StripeTypes.Subscription = res.data.subscription;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment