blob: 62a58700116b67b82b552e467eb5c86a2d0979b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
package org.onap.simulator.presetGenerator.presets.aai;
import com.google.common.collect.ImmutableMap;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.onap.simulator.presetGenerator.presets.BasePresets.BaseAAIPreset;
import org.springframework.http.HttpMethod;
public class PresetAAIGetSubDetailsWithoutInstancesGetSpecificService extends BaseAAIPreset {
private String subscriberId;
private String subscriberName = "Emanuel";
public PresetAAIGetSubDetailsWithoutInstancesGetSpecificService(String subscriberId) {
this.subscriberId = subscriberId == null ? "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb" : subscriberId;
}
public PresetAAIGetSubDetailsWithoutInstancesGetSpecificService(String subscriberId, String subscriberName) {
this(subscriberId);
this.subscriberName = subscriberName;
}
@Override
public Map<String, List> getQueryParams() {
return ImmutableMap.of("depth", Collections.singletonList("1"));
}
@Override
public HttpMethod getReqMethod() {
return HttpMethod.GET;
}
@Override
public String getReqPath() {
return getRootPath() + "/business/customers/customer/" + getSubscriberId();
}
public String getSubscriberId() {
return subscriberId;
}
@Override
public Object getResponseBody() {
return "{" +
" \"global-customer-id\":\""+this.subscriberId+"\"," +
" \"subscriber-name\":\""+this.subscriberName+"\"," +
" \"subscriber-type\":\"INFRA\"," +
" \"resource-version\":\"1494255056308\"," +
" \"service-subscriptions\":{" +
" \"service-subscription\":[" +
" {" +
" \"service-type\":\"vFlowLogic\"," +
" \"resource-version\":\"1501700976809\"," +
" \"is-permitted\":false" +
" }," +
" {" +
" \"service-type\":\"TYLER SILVIA\"," +
" \"resource-version\":\"1501700976809\"," +
" \"is-permitted\":false" +
" }" +
" ]" +
" }" +
"}";
}
}
|