@@ -90,7 +90,6 @@ type ArcInstanceDetails struct {
9090 SubscriptionCanceled bool `json:"subscription_canceled"`
9191 Trial bool `json:"trial"`
9292 TrialValidity int64 `json:"trial_validity"`
93- ArcID string `json:"arc_id"`
9493 CreatedAt int64 `json:"created_at"`
9594 Tier * Plan `json:"tier"`
9695 TierValidity int64 `json:"tier_validity"`
@@ -120,18 +119,6 @@ func BillingMiddleware(next http.Handler) http.Handler {
120119 })
121120}
122121
123- // Returns the arc instance by ID
124- func getArcInstanceByID (arcID string , arcInstances []ArcInstanceDetails ) ArcInstanceDetails {
125- var arcInstance ArcInstanceDetails
126- for _ , instance := range arcInstances {
127- if instance .ArcID == arcID {
128- arcInstance = instance
129- break
130- }
131- }
132- return arcInstance
133- }
134-
135122func getArcInstance (arcID string ) (ArcInstance , error ) {
136123 arcInstance := ArcInstance {}
137124 response := ArcInstanceResponse {}
@@ -153,7 +140,7 @@ func getArcInstance(arcID string) (ArcInstance, error) {
153140 }
154141 err = json .Unmarshal (body , & response )
155142 if len (response .ArcInstances ) != 0 {
156- arcInstanceByID := getArcInstanceByID ( arcID , response .ArcInstances )
143+ arcInstanceByID := response .ArcInstances [ 0 ]
157144 arcInstance .SubscriptionID = arcInstanceByID .SubscriptionID
158145 TimeValidity = arcInstanceByID .TimeValidity
159146 Tier = arcInstanceByID .Tier
0 commit comments