lib/teamdrive_api/register.rb
# Create a license and assign it to a user.
#
# @param [Hash] opts license options
# @option opts [String] :username User to assign license to
# @option opts [String] :productname +server+, +client+
# @option opts [String] :type +monthly+ / +yearly+ / +permanent+
# @option opts [String] :featurevalue one of +webdavs+, +personal+,
#   +professional+, +enterprise+
# @option opts [String] :limit Amount, only for client licenses. _Optional_.
# @option opts [String] :licensereference An _optional_ external reference.
#   Added with v1.0.004
# @option opts [String] :contactnumber An _optional_ contact number. Added
#   with v1.0.004
# @option opts [String] :validuntil An _optional_ valid-until date. Format
#   must be +MM/DD/YYYY+. Added with v1.0.004
# @option opts [String] :changeid An _optional_ change id for license
#   changes. Added with v1.0.004
# @return [String] The license number of the created license
Create a license and assign it to a user.
Create a license and assign it to a user .
def create_license(opts = {})
      require_all of: [:username, :productname, :type, :featurevalue],
                  in_hash: opts
      res = send_request :createlicense, opts
      res[:licensedata][:number]
    end
def create_license ( opts = { } ) require_all of : [ :username , :productname , :type , :featurevalue ] , in_hash : opts res = send_request :createlicense , opts res [ :licensedata ] [ :number ] end
Create a license and assign it to a user.
Create a license and assign it to a user .
The license number of the created license
The license number of the created license
String
opts
:changeid An _optional_ change id for license changes.
: changeid An _optional_ change id for license changes .
opts license options
opts license options