Skip to content

Latest commit

 

History

History
359 lines (239 loc) · 24.6 KB

api.md

File metadata and controls

359 lines (239 loc) · 24.6 KB

Shared

Types:

TopLevel

Types:

Methods:

  • client.topLevel.ping() -> TopLevelPingResponse

Coupons

Types:

Methods:

  • client.coupons.create({ ...params }) -> Coupon
  • client.coupons.list({ ...params }) -> CouponsPage
  • client.coupons.archive(couponId) -> Coupon
  • client.coupons.fetch(couponId) -> Coupon

Subscriptions

Methods:

  • client.coupons.subscriptions.list(couponId, { ...params }) -> SubscriptionsPage

CreditNotes

Types:

Methods:

  • client.creditNotes.create({ ...params }) -> CreditNote
  • client.creditNotes.list({ ...params }) -> CreditNotesPage
  • client.creditNotes.fetch(creditNoteId) -> CreditNote

Customers

Types:

Methods:

Costs

Types:

Methods:

  • client.customers.costs.list(customerId, { ...params }) -> CostListResponse
  • client.customers.costs.listByExternalId(externalCustomerId, { ...params }) -> CostListByExternalIDResponse

Credits

Types:

Methods:

  • client.customers.credits.list(customerId, { ...params }) -> CreditListResponsesPage
  • client.customers.credits.listByExternalId(externalCustomerId, { ...params }) -> CreditListByExternalIDResponsesPage

Ledger

Types:

Methods:

  • client.customers.credits.ledger.list(customerId, { ...params }) -> LedgerListResponsesPage
  • client.customers.credits.ledger.createEntry(customerId, { ...params }) -> LedgerCreateEntryResponse
  • client.customers.credits.ledger.createEntryByExternalId(externalCustomerId, { ...params }) -> LedgerCreateEntryByExternalIDResponse
  • client.customers.credits.ledger.listByExternalId(externalCustomerId, { ...params }) -> LedgerListByExternalIDResponsesPage

TopUps

Types:

Methods:

  • client.customers.credits.topUps.create(customerId, { ...params }) -> TopUpCreateResponse
  • client.customers.credits.topUps.list(customerId, { ...params }) -> TopUpListResponsesPage
  • client.customers.credits.topUps.delete(customerId, topUpId) -> void
  • client.customers.credits.topUps.createByExternalId(externalCustomerId, { ...params }) -> TopUpCreateByExternalIDResponse
  • client.customers.credits.topUps.deleteByExternalId(externalCustomerId, topUpId) -> void
  • client.customers.credits.topUps.listByExternalId(externalCustomerId, { ...params }) -> TopUpListByExternalIDResponsesPage

BalanceTransactions

Types:

Methods:

  • client.customers.balanceTransactions.create(customerId, { ...params }) -> BalanceTransactionCreateResponse
  • client.customers.balanceTransactions.list(customerId, { ...params }) -> BalanceTransactionListResponsesPage

Events

Types:

Methods:

  • client.events.update(eventId, { ...params }) -> EventUpdateResponse
  • client.events.deprecate(eventId) -> EventDeprecateResponse
  • client.events.ingest({ ...params }) -> EventIngestResponse
  • client.events.search({ ...params }) -> EventSearchResponse

Backfills

Types:

Methods:

  • client.events.backfills.create({ ...params }) -> BackfillCreateResponse
  • client.events.backfills.list({ ...params }) -> BackfillListResponsesPage
  • client.events.backfills.close(backfillId) -> BackfillCloseResponse
  • client.events.backfills.fetch(backfillId) -> BackfillFetchResponse
  • client.events.backfills.revert(backfillId) -> BackfillRevertResponse

Volume

Types:

Methods:

  • client.events.volume.list({ ...params }) -> EventVolumes

InvoiceLineItems

Types:

Methods:

  • client.invoiceLineItems.create({ ...params }) -> InvoiceLineItemCreateResponse

Invoices

Types:

Methods:

  • client.invoices.create({ ...params }) -> Invoice
  • client.invoices.update(invoiceId, { ...params }) -> Invoice
  • client.invoices.list({ ...params }) -> InvoicesPage
  • client.invoices.fetch(invoiceId) -> Invoice
  • client.invoices.fetchUpcoming({ ...params }) -> InvoiceFetchUpcomingResponse
  • client.invoices.issue(invoiceId, { ...params }) -> Invoice
  • client.invoices.markPaid(invoiceId, { ...params }) -> Invoice
  • client.invoices.pay(invoiceId) -> Invoice
  • client.invoices.void(invoiceId) -> Invoice

Items

Types:

Methods:

  • client.items.create({ ...params }) -> Item
  • client.items.update(itemId, { ...params }) -> Item
  • client.items.list({ ...params }) -> ItemsPage
  • client.items.fetch(itemId) -> Item

Metrics

Types:

Methods:

  • client.metrics.create({ ...params }) -> BillableMetric
  • client.metrics.update(metricId, { ...params }) -> BillableMetric
  • client.metrics.list({ ...params }) -> BillableMetricsPage
  • client.metrics.fetch(metricId) -> BillableMetric

Plans

Types:

Methods:

  • client.plans.create({ ...params }) -> Plan
  • client.plans.update(planId, { ...params }) -> Plan
  • client.plans.list({ ...params }) -> PlansPage
  • client.plans.fetch(planId) -> Plan

ExternalPlanID

Methods:

  • client.plans.externalPlanId.update(otherExternalPlanId, { ...params }) -> Plan
  • client.plans.externalPlanId.fetch(externalPlanId) -> Plan

Prices

Types:

Methods:

  • client.prices.create({ ...params }) -> Price
  • client.prices.update(priceId, { ...params }) -> Price
  • client.prices.list({ ...params }) -> PricesPage
  • client.prices.evaluate(priceId, { ...params }) -> PriceEvaluateResponse
  • client.prices.fetch(priceId) -> Price

ExternalPriceID

Methods:

  • client.prices.externalPriceId.update(externalPriceId, { ...params }) -> Price
  • client.prices.externalPriceId.fetch(externalPriceId) -> Price

Subscriptions

Types:

Methods:

  • client.subscriptions.create({ ...params }) -> SubscriptionCreateResponse
  • client.subscriptions.update(subscriptionId, { ...params }) -> Subscription
  • client.subscriptions.list({ ...params }) -> SubscriptionsPage
  • client.subscriptions.cancel(subscriptionId, { ...params }) -> SubscriptionCancelResponse
  • client.subscriptions.fetch(subscriptionId) -> Subscription
  • client.subscriptions.fetchCosts(subscriptionId, { ...params }) -> SubscriptionFetchCostsResponse
  • client.subscriptions.fetchSchedule(subscriptionId, { ...params }) -> SubscriptionFetchScheduleResponsesPage
  • client.subscriptions.fetchUsage(subscriptionId, { ...params }) -> SubscriptionUsage
  • client.subscriptions.priceIntervals(subscriptionId, { ...params }) -> SubscriptionPriceIntervalsResponse
  • client.subscriptions.schedulePlanChange(subscriptionId, { ...params }) -> SubscriptionSchedulePlanChangeResponse
  • client.subscriptions.triggerPhase(subscriptionId, { ...params }) -> SubscriptionTriggerPhaseResponse
  • client.subscriptions.unscheduleCancellation(subscriptionId) -> SubscriptionUnscheduleCancellationResponse
  • client.subscriptions.unscheduleFixedFeeQuantityUpdates(subscriptionId, { ...params }) -> SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse
  • client.subscriptions.unschedulePendingPlanChanges(subscriptionId) -> SubscriptionUnschedulePendingPlanChangesResponse
  • client.subscriptions.updateFixedFeeQuantity(subscriptionId, { ...params }) -> SubscriptionUpdateFixedFeeQuantityResponse
  • client.subscriptions.updateTrial(subscriptionId, { ...params }) -> SubscriptionUpdateTrialResponse

Alerts

Types:

Methods:

  • client.alerts.retrieve(alertId) -> Alert
  • client.alerts.update(alertConfigurationId, { ...params }) -> Alert
  • client.alerts.list({ ...params }) -> AlertsPage
  • client.alerts.createForCustomer(customerId, { ...params }) -> Alert
  • client.alerts.createForExternalCustomer(externalCustomerId, { ...params }) -> Alert
  • client.alerts.createForSubscription(subscriptionId, { ...params }) -> Alert
  • client.alerts.disable(alertConfigurationId, { ...params }) -> Alert
  • client.alerts.enable(alertConfigurationId, { ...params }) -> Alert

DimensionalPriceGroups

Types:

Methods:

  • client.dimensionalPriceGroups.create({ ...params }) -> DimensionalPriceGroup
  • client.dimensionalPriceGroups.retrieve(dimensionalPriceGroupId) -> DimensionalPriceGroup
  • client.dimensionalPriceGroups.list({ ...params }) -> DimensionalPriceGroupsPage

ExternalDimensionalPriceGroupID

Methods:

  • client.dimensionalPriceGroups.externalDimensionalPriceGroupId.retrieve(externalDimensionalPriceGroupId) -> DimensionalPriceGroup