Skip to content

Commit

Permalink
PHONUM-2779 (#174)
Browse files Browse the repository at this point in the history
* add renewal date in numbers struct

* added in tests

* added params

* bump version

---------

Co-authored-by: kalyan-plivo <[email protected]>
  • Loading branch information
prabhav-plivo and kalyan-plivo authored May 4, 2023
1 parent 6908ec7 commit 43b29ca
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## [7.28.0](https://github.com/plivo/plivo-go/tree/v7.28.0) (2023-05-04)
**Feature - Added New Param 'renewalDate' in Get Number and List Numbers APIs**
- Add New Param `renewalDate` to the response of the [list all numbers API], [list single number API]
- Add 3 new filters to AccountPhoneNumber - list all my numbers API:`renewal_date`, `renewal_date__gt`, `renewal_date__gte`,`renewal_date__lt` and `renewal_date__lte` (https://www.plivo.com/docs/numbers/api/account-phone-number#list-all-my-numbers)

## [7.27.0](https://github.com/plivo/plivo-go/tree/v7.27.0) (2023-04-25)
**Feature - Added New Param 'replaced_sender' in Get Message and List Message APIs**
- Add `replaced_sender` to the response for the [list all messages API](https://www.plivo.com/docs/sms/api/message/list-all-messages/) and the [get message details API](https://www.plivo.com/docs/sms/api/message#retrieve-a-message)
Expand Down
2 changes: 1 addition & 1 deletion baseclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/google/go-querystring/query"
)

const sdkVersion = "7.27.0"
const sdkVersion = "7.28.0"

const lookupBaseUrl = "lookup.plivo.com"

Expand Down
3 changes: 2 additions & 1 deletion fixtures/numberGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"voice_rate": "0.00850",
"tendlc_campaign_id": "ACB1234",
"tendlc_registration_status": "COMPLETED",
"toll_free_sms_verification": "verified"
"toll_free_sms_verification": "verified",
"renewal_date":"2014-03-14"
}
9 changes: 6 additions & 3 deletions fixtures/numberListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"voice_rate": "0.00850",
"tendlc_campaign_id": "ACB1234",
"tendlc_registration_status": "COMPLETED",
"toll_free_sms_verification": "verified"
"toll_free_sms_verification": "verified",
"renewal_date":"2014-09-15"
},
{
"added_on": "2013-01-01",
Expand All @@ -44,7 +45,8 @@
"voice_rate": "0.00850",
"tendlc_campaign_id": "ACB1235",
"tendlc_registration_status": "COMPLETED",
"toll_free_sms_verification": "unverified"
"toll_free_sms_verification": "unverified",
"renewal_date":"2014-02-01"
},
{
"added_on": "2013-03-25",
Expand All @@ -63,7 +65,8 @@
"voice_rate": "0.00850",
"tendlc_campaign_id": "ACB1236",
"tendlc_registration_status": "COMPLETED",
"toll_free_sms_verification": "verified"
"toll_free_sms_verification": "verified",
"renewal_date":"2013-04-25"
}
]
}
6 changes: 6 additions & 0 deletions numbers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Number struct {
NumberType string `json:"number_type,omitempty" url:"number_type,omitempty"`
MonthlyRentalRate string `json:"monthly_rental_rate,omitempty" url:"monthly_rental_rate,omitempty"`
Application string `json:"application,omitempty" url:"application,omitempty"`
RenewalDate string `json:"renewal_date,omitempty" url:"renewal_date,omitempty"`
AddedOn string `json:"added_on,omitempty" url:"added_on,omitempty"`
ResourceURI string `json:"resource_uri,omitempty" url:"resource_uri,omitempty"`
VoiceRate string `json:"voice_rate,omitempty" url:"voice_rate,omitempty"`
Expand Down Expand Up @@ -50,6 +51,11 @@ type NumberListParams struct {
NumberType string `json:"number_type,omitempty" url:"number_type,omitempty"`
NumberStartsWith string `json:"number_startswith,omitempty" url:"number_startswith,omitempty"`
Subaccount string `json:"subaccount,omitempty" url:"subaccount,omitempty"`
RenewalDate string `json:"renewal_date,omitempty" url:"renewal_date,omitempty"`
RenewalDateLt string `json:"renewal_date__lt,omitempty" url:"renewal_date__lt,omitempty"`
RenewalDateLte string `json:"renewal_date__lte,omitempty" url:"renewal_date__lte,omitempty"`
RenewalDateGt string `json:"renewal_date__gt,omitempty" url:"renewal_date__gt,omitempty"`
RenewalDateGte string `json:"renewal_date__gte,omitempty" url:"renewal_date__gte,omitempty"`
Services string `json:"services,omitempty" url:"services,omitempty"`
Alias string `json:"alias,omitempty" url:"alias,omitempty"`
Limit int64 `json:"limit,omitempty" url:"limit,omitempty"`
Expand Down

0 comments on commit 43b29ca

Please sign in to comment.