66import com .sumup .sdk .core .ApiException ;
77import com .sumup .sdk .core .HttpMethod ;
88import com .sumup .sdk .core .RequestOptions ;
9- import java .util .LinkedHashMap ;
10- import java .util .Map ;
119import java .util .Objects ;
1210import java .util .concurrent .CompletableFuture ;
1311
@@ -25,106 +23,43 @@ public MerchantAsyncClient(ApiClient apiClient) {
2523 }
2624
2725 /**
28- * Retrieve a profile
26+ * Retrieve Doing Business As
2927 *
30- * <p>Returns user profile information .
28+ * <p>Retrieves Doing Business As, the public profile of the merchant .
3129 *
32- * <p>Operation ID: GetAccount
33- *
34- * <p>Call the overload that accepts optional parameter objects or RequestOptions to customize
35- * headers, authorization, query values, or timeouts.
36- *
37- * @return CompletableFuture resolved with com.sumup.sdk.models.MerchantAccount parsed response.
38- * @throws ApiException if the SumUp API returns an error.
39- */
40- public CompletableFuture <com .sumup .sdk .models .MerchantAccount > getAccount () throws ApiException {
41- return getAccount (null );
42- }
43-
44- /**
45- * Retrieve a profile
46- *
47- * <p>Returns user profile information.
48- *
49- * <p>Operation ID: GetAccount
30+ * <p>Operation ID: GetDoingBusinessAs
5031 *
51- * @param getAccount Optional query parameters for this request .
32+ * @param merchantCode Short unique identifier for the merchant .
5233 * <p>Call the overload that accepts RequestOptions to customize headers, authorization, or
5334 * request timeout.
54- * @return CompletableFuture resolved with com.sumup.sdk.models.MerchantAccount parsed response.
55- * @throws ApiException if the SumUp API returns an error.
56- */
57- public CompletableFuture <com .sumup .sdk .models .MerchantAccount > getAccount (
58- GetAccountQueryParams getAccount ) throws ApiException {
59- return getAccount (getAccount , null );
60- }
61-
62- /**
63- * Retrieve a profile
64- *
65- * <p>Returns user profile information.
66- *
67- * <p>Operation ID: GetAccount
68- *
69- * @param getAccount Optional query parameters for this request.
70- * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
71- * {@code null} to use client defaults.
72- * @return CompletableFuture resolved with com.sumup.sdk.models.MerchantAccount parsed response.
73- * @throws ApiException if the SumUp API returns an error.
74- */
75- public CompletableFuture <com .sumup .sdk .models .MerchantAccount > getAccount (
76- GetAccountQueryParams getAccount , RequestOptions requestOptions ) throws ApiException {
77- String path = "/v0.1/me" ;
78- Map <String , Object > queryParams = new LinkedHashMap <>();
79- if (getAccount != null ) {
80- queryParams .putAll (getAccount .toMap ());
81- }
82-
83- return this .apiClient .sendAsync (
84- HttpMethod .GET ,
85- path ,
86- queryParams ,
87- null ,
88- null ,
89- new TypeReference <com .sumup .sdk .models .MerchantAccount >() {},
90- requestOptions );
91- }
92-
93- /**
94- * Retrieve DBA
95- *
96- * <p>Retrieves Doing Business As profile.
97- *
98- * <p>Operation ID: GetDoingBusinessAs
99- *
100- * <p>Call the overload that accepts RequestOptions to customize headers, authorization, or
101- * request timeout.
102- *
10335 * @return CompletableFuture resolved with com.sumup.sdk.models.DoingBusinessAsLegacy parsed
10436 * response.
10537 * @throws ApiException if the SumUp API returns an error.
10638 */
107- public CompletableFuture <com .sumup .sdk .models .DoingBusinessAsLegacy > getDoingBusinessAs ()
108- throws ApiException {
109- return getDoingBusinessAs (null );
39+ public CompletableFuture <com .sumup .sdk .models .DoingBusinessAsLegacy > getDoingBusinessAs (
40+ String merchantCode ) throws ApiException {
41+ return getDoingBusinessAs (merchantCode , null );
11042 }
11143
11244 /**
113- * Retrieve DBA
45+ * Retrieve Doing Business As
11446 *
115- * <p>Retrieves Doing Business As profile.
47+ * <p>Retrieves Doing Business As, the public profile of the merchant .
11648 *
11749 * <p>Operation ID: GetDoingBusinessAs
11850 *
51+ * @param merchantCode Short unique identifier for the merchant.
11952 * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
12053 * {@code null} to use client defaults.
12154 * @return CompletableFuture resolved with com.sumup.sdk.models.DoingBusinessAsLegacy parsed
12255 * response.
12356 * @throws ApiException if the SumUp API returns an error.
12457 */
12558 public CompletableFuture <com .sumup .sdk .models .DoingBusinessAsLegacy > getDoingBusinessAs (
126- RequestOptions requestOptions ) throws ApiException {
59+ String merchantCode , RequestOptions requestOptions ) throws ApiException {
60+ Objects .requireNonNull (merchantCode , "merchantCode" );
12761 String path = "/v0.1/me/merchant-profile/doing-business-as" ;
62+ path = path .replace ("{merchant_code}" , ApiClient .urlEncode (String .valueOf (merchantCode )));
12863
12964 return this .apiClient .sendAsync (
13065 HttpMethod .GET ,
@@ -135,122 +70,4 @@ public CompletableFuture<com.sumup.sdk.models.DoingBusinessAsLegacy> getDoingBus
13570 new TypeReference <com .sumup .sdk .models .DoingBusinessAsLegacy >() {},
13671 requestOptions );
13772 }
138-
139- /**
140- * Retrieve a merchant profile
141- *
142- * <p>Retrieves merchant profile data.
143- *
144- * <p>Operation ID: GetMerchantProfile
145- *
146- * <p>Call the overload that accepts RequestOptions to customize headers, authorization, or
147- * request timeout.
148- *
149- * @return CompletableFuture resolved with com.sumup.sdk.models.MerchantProfileLegacy parsed
150- * response.
151- * @throws ApiException if the SumUp API returns an error.
152- */
153- public CompletableFuture <com .sumup .sdk .models .MerchantProfileLegacy > getMerchantProfile ()
154- throws ApiException {
155- return getMerchantProfile (null );
156- }
157-
158- /**
159- * Retrieve a merchant profile
160- *
161- * <p>Retrieves merchant profile data.
162- *
163- * <p>Operation ID: GetMerchantProfile
164- *
165- * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
166- * {@code null} to use client defaults.
167- * @return CompletableFuture resolved with com.sumup.sdk.models.MerchantProfileLegacy parsed
168- * response.
169- * @throws ApiException if the SumUp API returns an error.
170- */
171- public CompletableFuture <com .sumup .sdk .models .MerchantProfileLegacy > getMerchantProfile (
172- RequestOptions requestOptions ) throws ApiException {
173- String path = "/v0.1/me/merchant-profile" ;
174-
175- return this .apiClient .sendAsync (
176- HttpMethod .GET ,
177- path ,
178- null ,
179- null ,
180- null ,
181- new TypeReference <com .sumup .sdk .models .MerchantProfileLegacy >() {},
182- requestOptions );
183- }
184-
185- /**
186- * Retrieve a personal profile
187- *
188- * <p>Retrieves personal profile data.
189- *
190- * <p>Operation ID: GetPersonalProfile
191- *
192- * <p>Call the overload that accepts RequestOptions to customize headers, authorization, or
193- * request timeout.
194- *
195- * @return CompletableFuture resolved with com.sumup.sdk.models.PersonalProfileLegacy parsed
196- * response.
197- * @throws ApiException if the SumUp API returns an error.
198- */
199- public CompletableFuture <com .sumup .sdk .models .PersonalProfileLegacy > getPersonalProfile ()
200- throws ApiException {
201- return getPersonalProfile (null );
202- }
203-
204- /**
205- * Retrieve a personal profile
206- *
207- * <p>Retrieves personal profile data.
208- *
209- * <p>Operation ID: GetPersonalProfile
210- *
211- * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
212- * {@code null} to use client defaults.
213- * @return CompletableFuture resolved with com.sumup.sdk.models.PersonalProfileLegacy parsed
214- * response.
215- * @throws ApiException if the SumUp API returns an error.
216- */
217- public CompletableFuture <com .sumup .sdk .models .PersonalProfileLegacy > getPersonalProfile (
218- RequestOptions requestOptions ) throws ApiException {
219- String path = "/v0.1/me/personal-profile" ;
220-
221- return this .apiClient .sendAsync (
222- HttpMethod .GET ,
223- path ,
224- null ,
225- null ,
226- null ,
227- new TypeReference <com .sumup .sdk .models .PersonalProfileLegacy >() {},
228- requestOptions );
229- }
230-
231- /** Optional query parameters for this request. */
232- public static final class GetAccountQueryParams {
233- private final Map <String , Object > values = new LinkedHashMap <>();
234-
235- /**
236- * Sets the include[] query parameter.
237- *
238- * @param value A list of additional information you want to receive for the user. By default
239- * only personal and merchant profile information will be returned.
240- * @return This GetAccountQueryParams instance.
241- */
242- public GetAccountQueryParams include (java .util .List <com .sumup .sdk .models .IncludeItem > value ) {
243- this .values .put ("include[]" , Objects .requireNonNull (value , "include" ));
244- return this ;
245- }
246-
247- /**
248- * Converts query parameters to a map understood by ApiClient.
249- *
250- * @return Collected query parameters keyed by API name.
251- */
252- Map <String , Object > toMap () {
253- return values ;
254- }
255- }
25673}
0 commit comments