Skip to content

Latest commit

 

History

History
370 lines (267 loc) · 24.6 KB

File metadata and controls

370 lines (267 loc) · 24.6 KB

TerminalApplications

(terminalApplications)

Overview

Available Operations

  • create - Create a new terminal application.

To access this endpoint using an access token you'll need to specify the /terminal-applications.write scope.

  • list - List all the terminal applications for a Moov Account.

To access this endpoint using an access token you'll need to specify the /terminal-applications.read scope.

  • get - Fetch a specific terminal application.

To access this endpoint using an access token you'll need to specify the /terminal-applications.read scope.

  • delete - Delete a specific terminal application.

To access this endpoint using an access token you'll need to specify the /terminal-applications.write scope.

create

Create a new terminal application.

To access this endpoint using an access token you'll need to specify the /terminal-applications.write scope.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.terminalApplications.create({
    platform: "ios",
    appBundleID: "com.example.app",
    packageName: "com.example.app",
    sha256Digest: "1234567890",
    versionCode: "1.0.0",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { terminalApplicationsCreate } from "@moovio/sdk/funcs/terminalApplicationsCreate.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await terminalApplicationsCreate(moov, {
    platform: "ios",
    appBundleID: "com.example.app",
    packageName: "com.example.app",
    sha256Digest: "1234567890",
    versionCode: "1.0.0",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request components.CreateTerminalApplication ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.CreateTerminalApplicationResponse>

Errors

Error Type Status Code Content Type
errors.GenericError 400, 409 application/json
errors.TerminalApplicationError 422 application/json
errors.APIError 4XX, 5XX */*

list

List all the terminal applications for a Moov Account.

To access this endpoint using an access token you'll need to specify the /terminal-applications.read scope.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.terminalApplications.list({});

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { terminalApplicationsList } from "@moovio/sdk/funcs/terminalApplicationsList.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await terminalApplicationsList(moov, {});

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.ListTerminalApplicationsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ListTerminalApplicationsResponse>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

get

Fetch a specific terminal application.

To access this endpoint using an access token you'll need to specify the /terminal-applications.read scope.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.terminalApplications.get({
    terminalApplicationID: "12345678-1234-1234-1234-123456789012",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { terminalApplicationsGet } from "@moovio/sdk/funcs/terminalApplicationsGet.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await terminalApplicationsGet(moov, {
    terminalApplicationID: "12345678-1234-1234-1234-123456789012",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetTerminalApplicationRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetTerminalApplicationResponse>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

delete

Delete a specific terminal application.

To access this endpoint using an access token you'll need to specify the /terminal-applications.write scope.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.terminalApplications.delete({
    terminalApplicationID: "12345678-1234-1234-1234-123456789012",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { terminalApplicationsDelete } from "@moovio/sdk/funcs/terminalApplicationsDelete.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await terminalApplicationsDelete(moov, {
    terminalApplicationID: "12345678-1234-1234-1234-123456789012",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.DeleteTerminalApplicationRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.DeleteTerminalApplicationResponse>

Errors

Error Type Status Code Content Type
errors.GenericError 400, 409 application/json
errors.APIError 4XX, 5XX */*