files.com 1.1.683 → 1.1.685

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -405,6 +405,17 @@ module Files
405
405
  @attributes[:holiday_region] = value
406
406
  end
407
407
 
408
+ # Upgrade a legacy Automation to Automation v2
409
+ def upgrade(params = {})
410
+ params ||= {}
411
+ params[:id] = @attributes[:id]
412
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
413
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
414
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
415
+
416
+ Api.send_request("/automations/#{@attributes[:id]}/upgrade", :post, params, @options)
417
+ end
418
+
408
419
  # Manually Run Automation. v2 Automations require Site or Workspace Admin permission
409
420
  #
410
421
  # Parameters:
@@ -633,6 +644,17 @@ module Files
633
644
  Automation.new(response.data, options)
634
645
  end
635
646
 
647
+ # Upgrade a legacy Automation to Automation v2
648
+ def self.upgrade(id, params = {}, options = {})
649
+ params ||= {}
650
+ params[:id] = id
651
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
652
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
653
+
654
+ response, options = Api.send_request("/automations/#{params[:id]}/upgrade", :post, params, options)
655
+ Automation.new(response.data, options)
656
+ end
657
+
636
658
  # Manually Run Automation. v2 Automations require Site or Workspace Admin permission
637
659
  #
638
660
  # Parameters: