From subscriptions_controller.rb[1]
api :DELETE, "/subscriptions/:id", N_("Unattach a subscription")
api :DELETE, "/systems/:system_id/subscriptions/:id", N_("Unattach a subscription"), :deprecated => true
api :DELETE, "/activation_keys/:activation_key_id/subscriptions/:id", N_("Unattach a subscription")
param :id, String, :desc => N_("Subscription ID"), :required => false
param :system_id, String, :desc => N_("UUID of the system")
param :activation_key_id, String, :desc => N_("activation key ID")
param :subscriptions, Array, :desc => N_("Array of subscriptions to add"), :required => false do
param :id, String, :desc => N_("Subscription Pool uuid"), :required => true
end
To delete a subscription from a system, how would I use the binding in ruby?
@api = ApipieBinding::API.new()
#api :DELETE, "/subscriptions/:id", N_("Unattach a subscription")
@api.resource(:subscriptions).call(:destroy, {:system_id=>456, :subscriptions => [{:id=>456}]})
# --> Error: missing param 'id' in parameter
@api.resource(:subscriptions).call(:destroy, {:id=>123, :system_id=>456})
# --> Missing arguments for 'subscriptions'
#api :DELETE, "/systems/:system_id/subscriptions/:id", N_("Unattach a subscription"), :deprecated => true
????
#api :DELETE, "/activation_keys/:activation_key_id/subscriptions/:id", N_("Unattach a subscription")
????
Any advice on correcting the apipie document and/or calling the api choices?
···
-- @thomasmckay–
“The leader must aim high, see big, judge widely, thus setting himself apart form the ordinary people who debate in narrow confines.” ~ Charles De Gaulle
“Leadership is about making others better as a result of your presence and making sure that impact lasts in your absence.” ~ Harvard Business School