Skip to content

Commit

Permalink
PHONUM-2815 (#177)
Browse files Browse the repository at this point in the history
* cnam_lookup in get and list

* added buy number change

* cnam lookup in update api

* added cnam filter

* bump version

---------

Co-authored-by: kalyan-plivo <kalyan.sunku@plivo.com>
  • Loading branch information
prabhav-plivo and kalyan-plivo authored Jun 2, 2023
1 parent 7e61316 commit 5a78df7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [7.31.0](https://github.com/plivo/plivo-go/tree/v7.31.0) (2023-06-02)
**Feature - CNAM Lookup**
- Added New Param `cnam_lookup` in to the response of the [list all numbers API], [list single number API]
- Added `cnam_lookup` filter to AccountPhoneNumber - list all my numbers API.
- Added `cnam_lookup` parameter to buy number[Buy a Phone Number] to configure CNAM Lookup while buying a US number
- Added `cnam_lookup` parameter to update number[Update an account phone number] to configure CNAM Lookup while buying a US number

## [7.30.0](https://github.com/plivo/plivo-go/tree/v7.24.1) (2023-03-16)
**Feature - Added a new param in getCallDetails api**
- From now on we can see CNAM (caller_id name) details at CDR level.
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.30.0"
const sdkVersion = "7.31.0"

const lookupBaseUrl = "lookup.plivo.com"

Expand Down
1 change: 1 addition & 0 deletions fixtures/numberGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"api_id": "88625e5e-1c92-11e4-80aa-12313f048015",
"application": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Application/29986316244302815/",
"carrier": "Plivo",
"cnam_lookup":"enabled",
"monthly_rental_rate": "0.80000",
"number": "17609915566",
"number_type": "local",
Expand Down
3 changes: 3 additions & 0 deletions fixtures/numberListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"alias": null,
"application": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Application/29986316244302815/",
"carrier": "Plivo",
"cnam_lookup":"enabled",
"monthly_rental_rate": "0.80000",
"number": "18135401302",
"number_type": "local",
Expand All @@ -33,6 +34,7 @@
"alias": "",
"application": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Application/16632559604105954/",
"carrier": "Plivo",
"cnam_lookup":"enabled",
"monthly_rental_rate": "0.80000",
"number": "14153661106",
"number_type": "local",
Expand All @@ -53,6 +55,7 @@
"alias": "",
"application": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Application/20372631212782799/",
"carrier": "Plivo",
"cnam_lookup":"disabled",
"monthly_rental_rate": "0.80000",
"number": "14152753408",
"number_type": "local",
Expand Down
6 changes: 5 additions & 1 deletion numbers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type Number struct {
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"`
CNAMLookup string `json:"cnam_lookup,omitempty" url:"cnam_lookup,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 All @@ -45,6 +46,7 @@ type NumberUpdateParams struct {
AppID string `json:"app_id,omitempty" url:"app_id,omitempty"`
Subaccount string `json:"subaccount,omitempty" url:"subaccount,omitempty"`
Alias string `json:"alias,omitempty" url:"alias,omitempty"`
CNAMLookup string `json:"cnam_lookup,omitempty" url:"cnam_lookup,omitempty"`
}

type NumberListParams struct {
Expand All @@ -63,6 +65,7 @@ type NumberListParams struct {
TendlcCampaignID string `json:"tendlc_campaign_id,omitempty" url:"tendlc_campaign_id,omitempty"`
TendlcRegistrationStatus string `json:"tendlc_registration_status,omitempty" url:"tendlc_registration_status,omitempty"`
TollFreeSMSVerification string `json:"toll_free_sms_verification,omitempty" url:"toll_free_sms_verification,omitempty"`
CNAMLookup string `json:"cnam_lookup,omitempty" url:"cnam_lookup,omitempty"`
}

type NumberListResponse struct {
Expand Down Expand Up @@ -156,7 +159,8 @@ type PhoneNumberListParams struct {
}

type PhoneNumberCreateParams struct {
AppID string `json:"app_id,omitempty" url:"app_id,omitempty"`
AppID string `json:"app_id,omitempty" url:"app_id,omitempty"`
CNAMLookup string `json:"cnam_lookup,omitempty" url:"cnam_lookup,omitempty"`
}

type PhoneNumberService struct {
Expand Down

0 comments on commit 5a78df7

Please sign in to comment.