@paysafe/paysafe-wallet-saas-web
    Preparing search index...

    Class DepositService

    Service class for managing deposit related operations.

    Hierarchy

    • ApiService
      • DepositService
    Index

    Methods

    • Requests a deposit status update.

      Parameters

      Returns Promise<CustomerDeposit>

      A promise that resolves to the updated deposit.

      If the HTTP request fails.

      // Example usage:
      depositService.confirm(depositId)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error processing deposit.`);
      });
    • Requests a deposit creation.

      Parameters

      Returns Promise<CustomerDeposit>

      A promise that resolves to the updated deposit.

      If the HTTP request fails.

      // Example usage:
      depositService.create(depositCreate)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error creating deposit.`);
      });
    • Retrieves a deposit by id.

      Parameters

      • id: string

        The id of the deposit.

      Returns Promise<CustomerDeposit>

      A promise that resolves to a deposit.

      If the HTTP request fails.

      // Example usage:
      depositService.get(depositId)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error fetching deposit.`);
      });
    • Retrieves user deposits with pagination metadata.

      Parameters

      Returns Promise<CustomerDepositList>

      A promise that resolves to a deposit list.

      If the HTTP request fails.

      // Example usage:
      depositService.getAll({ limit: 5 })
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error fetching deposits.`);
      });
    • Retrieves all deposit options.

      Returns Promise<PaymentOptionDetails[]>

      A promise that resolves to a list of deposit options.

      If the HTTP request fails.

      // Example usage:
      depositService.getOptions()
      .then((options) => {
      console.log(options);
      })
      .catch((error) => {
      console.error(`Error fetching deposit options.`);
      });
    • Retrieves all paysafecash locations filtered by the parameters in the request.

      Parameters

      Returns Promise<PaysafecashLocation[]>

      A promise that resolves to a list of deposit options.

      If the HTTP request fails.

      // Example usage:
      depositService.getPaysafecashLocations(paysafecashLocationRequest)
      .then((locations) => {
      console.log(locations);
      })
      .catch((error) => {
      console.error(`Error fetching paysafecash locations.`);
      });
    • Creates a deposit preview.

      Parameters

      Returns Promise<CustomerDeposit>

      A promise that resolves to the newly created deposit preview.

      If the HTTP request fails.

      // Example usage:
      depositService.preview(depositRequest)
      .then((deposit) => {
      console.log(deposit);
      })
      .catch((error) => {
      console.error(`Error creating deposit.`);
      });
    • Function

      Retrieves the singleton instance of the DepositService class.

      Returns DepositService

      The singleton instance of the DepositService class.

      // Usage:
      const depositService = DepositService.getInstance();