Skip to content

Commit

Permalink
Merge pull request #74 from plivo/searchnumbers_responsefix
Browse files Browse the repository at this point in the history
Searchnumbers responsefix
  • Loading branch information
nixonsam authored Apr 24, 2020
2 parents 67ce2ff + fc2e466 commit f86b58e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 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

## [4.5.0](https://github.com/plivo/plivo-go/tree/v4.5.0) (2020-04-24)
- Add city and mms filter support for Number Search API
- Add city, country and mms into List Number and Number Search API's Response
- Fix for TotalCount in Number API's Response

## [4.4.0](https://github.com/plivo/plivo-go/tree/v4.4.0) (2020-03-31)
- Add application cascade delete support.

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 = "4.4.0"
const sdkVersion = "4.5.0"

type ClientOptions struct {
HttpClient *http.Client
Expand Down
7 changes: 3 additions & 4 deletions common.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package plivo

type Meta struct {
Previous *string
Next *string

TotalCount int64
Previous *string
Next *string
TotalCount int64 `json:"total_count"`
Offset int64
Limit int64
}
Expand Down
13 changes: 10 additions & 3 deletions numbers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ type Number struct {
Alias string `json:"alias,omitempty" url:"alias,omitempty"`
VoiceEnabled bool `json:"voice_enabled,omitempty" url:"voice_enabled,omitempty"`
SMSEnabled bool `json:"sms_enabled,omitempty" url:"sms_enabled,omitempty"`
MMSEnabled bool `json:"mms_enabled,omitempty" url:"mms_enabled,omitempty"`
Description string `json:"description,omitempty" url:"description,omitempty"`
PlivoNumber bool `json:"plivo_number,omitempty" url:"plivo_number,omitempty"`
City string `json:"city,omitempty" url:"city,omitempty"`
Country string `json:"country,omitempty" url:"country,omitempty"`
Carrier string `json:"carrier,omitempty" url:"carrier,omitempty"`
Number string `json:"number,omitempty" url:"number,omitempty"`
NumberType string `json:"number_type,omitempty" url:"number_type,omitempty"`
Expand All @@ -19,6 +22,7 @@ type Number struct {
ResourceURI string `json:"resource_uri,omitempty" url:"resource_uri,omitempty"`
VoiceRate string `json:"voice_rate,omitempty" url:"voice_rate,omitempty"`
SMSRate string `json:"sms_rate,omitempty" url:"sms_rate,omitempty"`
MMSRate string `json:"mms_rate,omitempty" url:"mms_rate,omitempty"`
}

type NumberCreateParams struct {
Expand All @@ -45,9 +49,8 @@ type NumberListParams struct {
Subaccount string `json:"subaccount,omitempty" url:"subaccount,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"`
Offset int64 `json:"offset:omitempty" url:"offset:omitempty"`
Limit int64 `json:"limit,omitempty" url:"limit,omitempty"`
Offset int64 `json:"offset,omitempty" url:"offset,omitempty"`
}

type NumberListResponse struct {
Expand Down Expand Up @@ -107,6 +110,7 @@ func (service *NumberService) Delete(NumberId string) (err error) {

type PhoneNumber struct {
Country string `json:"country" url:"country"`
City string `json:"city" url:"city"`
Lata int `json:"lata" url:"lata"`
MonthlyRentalRate string `json:"monthly_rental_rate" url:"monthly_rental_rate"`
Number string `json:"number" url:"number"`
Expand All @@ -120,6 +124,8 @@ type PhoneNumber struct {
SetupRate string `json:"setup_rate" url:"setup_rate"`
SmsEnabled bool `json:"sms_enabled" url:"sms_enabled"`
SmsRate string `json:"sms_rate" url:"sms_rate"`
MmsEnabled bool `json:"mms_enabled" url:"mms_enabled"`
MmsRate string `json:"mms_rate" url:"mms_rate"`
VoiceEnabled bool `json:"voice_enabled" url:"voice_enabled"`
VoiceRate string `json:"voice_rate" url:"voice_rate"`
}
Expand All @@ -132,6 +138,7 @@ type PhoneNumberListParams struct {
Services string `json:"services,omitempty" url:"services,omitempty"`
LATA string `json:"lata,omitempty" url:"lata,omitempty"`
RateCenter string `json:"rate_center,omitempty" url:"rate_center,omitempty"`
City string `json:"city,omitempty" url:"city,omitempty"`
Limit int `json:"limit,omitempty" url:"limit,omitempty"`
Offset int `json:"offset,omitempty" url:"offset,omitempty"`
}
Expand Down

0 comments on commit f86b58e

Please sign in to comment.