showProductDetails method

Future<PayPalProduct> showProductDetails({
  1. required String product_id,
})

Implementation

Future<PayPalProduct> showProductDetails({
  required String product_id,
})async{
  String response = await SexyAPI(
    url: _url,
    path: "/v1/catalogs/products/$product_id",
    parameters: {},
  ).get(
    headers: {
      "Authorization" : "Bearer ${accessToken.access_token}",
      "Content-Type" : "application/json",
    }
  );
  try{
    return PayPalProduct.parse(_parseResponse(response));
  }catch(err){
    throw response;
  }
}