json/v2.0/account.json in sk_api_schema-0.10.6 vs json/v2.0/account.json in sk_api_schema-0.11.0
- old
+ new
@@ -1,39 +1,46 @@
-{ "type":"object",
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type":"object",
"title": "account",
- "name": "account",
- "description": "BETA An account to track times, expenses, projects, usages, etc. Those are single entry accounts, opposed to double entry accounting in bookkeeping accounts.",
+ "description": "An account to track times, expenses, projects, usages, etc. Those are single entry accounts, opposed to double entry accounting in bookkeeping accounts.",
+ "required": ["name"],
"properties":{
"id":{
"description":"Unique identifier - UUID",
"identity":true,
- "readonly":true,
+ "readOnly":true,
"type":"string",
"maxLength": 22,
"minLength":22
},
+ "company_id":{
+ "description":"Company",
+ "readOnly":true,
+ "type":"string",
+ "maxLength": 22,
+ "minLength":22
+ },
"number":{
"description": "Unique number assigned by you or if empty SK account number schema.",
"type":"string",
"maxLength": 50
},
"name":{
"description": "The name of the account",
"type":"string",
- "required":true,
"maxLength": 100
},
"description":{
"description": "Account description",
"type":"string",
- "format":"text",
"maxLength": 255
},
"balance":{
"description": "The account balance is the sum of all entries, also those from sub-accounts.",
"type":"number",
- "readonly":true
+ "readOnly":true
},
"budget":{
"description": "If an account is used to track budgetary things f.ex. projects, this fields can be used to perform calculations like: Are we still inside the allowed budget?",
"type":"number"
},
@@ -44,15 +51,27 @@
"default_unit":{
"description": "The default quantity unit for new account entries, if unit is empty on create.",
"type":"string",
"maxLength": 30
},
- "hide_fields":{
- "description": "A list of account entry field names. The fields are hidden on account entry lists and forms so one can focus on the important inputs. For example hide: tax,description,billed_at",
+ "default_tax":{
+ "description": "The default tax for new account entries, if tax is empty on create.",
+ "type":"number"
+ },
+ "billing_fee_name":{
+ "description": "Name for a billing fee line item. The item is added to the resulting document upon each account_billing creation, if billing_fee_price_single is set.",
"type":"string",
"maxLength": 255
},
+ "billing_fee_tax":{
+ "description": "Tax value for a billing fee line item. The item is added to the resulting document upon each account_billing creation.",
+ "type":"number"
+ },
+ "billing_fee_price_single":{
+ "description": "Price of a billing fee line item. This field serves as a trigger of whether to add the item. The item is added to the resulting document upon each account_billing creation.",
+ "type":"number"
+ },
"contact_id":{
"description": "The contacts uuid to which the account is related.",
"type":"string",
"maxLength": 22,
"minLength":22
@@ -64,17 +83,17 @@
"minLength":22
},
"created_at":{
"description": "Date the object was created in SK. Never changes afterwards",
"format":"date-time",
- "readonly":true,
+ "readOnly":true,
"type":"string"
},
"updated_at":{
"description": "Date the object was edited in SK.",
"format":"date-time",
- "readonly":true,
+ "readOnly":true,
"type":"string"
},
"team_id":{
"description": "A team uuid. If set only the team and its parent teams can see the record.",
"type":"string",
@@ -84,11 +103,11 @@
"creator_id":{
"description": "The user uuid who created the record.",
"type":"string",
"maxLength": 22,
"minLength":22,
- "readonly":true
+ "readOnly":true
}
},
"links":[
{ "rel": "self",
"href": "accounts/{id}"
@@ -159,14 +178,8 @@
"method": "PUT"
},
{ "rel": "create",
"href": "accounts",
"method": "POST"
- },
- { "rel": "account_entries",
- "href": "accounts/{id}/account_entries"
- },
- { "rel": "account_billings",
- "href": "accounts/{id}/account_billings"
}
]
}