Skip to content

Commit 5e6bf94

Browse files
author
Maria Farooq
committed
removed org id from account api response #2073
1 parent 6f04f27 commit 5e6bf94

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

Diff for: restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/converter/AccountConverter.java

-14
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public void marshal(final Object object, final HierarchicalStreamWriter writer,
6767
writeDateUpdated(account.getDateUpdated(), writer);
6868
writeAuthToken(account, writer);
6969
writeUri(account.getUri(), writer);
70-
writeOrganizationSid(account, writer);
7170
writeSubResourceUris(account, writer);
7271
writer.endNode();
7372
}
@@ -85,7 +84,6 @@ public JsonElement serialize(final Account account, final Type type, final JsonS
8584
writeDateUpdated(account.getDateUpdated(), object);
8685
writeAuthToken(account, object);
8786
writeUri(account, object);
88-
writeOrganizationSid(account, object);
8987
writeSubResourceUris(account, object);
9088
return object;
9189
}
@@ -118,18 +116,6 @@ private void writeAuthToken(final Account account, final JsonObject object) {
118116
object.addProperty("auth_token", account.getAuthToken());
119117
}
120118

121-
private void writeOrganizationSid(final Account account, final HierarchicalStreamWriter writer) {
122-
writer.startNode("OrganizationSid");
123-
String organizationSid = account.getOrganizationSid() == null ? "" : account.getOrganizationSid().toString();
124-
writer.setValue(organizationSid);
125-
writer.endNode();
126-
}
127-
128-
private void writeOrganizationSid(final Account account, final JsonObject object) {
129-
String organizationSid = account.getOrganizationSid() == null ? "" : account.getOrganizationSid().toString();
130-
object.addProperty("organization_sid", organizationSid);
131-
}
132-
133119
private void writeAvailablePhoneNumbers(final Account account, final HierarchicalStreamWriter writer) {
134120
writer.startNode("AvailablePhoneNumbers");
135121
writer.setValue(prefix(account) + "/AvailablePhoneNumbers");

Diff for: restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/http/AccountsEndpointTest.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ public class AccountsEndpointTest extends EndpointTest {
100100
SipPhone thinhPhone;
101101
//String thinhContact = "sip:[email protected]:5090";
102102

103-
private final Object DEFAULT_ORG_SID = "ORafbe225ad37541eba518a74248f0ac4c";
104-
105103
@BeforeClass
106104
public static void beforeClass() {
107105
tool1 = new SipStackTool("AccountsEndpointTest");
@@ -161,9 +159,7 @@ public void testCreateAccount() {
161159
adminUsername, adminAuthToken, createdUsernanme, createdPassword);
162160
JsonObject getAccountResponse = RestcommAccountsTool.getInstance().getAccount(deploymentUrl.toString(), adminUsername,
163161
adminAuthToken, createdUsernanme);
164-
assertTrue(getAccountResponse.get("sid").getAsString().equals(createdAccountSid));
165-
// account should be assigned a default org
166-
assertTrue(getAccountResponse.get("organization_sid").getAsString().equals(DEFAULT_ORG_SID));
162+
assertTrue(getAccountResponse.get("sid").getAsString().equals(createdAccountSid));
167163
assertEquals(createdAuthToken, getAccountResponse.get("auth_token").getAsString());
168164
assertTrue(createAccountResponse.get("sid").getAsString().equals(createdAccountSid));
169165
assertEquals(createdAuthToken, createAccountResponse.get("auth_token").getAsString());

0 commit comments

Comments
 (0)