diff --git a/apps.go b/apps.go index cd72f74..fed33b8 100644 --- a/apps.go +++ b/apps.go @@ -43,9 +43,6 @@ type AppsService interface { ListRegions(ctx context.Context) ([]*AppRegion, *Response, error) - ListTiers(ctx context.Context) ([]*AppTier, *Response, error) - GetTier(ctx context.Context, slug string) (*AppTier, *Response, error) - ListInstanceSizes(ctx context.Context) ([]*AppInstanceSize, *Response, error) GetInstanceSize(ctx context.Context, slug string) (*AppInstanceSize, *Response, error) @@ -381,36 +378,6 @@ func (s *AppsServiceOp) ListRegions(ctx context.Context) ([]*AppRegion, *Respons return root.Regions, resp, nil } -// ListTiers lists available app tiers. -func (s *AppsServiceOp) ListTiers(ctx context.Context) ([]*AppTier, *Response, error) { - path := fmt.Sprintf("%s/tiers", appsBasePath) - req, err := s.client.NewRequest(ctx, http.MethodGet, path, nil) - if err != nil { - return nil, nil, err - } - root := new(appTiersRoot) - resp, err := s.client.Do(ctx, req, root) - if err != nil { - return nil, resp, err - } - return root.Tiers, resp, nil -} - -// GetTier retrieves information about a specific app tier. -func (s *AppsServiceOp) GetTier(ctx context.Context, slug string) (*AppTier, *Response, error) { - path := fmt.Sprintf("%s/tiers/%s", appsBasePath, slug) - req, err := s.client.NewRequest(ctx, http.MethodGet, path, nil) - if err != nil { - return nil, nil, err - } - root := new(appTierRoot) - resp, err := s.client.Do(ctx, req, root) - if err != nil { - return nil, resp, err - } - return root.Tier, resp, nil -} - // ListInstanceSizes lists available instance sizes for service, worker, and job components. func (s *AppsServiceOp) ListInstanceSizes(ctx context.Context) ([]*AppInstanceSize, *Response, error) { path := fmt.Sprintf("%s/tiers/instance_sizes", appsBasePath) diff --git a/apps_test.go b/apps_test.go index e86f808..0d5e5be 100644 --- a/apps_test.go +++ b/apps_test.go @@ -577,40 +577,6 @@ func TestApps_ListRegions(t *testing.T) { assert.Equal(t, []*AppRegion{&testAppRegion}, regions) } -func TestApps_ListTiers(t *testing.T) { - setup() - defer teardown() - - ctx := context.Background() - - mux.HandleFunc("/v2/apps/tiers", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, http.MethodGet) - - json.NewEncoder(w).Encode(&appTiersRoot{Tiers: []*AppTier{&testAppTier}}) - }) - - tiers, _, err := client.Apps.ListTiers(ctx) - require.NoError(t, err) - assert.Equal(t, []*AppTier{&testAppTier}, tiers) -} - -func TestApps_GetTier(t *testing.T) { - setup() - defer teardown() - - ctx := context.Background() - - mux.HandleFunc(fmt.Sprintf("/v2/apps/tiers/%s", testAppTier.Slug), func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, http.MethodGet) - - json.NewEncoder(w).Encode(&appTierRoot{Tier: &testAppTier}) - }) - - tier, _, err := client.Apps.GetTier(ctx, testAppTier.Slug) - require.NoError(t, err) - assert.Equal(t, &testAppTier, tier) -} - func TestApps_ListInstanceSizes(t *testing.T) { setup() defer teardown()