Skip to content

Commit 1de18e5

Browse files
authored
Merge pull request #20 from FreeClimbAPI/VCSWP-16218
Introduce new properties in expectation of 10DLC updates
2 parents a29eb40 + 0c4caac commit 1de18e5

File tree

11 files changed

+396
-97
lines changed

11 files changed

+396
-97
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
77
## [Unreleased]
88
None
99

10+
<a name="4.1.5"></a>
11+
12+
## [4.1.5] 2022-01-18
13+
### Changed
14+
- Fixed typos and build errors
15+
### Added
16+
- Add `capabilities`, `campaignId`, and `provider` to `ListIncomingNumbersFilters` interface
17+
- Add `capabilities`, `campaignId`, and `provider` to `ListAvailableNumbersFilters` interface
18+
- Add `capabilities`, `campaignId`, and `provider` to `AvailableNumber` interface
19+
- Add `capabilities`, `campaignId`, and `provider` to `IncomingNumber` interface
20+
### Removed
21+
- Remove `smsEnabled` and `voiceEnabled` from `ListAvailableNumbersFilters` interface
22+
- Remove `smsEnabled` and `voiceEnabled` from `ListIncomingNumbersFilters` interface
23+
- Remove `smsEnabled` and `voiceEnabled` from `AvailableNumber` interface
24+
- Remove `smsEnabled` and `voiceEnabled` from `IncomingNumber` interface
25+
1026
<a name="4.1.4"></a>
1127

1228
## [4.1.4] 2021-11-29

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ group = 'com.github.FreeClimbAPI'
99

1010
sourceCompatibility = 1.7 // java 7
1111
targetCompatibility = 1.7
12-
version = '4.1.4'
12+
version = '4.1.5'
1313

1414
repositories {
1515
mavenCentral()

src/main/java/com/vailsys/freeclimb/api/call/Call.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class Call extends FreeClimbCommon {
5555
/**
5656
* Additional paramter to support queries of active or terminated calls.
5757
*/
58-
private boolean active;
58+
private Boolean active;
5959
/**
6060
* This represents the current status or state of this call.
6161
*
@@ -176,7 +176,7 @@ public String getPhoneNumberId() {
176176
*
177177
* @return whether the call was active or not
178178
*/
179-
public String getActive() {
179+
public Boolean getActive() {
180180
return this.active;
181181
}
182182

src/main/java/com/vailsys/freeclimb/api/call/CallsSearchFilters.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class CallsSearchFilters extends Filters {
4646
/**
4747
* Additional paramter to support queries of active or terminated calls.
4848
*/
49-
private boolean active;
49+
private Boolean active;
5050

5151
/**
5252
* Retrieve the value of the to (DNIS) filter.
@@ -138,7 +138,7 @@ public String getParentCallId() {
138138
*
139139
* @return whether the call was active or not
140140
*/
141-
public String getActive() {
141+
public Boolean getActive() {
142142
return this.active;
143143
}
144144

src/main/java/com/vailsys/freeclimb/api/phoneNumber/AvailablePhoneNumber.java

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@
2121
*/
2222
public class AvailablePhoneNumber extends PhoneNumber {
2323
/**
24-
* The voiceEnabled setting for this phone number.
24+
* The campaignId of this phone number.
2525
*/
26-
private boolean voiceEnabled;
26+
private String campaignId;
2727
/**
28-
* The smsEnabled setting for this phone number.
28+
* The provider of this phone number.
2929
*/
30-
private boolean smsEnabled;
30+
private String provider;
31+
/**
32+
* The capabilities of this phone number.
33+
*/
34+
private PhoneNumberCapabilities capabilities;
3135
/**
3236
* The region of this phone number.
3337
*/
@@ -54,21 +58,30 @@ public static AvailablePhoneNumber fromJson(String json) throws FreeClimbJSONExc
5458
}
5559

5660
/**
57-
* Retrieve the voiceEnabled setting from the object.
58-
*
59-
* @return The voiceEnabled for this AvailablePhoneNumber.
61+
* Retrieve the capabilities of the phone number.
62+
*
63+
* @return The capabilities of this AvailablePhoneNumber.
6064
*/
61-
public boolean isVoiceEnabled() {
62-
return voiceEnabled;
65+
public PhoneNumberCapabilities getCapabilities() {
66+
return capabilities;
6367
}
6468

6569
/**
66-
* Retrieve the smsEnabled setting from the object.
67-
*
68-
* @return The smsEnabled for this AvailablePhoneNumber.
70+
* Retrieve the campaignId of the phone number.
71+
*
72+
* @return The campaignId of this AvailablePhoneNumber.
73+
*/
74+
public String getCampaignId() {
75+
return campaignId;
76+
}
77+
78+
/**
79+
* Retrieve the provider of the phone number.
80+
*
81+
* @return The provider of this AvailablePhoneNumber.
6982
*/
70-
public boolean isSmsEnabled() {
71-
return smsEnabled;
83+
public String getProvider() {
84+
return provider;
7285
}
7386

7487
/**
@@ -99,14 +112,26 @@ public String getCountry() {
99112
*/
100113
public boolean equals(AvailablePhoneNumber that) {
101114
boolean result = super.equals(that);
102-
result = result && (this.isVoiceEnabled() == that.isVoiceEnabled());
103-
result = result && (this.isSmsEnabled() == that.isSmsEnabled());
115+
if (this.getProvider() != null) {
116+
result = result && that.getProvider().equals(this.getProvider());
117+
} else {
118+
result = result && that.getProvider() == null;
119+
}
120+
if (this.getCampaignId() != null) {
121+
result = result && that.getCampaignId().equals(this.getCampaignId());
122+
} else {
123+
result = result && that.getCampaignId() == null;
124+
}
125+
if (this.getCapabilities() != null) {
126+
result = result && that.getCapabilities().equals(this.getCapabilities());
127+
} else {
128+
result = result && that.getCapabilities() == null;
129+
}
104130
if (this.getRegion() != null) {
105131
result = result && that.getRegion().equals(this.getRegion());
106132
} else {
107133
result = result && that.getRegion() == null;
108134
}
109-
110135
if (this.getCountry() != null) {
111136
result = result && that.getCountry().equals(this.getCountry());
112137
} else {

src/main/java/com/vailsys/freeclimb/api/phoneNumber/AvailablePhoneNumberSearchFilters.java

Lines changed: 68 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,22 @@ public class AvailablePhoneNumberSearchFilters extends Filters {
2020
*/
2121
private String region;
2222
/**
23-
* Indication of whether the phone number can handle sending and receiving SMS messages.
23+
* Campaign ID of the this phone number.
2424
*/
25-
private boolean smsEnabled;
25+
private String campaignId;
2626
/**
27-
* Indicates whether the phone number can handle calls.
27+
* Provider of this phone number.
2828
*/
29-
private boolean voiceEnabled;
29+
private String provider;
30+
/**
31+
* Capabilities of this phone number.
32+
*/
33+
private PhoneNumberCapabilities capabilities;
34+
/**
35+
* Alias of this phone number.
36+
*/
37+
private String alias;
38+
3039

3140
/**
3241
* Retrieve the value of the phoneNumber filter.
@@ -62,7 +71,7 @@ public String getCountry() {
6271
* @param country The value of country to set
6372
*/
6473
public void setCountry(String country) {
65-
this.country = country
74+
this.country = country;
6675
}
6776

6877
/**
@@ -71,7 +80,7 @@ public void setCountry(String country) {
7180
* @return the region filter value
7281
*/
7382
public String getRegion() {
74-
return region
83+
return region;
7584
}
7685

7786
/**
@@ -80,42 +89,78 @@ public String getRegion() {
8089
* @param region The value of region to set
8190
*/
8291
public void setRegion(String region) {
83-
this.region = region
92+
this.region = region;
93+
}
94+
95+
/**
96+
* Retrieve the capabilities of the phone number.
97+
*
98+
* @return The capabilities of this AvailablePhoneNumber.
99+
*/
100+
public PhoneNumberCapabilities getCapabilities() {
101+
return capabilities;
102+
}
103+
104+
/**
105+
* Set the capabilities filter for available phone numbers.
106+
*
107+
* @param capabilities The value of capabilities to set
108+
*/
109+
public void setCapabilities(PhoneNumberCapabilities capabilities) {
110+
this.capabilities = capabilities;
111+
}
112+
113+
/**
114+
* Retrieve the campaignId of the phone number.
115+
*
116+
* @return The campaignId of this AvailablePhoneNumber.
117+
*/
118+
public String getCampaignId() {
119+
return campaignId;
120+
}
121+
122+
/**
123+
* Set the campaignId filter for available phone numbers.
124+
*
125+
* @param campaignId The value of campaignId to set
126+
*/
127+
public void setCampaignId(String campaignId) {
128+
this.campaignId = campaignId;
84129
}
85130

86131
/**
87-
* Retrieve the value of the smsEnabled filter
132+
* Retrieve the provider of the phone number.
88133
*
89-
* @return the smsEnabled filter value
134+
* @return The provider of this AvailablePhoneNumber.
90135
*/
91-
public boolean getSmsEnabled() {
92-
return smsEnabled
136+
public String getProvider() {
137+
return provider;
93138
}
94139

95140
/**
96-
* Set the smsEnabled filter for available phone numbers.
141+
* Set the provider filter for available phone numbers.
97142
*
98-
* @param smsEnabled The value of smsEnabled to set
143+
* @param provider The value of provider to set
99144
*/
100-
public void setSmsEnabled(boolean smsEnabled) {
101-
this.smsEnabled = smsEnabled
145+
public void setProvider(String provider) {
146+
this.provider = provider;
102147
}
103148

104149
/**
105-
* Retrieve the value of the voiceEnabled filter
150+
* Retrieve the alias of the phone number.
106151
*
107-
* @return the voiceEnabled filter value
152+
* @return The alias of this AvailablePhoneNumber.
108153
*/
109-
public boolean getVoiceEnabled() {
110-
return voiceEnabled
154+
public String getAlias() {
155+
return alias;
111156
}
112157

113158
/**
114-
* Set the voiceEnabled filter for available phone numbers.
159+
* Set the alias filter for available phone numbers.
115160
*
116-
* @param voiceEnabled The value of voiceEnabled to set
161+
* @param alias The value of alias to set
117162
*/
118-
public void setVoiceEnabled(boolean voiceEnabled) {
119-
this.voiceEnabled = voiceEnabled
163+
public void setAlias(String alias) {
164+
this.alias = alias;
120165
}
121166
}

0 commit comments

Comments
 (0)