Subversion Repositories SmartDukaan

Rev

Rev 35777 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35777 Rev 35791
Line 139... Line 139...
139
            JsonNode locationsResponse = getAllLocations();
139
            JsonNode locationsResponse = getAllLocations();
140
            JsonNode edges = locationsResponse
140
            JsonNode edges = locationsResponse
141
                    .path("locations")
141
                    .path("locations")
142
                    .path("edges");
142
                    .path("edges");
143
 
143
 
144
            if (edges.isArray() && !edges.isEmpty()) {
144
            if (edges.isArray() && edges.size() > 0) {
145
                String locationId = edges.get(0).path("node").path("id").asText();
145
                String locationId = edges.get(0).path("node").path("id").asText();
146
                logger.info("✅ Using Shopify Location ID: {}", locationId);
146
                logger.info("✅ Using Shopify Location ID: {}", locationId);
147
                return locationId;
147
                return locationId;
148
            } else {
148
            } else {
149
                logger.warn("⚠️ No Shopify locations found.");
149
                logger.warn("⚠️ No Shopify locations found.");