question

q-factor avatar image
q-factor asked Lee Tickett answered

MerchantConnector for V3 merchant object

Trying to get the order types (using the sdk) for a merchant, from the v3 Merchant object, using the v1 merchant connector (since there is no merchant connector in v3). But this merchant connector uses the v1 Merchant which doesn't seem to have an order Types property, or any way to get it.

Merchant
10 |2000

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered u1 commented

Your observations are correct. There's no V3 merchant service to back the V3 REST endpoint. You will need to call the V3 REST endpoint directly. The response can be parsed directly by the V3 com.clover.sdk.v3.merchant.Merchant object (use the String) argument constructor.

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.

u1 avatar image u1 commented ·

@jeff are you implying that the V3 REST is more mature than the android sdk?

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

Yes, that's correct. The Android SDK is ultimately backed by the REST endpoint, so they must exist first which is why the Android SDK will sometimes lag behind, or in some cases not exist if the demand is there since the REST endpoint is always a fallback (albeit less convenient in some cases).

0 Likes 0 ·
marain avatar image
marain answered q-factor commented

Hi,

I was able to get the v3 Merchant using AppsConnector:

App app = appsConnector.getApp();
Merchant merchant = app.getMerchant();

using latest sdk:

compile 'com.clover.sdk:clover-android-sdk:latest.release'
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.

q-factor avatar image q-factor commented ·

Got the v3 Merchant object fine this way, but the getOrderTypes() method returned null. Only the REST endpoint is there in the ordertype property of this v3 merchant object. When called that REST endpoint directly like @jeff mentioned, got it. Any difference in this merchant object got from the AppConnector?

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

It doesn't look like order types are expanded in the Merchant object that's fetched via the apps connector.

0 Likes 0 ·
Lee Tickett avatar image
Lee Tickett answered
Is there any update on this? Is it possible to get the list of order types using the SDK?
Why is there still no v3 merchant connector?
10 |2000

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

Welcome to the
Clover Developer Community