question

James Tickett avatar image
James Tickett asked jackylee commented

Is there a SDK v3 replacement for MerchantConnector?

import com.clover.sdk.v3.order.Order;
import com.clover.sdk.v3.order.OrderConnector;
import com.clover.sdk.v3.inventory.InventoryConnector;
import com.clover.sdk.v1.merchant.Merchant;
import com.clover.sdk.v1.merchant.MerchantConnector;

OrderConnector and InventoryConnector are both still in v3, but I'm using the MerchantConnector from v1 (and consequently the v1 Merchant) and wondered whether there was a new class that took its place?

10 |2000

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

1 Answer

Mike M avatar image
Mike M answered jackylee commented

Sorry, unfortunately, there is only a v1 MerchantConnector. If you need a v3 Merchant object, then you can stub one out by using the v1 Merchant object's Id. This is the same process that would be required to use a v3 Customer when there is only a v1 CustomerConnector. We understand the frustration this may cause though, and we have open engineering tickets to have these connectors updated.

  com.clover.sdk.v1.merchant.Merchant v1Merchant = new MerchantConnector(mContext, mAccount, null).getMerchant();
  com.clover.sdk.v3.merchant.Merchant v3Merchant = new com.clover.sdk.v3.merchant.Merchant().setId(v1Merchant.getId());
1 comment
10 |2000

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

jackylee avatar image jackylee commented ·

Is there anyway I can retrieve a merchant's information that returns a v3 Merchant object? I want to save the owner field in the v3 Merchant object which is not present in the v1 Merchant object.

0 Likes 0 ·

Welcome to the
Clover Developer Community