Skip to content

Commit

Permalink
fix: get sandbox number filter to be taken as direct param instead of…
Browse files Browse the repository at this point in the history
… a struct of filters

Signed-off-by: sarthakjdev <[email protected]>
  • Loading branch information
sarthakjdev committed Nov 4, 2024
1 parent 65cd6fb commit 67e4295
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/manager/phone_number_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,8 @@ type WhatsappBusinessAccountPhoneNumberEdge struct {
Summary string `json:"summary,omitempty"`
}

// FetchPhoneNumberFilters holds the filters for fetching phone numbers.
type FetchPhoneNumberFilters struct {
GetSandboxNumbers bool
}

// FetchAll fetches all phone numbers based on the provided filters.
func (manager *PhoneNumberManager) FetchAll(options FetchPhoneNumberFilters) (*WhatsappBusinessAccountPhoneNumberEdge, error) {
func (manager *PhoneNumberManager) FetchAll(getSandBoxNumbers bool) (*WhatsappBusinessAccountPhoneNumberEdge, error) {
apiRequest := manager.requester.NewApiRequest(strings.Join([]string{manager.businessAccountId, "/", "phone_numbers"}, ""), http.MethodGet)

apiRequest.AddQueryParam("filtering", `[{"field":"account_mode","operator":"EQUAL","value":"LIVE"}]`)
Expand Down

0 comments on commit 67e4295

Please sign in to comment.