Skip to content

Commit 48d1023

Browse files
yang17Yang Ming
andauthored
implement READ settings-sync API (#498)
* build read settings-sync API * add promotion sync --------- Co-authored-by: Yang Ming <[email protected]>
1 parent f8a6a84 commit 48d1023

File tree

9 files changed

+630
-11
lines changed

9 files changed

+630
-11
lines changed

app/.DS_Store

6 KB
Binary file not shown.

app/code/.DS_Store

6 KB
Binary file not shown.
Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* Copyright (c) Meta Platforms, Inc. and affiliates.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*/
20+
21+
namespace Meta\BusinessExtension\Api;
22+
23+
interface CoreConfigInterface
24+
{
25+
public const DATA_EXTERNAL_BUSINESS_ID = 'externalBusinessId';
26+
27+
/**
28+
* ExternalBusinessId Getter
29+
*
30+
* @return string
31+
*/
32+
public function getExternalBusinessId(): string;
33+
34+
/**
35+
* ExternalBusinessId Setter
36+
*
37+
* @param string $externalBusinessId
38+
* @return void
39+
*/
40+
public function setExternalBusinessId(string $externalBusinessId): void;
41+
42+
/**
43+
* IsOrderSyncEnabled Getter
44+
*
45+
* @return bool
46+
*/
47+
public function isOrderSyncEnabled(): bool;
48+
49+
/**
50+
* IsOrderSyncEnabled Setter
51+
*
52+
* @param bool $val
53+
* @return void
54+
*/
55+
public function setIsOrderSyncEnabled(bool $val): void;
56+
57+
/**
58+
* CatalogSyncEnabled Getter
59+
*
60+
* @return bool
61+
*/
62+
public function isCatalogSyncEnabled(): bool;
63+
64+
/**
65+
* CatalogSyncEnabled Setter
66+
*
67+
* @param bool $val
68+
* @return void
69+
*/
70+
public function setIsCatalogSyncEnabled(bool $val): void;
71+
72+
/**
73+
* IsOnsiteCheckoutEnabled Getter
74+
*
75+
* @return bool
76+
*/
77+
public function isOnsiteCheckoutEnabled(): bool;
78+
79+
/**
80+
* IsOnsiteCheckoutEnabled Setter
81+
*
82+
* @param bool $val
83+
* @return void
84+
*/
85+
public function setIsOnsiteCheckoutEnabled(bool $val): void;
86+
87+
/**
88+
* IsPromotionsSyncEnabled Getter
89+
*
90+
* @return bool
91+
*/
92+
public function isPromotionsSyncEnabled(): bool;
93+
94+
/**
95+
* IsPromotionsSyncEnabled Setter
96+
*
97+
* @param bool $val
98+
* @return void
99+
*/
100+
public function setIsPromotionsSyncEnabled(bool $val): void;
101+
102+
/**
103+
* ProductIdentifierAttr Getter
104+
*
105+
* @return ?string
106+
*/
107+
public function getProductIdentifierAttr(): ?string;
108+
109+
/**
110+
* ExternalBusinessId Setter
111+
*
112+
* @param ?string $val
113+
* @return void
114+
*/
115+
public function setProductIdentifierAttr(?string $val): void;
116+
117+
/**
118+
* ProductIdentifierAttr Getter
119+
*
120+
* @return ?string
121+
*/
122+
public function getOutOfStockThreshold(): ?string;
123+
124+
/**
125+
* ExternalBusinessId Setter
126+
*
127+
* @param ?string $val
128+
* @return void
129+
*/
130+
public function setOutOfStockThreshold(?string $val): void;
131+
132+
/**
133+
* IsCommerceExtensionEnabled Getter
134+
*
135+
* @return bool
136+
*/
137+
public function isCommerceExtensionEnabled(): bool;
138+
139+
/**
140+
* IsOnsiteCheckoutEnabled Setter
141+
*
142+
* @param bool $val
143+
* @return void
144+
*/
145+
public function setIsCommerceExtensionEnabled(bool $val): void;
146+
147+
/**
148+
* FeedId Getter
149+
*
150+
* @return ?string
151+
*/
152+
public function getFeedId(): ?string;
153+
154+
/**
155+
* ExternalBusinessId Setter
156+
*
157+
* @param ?string $val
158+
* @return void
159+
*/
160+
public function setFeedId(?string $val): void;
161+
162+
/**
163+
* InstalledMetaExtensionVersion Getter
164+
*
165+
* @return ?string
166+
*/
167+
public function getInstalledMetaExtensionVersion(): ?string;
168+
169+
/**
170+
* ExternalBusinessId Setter
171+
*
172+
* @param ?string $val
173+
* @return void
174+
*/
175+
public function setInstalledMetaExtensionVersion(?string $val): void;
176+
177+
/**
178+
* GraphApiVersion Getter
179+
*
180+
* @return ?string
181+
*/
182+
public function getGraphApiVersion(): ?string;
183+
184+
/**
185+
* GraphApiVersion Setter
186+
*
187+
* @param ?string $val
188+
* @return void
189+
*/
190+
public function setGraphApiVersion(?string $val): void;
191+
192+
/**
193+
* MagentoVersion Getter
194+
*
195+
* @return ?string
196+
*/
197+
public function getMagentoVersion(): ?string;
198+
199+
/**
200+
* MagentoVersion Setter
201+
*
202+
* @param ?string $val
203+
* @return void
204+
*/
205+
public function setMagentoVersion(?string $val): void;
206+
}

app/code/Meta/BusinessExtension/Api/SettingsWebhookListenerInterface.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@
77
interface SettingsWebhookListenerInterface
88
{
99
/**
10-
* Process settings request
10+
* Process settings POST request
1111
*
1212
* @param SettingsWebhookRequestInterface[] $settingsWebhookRequest
1313
* @return void
1414
*/
1515
public function processSettingsWebhookRequest(array $settingsWebhookRequest);
16+
17+
/**
18+
* Process settings GET request
19+
*
20+
* @param string $externalBusinessId
21+
* @return CoreConfigInterface
22+
*/
23+
public function getCoreConfig(string $externalBusinessId):CoreConfigInterface;
1624
}

0 commit comments

Comments
 (0)