Module: EarnShark::License
- Included in:
- Api::Client
- Defined in:
- lib/earnshark_sdk/api/license.rb
Instance Method Summary collapse
-
#get_all_licenses ⇒ Object
Get all the Licenses of the current product Example response: [Name”,“Cost”:{“value”:“10”,“currency”:“USD”,“Tags”:,“License_ID”:1,“Product_ID”:1,“Description”:“Test”,“Billing_Cycle”:“value”:1,“type”:“Monthly”,“Metadata”:“{}”}].
-
#get_license_information(license_id, license_token) ⇒ Object
Get Information of a license created Example response: { “Name”:“License Name”, “Cost”:{ “value”:“100”, “currency”:“USD” }, “Tags”:[ “10 User Package” ], “License_ID”:1, “Product_ID”:1, “Description”:“10 Users per month / 100”, “Billing_Cycle”:{ “value”:1, “type”:“Monthly” }, “Metadata”:“"users":"10"” }.
Instance Method Details
#get_all_licenses ⇒ Object
Get all the Licenses of the current product Example response:
[{"Name":"License Name","Cost":{"value":"10","currency":"USD"},"Tags":["free","test","trial"],"License_ID":1,"Product_ID":1,"Description":"Test","Billing_Cycle":{"value":1,"type":"Monthly"},"Metadata":"{}"}]
13 14 15 |
# File 'lib/earnshark_sdk/api/license.rb', line 13 def get_all_licenses get("#{base_url}product/#{@product_id}/license/all?key=#{@key}") end |
#get_license_information(license_id, license_token) ⇒ Object
Get Information of a license created Example response:
{ "Name":"License Name", "Cost":{ "value":"100", "currency":"USD" }, "Tags":[ "10 User Package" ], "License_ID":1, "Product_ID":1, "Description":"10 Users per month / 100", "Billing_Cycle":{ "value":1, "type":"Monthly" }, "Metadata":"{\"users\":\"10\"}" }
6 7 8 |
# File 'lib/earnshark_sdk/api/license.rb', line 6 def get_license_information(license_id, license_token) get("#{base_url}product/#{@product_id}/license/#{license_id}/getlicensefromapi?key=#{license_token}") end |