From 5a78df71b32bc8cf2e3ce19957d7733c5acec457 Mon Sep 17 00:00:00 2001 From: Prabhav Bansal <107188216+prabhav-plivo@users.noreply.github.com> Date: Fri, 2 Jun 2023 19:49:57 +0530 Subject: [PATCH] PHONUM-2815 (#177) * 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 --- CHANGELOG.md | 7 +++++++ baseclient.go | 2 +- fixtures/numberGetResponse.json | 1 + fixtures/numberListResponse.json | 3 +++ numbers.go | 6 +++++- 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9db1aed..734c187 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/baseclient.go b/baseclient.go index 5ea353e..3223289 100644 --- a/baseclient.go +++ b/baseclient.go @@ -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" diff --git a/fixtures/numberGetResponse.json b/fixtures/numberGetResponse.json index 564d0ea..a25b1a7 100644 --- a/fixtures/numberGetResponse.json +++ b/fixtures/numberGetResponse.json @@ -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", diff --git a/fixtures/numberListResponse.json b/fixtures/numberListResponse.json index c1812b4..e18487f 100644 --- a/fixtures/numberListResponse.json +++ b/fixtures/numberListResponse.json @@ -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", @@ -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", @@ -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", diff --git a/numbers.go b/numbers.go index b840b92..4a9acca 100644 --- a/numbers.go +++ b/numbers.go @@ -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"` @@ -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 { @@ -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 { @@ -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 {