# -*- coding: utf-8 -*- require "magellan/cli/resources" module Magellan module Cli module Resources class ClientVersion < Base self.resource_name = "client_version" self.resource_dependency = {"project" => "project"} self.hidden_fields = %w[project_id created_at updated_at].map(&:freeze).freeze self.field_associations = { "stage_title_id" => {name: "stage", class: "Stage"}, } desc "create VERSION", "create New Client Version" def create(version) stage = load_selection("stage") params = { parameter_name => { "stage_title_id" => stage["id"], "version" => version, } } post_json("/admin/#{resource_name}/new.json", params) # TODO implement select method # select(version) end end end end end