question

jim-patel avatar image
jim-patel asked kamlakar commented

Can't Delete Modifiers

I have used the API to create a modifier, using InventoryConnector and createModifier. I have tried to use the InventoryConnector and deleteModifier to delete the modifier after I am done with it, but I get a java.lang.SecurityException: Access denied to package [package name].

I attempted to use the REST API and sending an HTTP DELETE as an alternative, but I get an empty response back and the modifier is still there.

Is it not possible for an app to delete a modifier?

5 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

The conversation in this ticket might help you: http://devask.clover.com/question/784...

0 Likes 0 ·
jim-patel avatar image jim-patel commented ·

My app is registered in the app market and currently has all permissions possible. I installed it to my emulator so that Clover is aware of the permissions it has requested. As stated, I'm able to create a Modifier. I am wondering if it is possible to delete one. I assume that since I'm getting a SecurityException that that functionality is locked only to com.clover packages using the Java API.

There is this available to use in the REST API and it doesn't seem to work.

Any assistance would be appreciated.

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

We allow 3rd party apps to both create and delete modifiers. Can you post the contents of logcat with the stacktrace as well as a code snippet for how you are trying to execute the create and delete?

0 Likes 0 ·
jim-patel avatar image jim-patel commented ·

It's too long for a comment, but here's a pastebin link with the Exception stack trace and the relevant code.

http://pastebin.com/Lkj381yR

Here are the Clover Permissions for the app:

Read and modify your Customers data

Read and modify your Employees data

Read and modify your Inventory data

Read and modify your Merchant data

Read and modify your Orders data

Read and modify your Payments data

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

This looks like a bug in our code, I will file a ticket to have this fixed.

0 Likes 0 ·

1 Answer

Jacob Abrams avatar image
Jacob Abrams answered kamlakar commented

Our code is broken, we have a ticket filed and are working on a fix. I will try to update this ticket when it is fixed. If you need an immediate work-around you could use REST API.

UPDATE:

This should be fixed as of 1/20/2016, version 1473 of "Clover" app should have the fix. You can see the version of the apps by going to Settings > Storage > Apps and clicking on the app with the exact name "Clover".

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kamlakar avatar image kamlakar commented ·

Hi, I have updated my Clover to 1476, but still I am facing same issue, Still it is giving "com.clover.sdk.v1.ClientException at com.clover.sdk.v1.ServiceConnector.throwOnFailure(ServiceConnector.java:277) 02-01 19:18:28.753 975-1992/com.table.tablemanagement W/System.err: at com.clover.sdk.v1.ServiceConnector.execute(ServiceConnector.java:210) 02-01 19:18:28.753 975-1992/com.table.tablemanagement W/System.err: at com.clover.sdk.v3.order.OrderConnector.deleteLineItemModifications(OrderConnector.java:343)"

and my order detail is Order Status = open :: Order ID =PP3V82KYNV2TA :: Line

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

This ticket is about InventoryConnector not OrderConnector.

0 Likes 0 ·

Welcome to the
Clover Developer Community