Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cnam-storage sdk changes #181

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 26 additions & 10 deletions numbers.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Number struct {
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"`
CNAM string `json:"cnam,omitempty" url:"cnam,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 @@ -40,13 +41,22 @@ type NumberCreateParams struct {
}

type NumberCreateResponse BaseResponse
type NumberUpdateResponse BaseResponse

type NumberUpdateResponse struct {
ApiId string `json:"api_id" url:"api_id"`
Message string `json:"message" url:"message"`
NewCnam string `json:"new_cnam,omitempty"`
CNAMUpdateStatus string `json:"cnam_update_status,omitempty"`
}

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"`
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"`
CNAM string `json:"cnam,omitempty" url:"cnam,omitempty"`
CNAMCallbackURL string `json:"callback_url"`
CallbackMethod string `json:"callback_method"`
}

type NumberListParams struct {
Expand All @@ -66,6 +76,7 @@ type NumberListParams struct {
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"`
CNAM string `json:"cnam,omitempty" url:"cnam,omitempty"`
}

type NumberListResponse struct {
Expand Down Expand Up @@ -159,8 +170,11 @@ type PhoneNumberListParams struct {
}

type PhoneNumberCreateParams struct {
AppID string `json:"app_id,omitempty" url:"app_id,omitempty"`
CNAMLookup string `json:"cnam_lookup,omitempty" url:"cnam_lookup,omitempty"`
AppID string `json:"app_id,omitempty" url:"app_id,omitempty"`
CNAMLookup string `json:"cnam_lookup,omitempty" url:"cnam_lookup,omitempty"`
CNAM string `json:"cnam,omitempty" url:"cnam,omitempty"`
CNAMCallbackURL string `json:"callback_url"`
CallbackMethod string `json:"callback_method"`
}

type PhoneNumberService struct {
Expand All @@ -171,9 +185,11 @@ type PhoneNumberCreateResponse struct {
APIID string `json:"api_id" url:"api_id"`
Message string `json:"message" url:"message"`
Numbers []struct {
Number string `json:"number" url:"number"`
Status string `json:"status" url:"status"`
} `json:"numbers" url:"numbers"`
Number string `json:"number" url:"number"`
Status string `json:"status" url:"status"`
NewCnam string `json:"new_cnam,omitempty"`
CNAMUpdateStatus string `json:"cnam_update_status,omitempty"`
} `json:"numbers"`
Status string `json:"status" url:"status"`
}

Expand Down