diff --git a/lib/towerops/gaiia/client.ex b/lib/towerops/gaiia/client.ex index c97d2059..bfb94631 100644 --- a/lib/towerops/gaiia/client.ex +++ b/lib/towerops/gaiia/client.ex @@ -40,10 +40,7 @@ defmodule Towerops.Gaiia.Client do edges { node { id - status { - id - name - } + status } } } @@ -133,10 +130,7 @@ defmodule Towerops.Gaiia.Client do edges { node { id - status { - id - name - } + status productVersion { product { name diff --git a/lib/towerops/gaiia/sync.ex b/lib/towerops/gaiia/sync.ex index 7baf706b..05573ae9 100644 --- a/lib/towerops/gaiia/sync.ex +++ b/lib/towerops/gaiia/sync.ex @@ -83,7 +83,7 @@ defmodule Towerops.Gaiia.Sync do defp map_account(node) do subs = get_in(node, ["billingSubscriptions", "edges"]) || [] - active_count = Enum.count(subs, &(get_in(&1, ["node", "status", "name"]) == "Active")) + active_count = Enum.count(subs, &(get_in(&1, ["node", "status"]) == "Active")) %{ gaiia_id: node["id"], @@ -146,7 +146,7 @@ defmodule Towerops.Gaiia.Sync do %{ gaiia_id: node["id"], account_gaiia_id: get_in(node, ["entity", "id"]), - status: get_in(node, ["status", "name"]), + status: node["status"], product_name: get_in(node, ["productVersion", "product", "name"]), mrr_amount: mrr_amount, currency: get_in(node, ["productVersion", "currency"]),