HookSniffAPI.Api.Billing (HookSniff v0.3.0)

Copy Markdown View Source

API calls for all endpoints tagged Billing.

Summary

Functions

billing_invoices_get(connection, opts \\ [])

@spec billing_invoices_get(
  Tesla.Env.client(),
  keyword()
) :: {:ok, [HookSniffAPI.Model.InvoiceResponse.t()]} | {:error, Tesla.Env.t()}

List invoices

Parameters

  • connection (HookSniffAPI.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, [%InvoiceResponse{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

billing_portal_post(connection, opts \\ [])

@spec billing_portal_post(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, HookSniffAPI.Model.BillingPortalPost200Response.t()}
  | {:error, Tesla.Env.t()}

Open customer billing portal

Parameters

  • connection (HookSniffAPI.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, HookSniffAPI.Model.BillingPortalPost200Response.t} on success
  • {:error, Tesla.Env.t} on failure

billing_subscription_get(connection, opts \\ [])

@spec billing_subscription_get(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, HookSniffAPI.Model.SubscriptionResponse.t()} | {:error, Tesla.Env.t()}

Get current subscription

Parameters

  • connection (HookSniffAPI.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, HookSniffAPI.Model.SubscriptionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

billing_upgrade_post(connection, upgrade_request, opts \\ [])

@spec billing_upgrade_post(
  Tesla.Env.client(),
  HookSniffAPI.Model.UpgradeRequest.t(),
  keyword()
) ::
  {:ok, HookSniffAPI.Model.UpgradeResponse.t()} | {:error, Tesla.Env.t()}

Upgrade plan

Parameters

  • connection (HookSniffAPI.Connection): Connection to server
  • upgrade_request (UpgradeRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, HookSniffAPI.Model.UpgradeResponse.t} on success
  • {:error, Tesla.Env.t} on failure

billing_usage_get(connection, opts \\ [])

@spec billing_usage_get(
  Tesla.Env.client(),
  keyword()
) :: {:ok, HookSniffAPI.Model.UsageResponse.t()} | {:error, Tesla.Env.t()}

Get current usage

Parameters

  • connection (HookSniffAPI.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, HookSniffAPI.Model.UsageResponse.t} on success
  • {:error, Tesla.Env.t} on failure

billing_webhook_iyzico_post(connection, body, opts \\ [])

@spec billing_webhook_iyzico_post(
  Tesla.Env.client(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

iyzico webhook receiver

Parameters

  • connection (HookSniffAPI.Connection): Connection to server
  • body (map()):
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

billing_webhook_polar_post(connection, body, opts \\ [])

@spec billing_webhook_polar_post(
  Tesla.Env.client(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Polar.sh webhook receiver

Parameters

  • connection (HookSniffAPI.Connection): Connection to server
  • body (map()):
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

billing_webhook_post(connection, body, opts \\ [])

@spec billing_webhook_post(
  Tesla.Env.client(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Stripe webhook receiver

Parameters

  • connection (HookSniffAPI.Connection): Connection to server
  • body (map()):
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure