Skip to content

Commit 6d51775

Browse files
authored
Merge branch 'main' into SWI-3111
2 parents feeff76 + 716152f commit 6d51775

File tree

12 files changed

+487
-5
lines changed

12 files changed

+487
-5
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Global rule:
2-
* @Bandwidth/dx
2+
* @Bandwidth/band-swi @Bandwidth/band-swi-github-repo-admin

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,28 @@ peer.getTn("number");
324324
peer.moveTns(sipPeerTelephoneNumbers);
325325
```
326326

327+
### Enable SMS Settings
328+
```java
329+
// Zone1 for US & Canada enabled by default
330+
SipPeerSmsFeature settings = new SipPeerSmsFeature();
331+
settings.setTollFree(true);
332+
settings.setShortCode(true);
333+
peer.enableSms(settings);
334+
```
335+
336+
### Enable MMS
337+
```java
338+
peer.enableMms();
339+
```
340+
341+
### Associate a SipPeer with a Messaging Application
342+
```java
343+
SipPeerMessagingApplicationsSettings settings = new SipPeerMessagingApplicationsSettings();
344+
settings.setApplicationId("abcd-1234");
345+
346+
peer.updateMessagingApplicationSettings(settings);
347+
```
348+
327349
## Sites
328350

329351
### Create A Site
@@ -746,3 +768,4 @@ query.put("tn", "9199918388");
746768

747769
TnOptionOrders response = TnOptions.list(client, query);
748770
```
771+

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.bandwidth.sdk</groupId>
66
<artifactId>bandwidth-java-iris-sdk</artifactId>
7-
<version>4.0.0</version>
7+
<version>4.1.2</version>
88
<packaging>jar</packaging>
99
<name>bandwidth-java-iris-sdk</name>
1010
<description>Java SDK for use with the IRIS API.</description>
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
package com.bandwidth.iris.sdk.model;
2+
3+
import javax.xml.bind.annotation.XmlAccessType;
4+
import javax.xml.bind.annotation.XmlAccessorType;
5+
import javax.xml.bind.annotation.XmlElement;
6+
import javax.xml.bind.annotation.XmlRootElement;
7+
8+
@XmlRootElement(name = "CombinedSearchAndOrderType")
9+
@XmlAccessorType(XmlAccessType.FIELD)
10+
public class CombinedSearchAndOrderType extends BaseOrderType {
11+
@XmlElement(name = "AreaCode")
12+
private String areaCode;
13+
14+
public String getAreaCode() {
15+
return areaCode;
16+
}
17+
18+
@XmlElement(name = "City")
19+
private String city;
20+
21+
public String getCity() {
22+
return city;
23+
}
24+
25+
public void setCity(String city) {
26+
this.city = city;
27+
}
28+
29+
@XmlElement(name = "EnableLCA")
30+
private Boolean enableLCA;
31+
32+
public Boolean isEnableLCA() {
33+
return enableLCA;
34+
}
35+
36+
public void setEnableLCA(Boolean enableLCA) {
37+
this.enableLCA = enableLCA;
38+
}
39+
40+
@XmlElement(name = "EndsIn")
41+
private Boolean endsIn;
42+
43+
public Boolean isEndsIn() {
44+
return endsIn;
45+
}
46+
47+
public void setEndsIn(Boolean endsIn) {
48+
this.endsIn = endsIn;
49+
}
50+
51+
@XmlElement(name = "LATA")
52+
private String lata;
53+
54+
public String getLata() {
55+
return lata;
56+
}
57+
58+
public void setLata(String lata) {
59+
this.lata = lata;
60+
}
61+
62+
@XmlElement(name = "LocalVanity")
63+
private String localVanity;
64+
65+
public String getLocalVanity() {
66+
return localVanity;
67+
}
68+
69+
public void setLocalVanity(String localVanity) {
70+
this.localVanity = localVanity;
71+
}
72+
73+
@XmlElement(name = "NpaNxx")
74+
private String npaNxx;
75+
76+
public String getNpaNxx() {
77+
return npaNxx;
78+
}
79+
80+
public void setNpaNxx(String npaNxx) {
81+
this.npaNxx = npaNxx;
82+
}
83+
84+
@XmlElement(name = "NpaNxxX")
85+
private String npaNxxX;
86+
87+
public String getNpaNxxX() {
88+
return npaNxxX;
89+
}
90+
91+
public void setNpaNxxX(String npaNxxX) {
92+
this.npaNxxX = npaNxxX;
93+
}
94+
95+
@XmlElement(name = "Quantity")
96+
private int quantity;
97+
98+
public int getQuantity() {
99+
return quantity;
100+
}
101+
102+
public void setQuantity(int quantity) {
103+
this.quantity = quantity;
104+
}
105+
106+
@XmlElement(name = "RateCenter")
107+
private String rateCenter;
108+
109+
public String getRateCenter() {
110+
return rateCenter;
111+
}
112+
113+
public void setRateCenter(String rateCenter) {
114+
this.rateCenter = rateCenter;
115+
}
116+
117+
@XmlElement(name = "State")
118+
private String state;
119+
120+
public String getState() {
121+
return state;
122+
}
123+
124+
public void setState(String state) {
125+
this.state = state;
126+
}
127+
128+
@XmlElement(name = "Zip")
129+
private String zip;
130+
131+
public String getZip() {
132+
return zip;
133+
}
134+
135+
public void setZip(String zip) {
136+
this.zip = zip;
137+
}
138+
}

src/main/java/com/bandwidth/iris/sdk/model/Order.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public class Order extends BaseModel {
4949
private TollFreeWildCharSearchAndOrderType tollFreeWildCharSearchAndOrderType;
5050
@XmlElement(name = "ZIPSearchAndOrderType")
5151
private ZIPSearchAndOrderType zipSearchAndOrderType;
52+
@XmlElement(name = "CombinedSearchAndOrderType")
53+
private CombinedSearchAndOrderType combinedSearchAndOrderType;
54+
5255

5356
public static OrderResponse create(IrisClient client, Order order) throws Exception {
5457
OrderResponse orderResponse = client
@@ -208,6 +211,14 @@ public void setZipSearchAndOrderType(ZIPSearchAndOrderType zipSearchAndOrderType
208211
this.zipSearchAndOrderType = zipSearchAndOrderType;
209212
}
210213

214+
public CombinedSearchAndOrderType getCombinedSearchAndOrderType() {
215+
return combinedSearchAndOrderType;
216+
}
217+
218+
public void setCombinedSearchAndOrderType(CombinedSearchAndOrderType combinedSearchAndOrderType) {
219+
this.combinedSearchAndOrderType = combinedSearchAndOrderType;
220+
}
221+
211222
public void addNote(Note note) throws Exception {
212223
client.put(client.buildAccountModelUri(new String[] { IrisPath.ORDERS_URI_PATH, id, "notes" }), note);
213224
}

src/main/java/com/bandwidth/iris/sdk/model/SipPeer.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,20 @@ public List<SipPeerTelephoneNumber> getTns() throws Exception {
208208
IrisPath.SIPPEERS_URI_PATH, peerId, "tns" }),
209209
SipPeerTelephoneNumbersResponse.class).getSipPeerTelephoneNumbers();
210210
}
211+
212+
public void enableSms(SipPeerSmsFeature smsSettings) throws Exception {
213+
client.post(client.buildAccountModelUri(new String[] { IrisPath.SITES_URI_PATH, siteId,
214+
IrisPath.SIPPEERS_URI_PATH, peerId, "products", "messaging", "features", "sms" }), smsSettings);
215+
}
216+
217+
public void enableMms() throws Exception {
218+
SipPeerMmsFeature mmsSettings = new SipPeerMmsFeature();
219+
client.post(client.buildAccountModelUri(new String[] { IrisPath.SITES_URI_PATH, siteId,
220+
IrisPath.SIPPEERS_URI_PATH, peerId, "products", "messaging", "features", "mms" }), mmsSettings);
221+
}
222+
223+
public void updateMessagingApplicationSettings (SipPeerMessagingApplicationsSettings settings) throws Exception {
224+
client.post(client.buildAccountModelUri(new String[] { IrisPath.SITES_URI_PATH, siteId,
225+
IrisPath.SIPPEERS_URI_PATH, peerId, "products", "messaging","applicationSettings" }), settings);
226+
}
211227
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.bandwidth.iris.sdk.model;
2+
3+
import javax.xml.bind.annotation.XmlElement;
4+
import javax.xml.bind.annotation.XmlRootElement;
5+
6+
@XmlRootElement(name = "ApplicationSettings")
7+
public class SipPeerMessagingApplicationsSettings extends BaseModel {
8+
@XmlElement(name = "HttpMessagingV2AppId")
9+
String applicationId;
10+
11+
public void setApplicationId(String applicationId) {
12+
this.applicationId = applicationId;
13+
}
14+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.bandwidth.iris.sdk.model;
2+
3+
import javax.xml.bind.annotation.XmlAccessType;
4+
import javax.xml.bind.annotation.XmlAccessorType;
5+
import javax.xml.bind.annotation.XmlElement;
6+
import javax.xml.bind.annotation.XmlRootElement;
7+
8+
@XmlRootElement(name = "MmsFeature")
9+
@XmlAccessorType(XmlAccessType.FIELD)
10+
public class SipPeerMmsFeature extends BaseModel {
11+
@XmlElement(name = "MmsSettings")
12+
MmsSettings mmsSettings;
13+
@XmlElement(name = "Protocols")
14+
Protocols protocols;
15+
16+
public SipPeerMmsFeature()
17+
{
18+
this.mmsSettings = new MmsSettings();
19+
this.protocols = new Protocols();
20+
this.protocols.http = new Http();
21+
this.protocols.http.httpSettings = new HttpSettings();
22+
}
23+
24+
private static class MmsSettings extends BaseModel {
25+
@XmlElement(name = "Protocol")
26+
private final String protocol = "HTTP";
27+
}
28+
29+
private static class Protocols extends BaseModel {
30+
@XmlElement(name = "HTTP")
31+
Http http;
32+
}
33+
34+
private static class Http extends BaseModel {
35+
@XmlElement(name = "HttpSettings")
36+
HttpSettings httpSettings = new HttpSettings();
37+
}
38+
39+
private static class HttpSettings extends BaseModel {
40+
@XmlElement(name = "ProxyPeerId")
41+
String proxyPeerId = "";
42+
}
43+
}

0 commit comments

Comments
 (0)