You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--README.md
Updated retrieve org data section to contain more links to example files to retrieve products, categories, attributes, makers, models and maker model mappings
--APIv1EndpointOrgRetrieveESDocument.java
Added constants to allow category, maker, maker model, maker model mapping, and attributes to be retrieved.
Modified call method to support pagination, and additional parameters with each data request.
--APIv1ExampleRunnerRetrieveOrgESDDataAttributes.java
Added class to show example of retrieving organisation attribute data from the platform's api.
--APIv1ExampleRunnerRetrieveOrgESDDataCategories.java
Added class to show example of retrieving organisation category data from the platform's api.
--APIv1ExampleRunnerRetrieveOrgESDData.java
Set correct comments in class.
--APIv1ExampleRunnerRetrieveOrgESDDataMakerModelMappings.java
Added class to show example of retrieving organisation maker model mapping data from the platform's api.
--APIv1ExampleRunnerRetrieveOrgESDDataMakerModels.java
Added class to show example of retrieving organisation maker model data from the platform's api.
--APIv1ExampleRunnerRetrieveOrgESDDataMakers.java
Added class to show example of retrieving organisation makers data from the platform's api.
Copy file name to clipboardExpand all lines: src/org/squizz/api/v1/endpoint/APIv1EndpointOrgRetrieveESDocument.java
+48-4Lines changed: 48 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
packageorg.squizz.api.v1.endpoint;
2
2
3
3
/**
4
-
* Copyright (C) 2017 Squizz PTY LTD
4
+
* Copyright (C) 2019 Squizz PTY LTD
5
5
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
6
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7
7
* You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
* Calls the platform's API endpoint and gets organisation data in a Ecommerce Standards Document of a specified type
@@ -39,9 +44,12 @@ public class APIv1EndpointOrgRetrieveESDocument
39
44
* @param retrieveTypeID ID of the type of data to retrieve
40
45
* @param supplierOrgID unique ID of the supplier organisation in the SQUIZZ.com platform to obtain data from
41
46
* @param customerAccountCode code of the supplier organisation's customer account. Customer account only needs to be set if the supplier organisation has assigned multiple accounts to the organisation logged into the API session (customer org) and account specific data is being obtained
47
+
* @param recordsMaxAmount maximum number of records to obtain from the platform
48
+
* @param recordsStartIndex index containing the position of records to start obtaining from the server
49
+
* @param requestParameters set additional parameters to in the request URL. Ensure parameter values are URI encoded
@@ -99,4 +129,18 @@ public static APIv1EndpointResponseESD call(APIv1OrgSession apiOrgSession, int e
99
129
100
130
returnendpointResponse;
101
131
}
132
+
133
+
/**
134
+
* Calls the platform's API endpoint and gets organisation data in a Ecommerce Standards Document of a specified type
135
+
* @param apiOrgSession existing organisation API session
136
+
* @param endpointTimeoutMilliseconds amount of milliseconds to wait after calling the the API before giving up, set a positive number
137
+
* @param retrieveTypeID ID of the type of data to retrieve
138
+
* @param supplierOrgID unique ID of the supplier organisation in the SQUIZZ.com platform to obtain data from
139
+
* @param customerAccountCode code of the supplier organisation's customer account. Customer account only needs to be set if the supplier organisation has assigned multiple accounts to the organisation logged into the API session (customer org) and account specific data is being obtained
Copy file name to clipboardExpand all lines: test/org/squizz/api/v1/example/APIv1ExampleRunnerRetrieveOrgESDData.java
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/**
2
-
* Copyright (C) 2017 Squizz PTY LTD
2
+
* Copyright (C) 2019 Squizz PTY LTD
3
3
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4
4
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5
5
* You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
@@ -75,16 +75,16 @@ public static void main(String[] args)
75
75
System.out.println("FAIL - API session failed to be created. Reason: " + endpointResponse.result_message + " Error Code: " + endpointResponse.result_code);
76
76
}
77
77
78
-
//import organisation data if the API was successfully created
78
+
//retrieve organisation data if the API was successfully created
79
79
if(apiOrgSession.sessionExists())
80
80
{
81
81
//after 60 seconds give up on waiting for a response from the API when creating the notification
82
82
inttimeoutMilliseconds = 60000;
83
83
84
-
//call the platform's API to import in the organisation's data, which for this example is product pricing
84
+
//call the platform's API to retrieve the organisation's data, which for this example is product pricing
0 commit comments