Delete Product

payments/delete-product@1.0.0
Supported by 1 provider
S

Delete Product

Deletes a product in a payment system.

Input
ID

1.Choose a provider

2.Use DeleteProduct with mock in your code

npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('payments/delete-product@1.0.0');

  // Use the profile
  const result = await profile
    .getUseCase('DeleteProduct')
    .perform({
      productId: ''
    }, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Input (object)

productId
Unique identifier of the product to be deleted.

Example

{
  "productId": ""
}

Implementation details

Provider
mock
Use case
DeleteProduct
Author
@superface
Source
Verified