Function SubscriptionsApiFp

  • SubscriptionsApi - functional programming interface

    Export

    Parameters

    Returns {
        cancelSubscription(tilled_account, id, options?) => Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>;
        createSubscription(tilled_account, SubscriptionCreateParams, options?) => Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>;
        getSubscription(tilled_account, id, options?) => Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>;
        listSubscriptions(tilled_account, metadata?, customer_id?, status?, next_payment_at_lte?, next_payment_at_gte?, offset?, limit?, options?) => Promise<((axios?, basePath?) => AxiosPromise<ListSubscriptions200Response>)>;
        pauseSubscription(tilled_account, id, SubscriptionPauseParams, options?) => Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>;
        resumeSubscription(tilled_account, id, options?) => Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>;
        retrySubscription(tilled_account, id, SubscriptionRetryParams, options?) => Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>;
        updateSubscription(tilled_account, id, SubscriptionUpdateParams, options?) => Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>;
    }

    • cancelSubscription:function
      • Cancels a Customer's Subscription immediately. The Customer will not be charged again for the Subscription.

        Summary

        Cancel a Subscription

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • id: string
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>

    • createSubscription:function
      • Creates a new Subscription.

        Summary

        Create a Subscription

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • SubscriptionCreateParams: SubscriptionCreateParams
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>

    • getSubscription:function
      • Retrieves the details of an existing Subscription.

        Summary

        Get a Subscription

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • id: string
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>

    • listSubscriptions:function
      • Returns a list of Subscriptions. The Subscriptions are sorted with the most recently created appearing first.

        Summary

        List all Subscriptions

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • Optional metadata: {
              [key: string]: string;
          }

          `metadata` key-value pairs to filter by. Only exact matches on the key-value pair(s) will be returned. Example: `?metadata[internal_customer_id]=7cb1159d-875e-47ae-a309-319fa7ff395b`.

          • [key: string]: string
        • Optional customer_id: string

          The ID of the customer whose subscriptions will be retrieved.

        • Optional status: ListSubscriptionsStatus

          The status of the subscriptions to retrieve.

        • Optional next_payment_at_lte: string

          Maximum `next_payment_at` value to filter by (inclusive).

        • Optional next_payment_at_gte: string

          Minimum `next_payment_at` value to filter by (inclusive).

        • Optional offset: number

          The (zero-based) offset of the first item in the collection to return.

        • Optional limit: number

          The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.

        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<ListSubscriptions200Response>)>

    • pauseSubscription:function
      • Pauses a Subscription from generating payments until the optionally specified resumes_at date.

        Summary

        Pause a Subscription

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • id: string
        • SubscriptionPauseParams: SubscriptionPauseParams
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>

    • resumeSubscription:function
      • Resumes a paused Subscription immediately. The next charge will occur on the regular billing cycle.

        Summary

        Resume a Subscription

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • id: string
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>

    • retrySubscription:function
      • Retries a subscription payment at the optionally specified next_payment_at date.

        Summary

        Retry a Subscription

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • id: string
        • SubscriptionRetryParams: SubscriptionRetryParams
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>

    • updateSubscription:function
      • Updates an existing Subscription by setting the values of the provided parameters. Any parameters not provided will be left unchanged.

        Summary

        Update a Subscription

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • id: string
        • SubscriptionUpdateParams: SubscriptionUpdateParams
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<Subscription>)>

Generated using TypeDoc