schema/v1.0/customer.json in fidor_schema-0.8.0 vs schema/v1.0/customer.json in fidor_schema-0.10.0

- old
+ new

@@ -1,127 +1,156 @@ { "$schema" : "http://json-schema.org/draft-04/schema#", "type" : "object", "title" : "customer", - "description" : "", - "required" : ["email", "first_name", "last_name", "gender", "title", "nick"], + "description" : "A customer object", + "required" : [ + "email", "password", "adr_mobile" + ], "properties" : { "id" : { "$ref" : "./base_types/base_types.json#definitions/id" }, "email" : { - "$ref" : "./base_types/base_types.json#definitions/email", - "readOnly" : true + "$ref" : "./base_types/base_types.json#definitions/email" }, "first_name" : { "description" : "The given name of the customer", "type" : "string", - "maxLength" : 30, - "readOnly" : true + "maxLength" : 30 }, + "additional_first_name" : { + "description" : "The additional given name of the customer", + "type" : "string", + "maxLength" : 30 + }, "last_name" : { "description" : "The family name of the customer", "type" : "string", - "maxLength" : 30, - "readOnly" : true + "maxLength" : 30 }, + "maiden_name" : { + "description" : "Name at birth, maiden name.", + "type" : "string", + "maxLength" : 30 + }, + "password" : { + "description" : "Password for accessing your account later. You can use lower and upper case letters, digits and special characters", + "type" : ["string", "null"], + "minLength" : 6, + "maxLength" : 128, + "pattern" : "^[0-9a-zA-Z!\"#$%&'()*+,-=./:;?@\\[\\]<>^_`{|}~]+$" + }, + "legal" : { + "description" : "Legal requirements that have to be accepted", + "type" : "array", + "items" : { + "type" : "object", + "$ref" : "./legal.json#" + } + }, "gender" : { "description" : "The gender of the customer", "enum" : [ "m", "f" ], - "type" : "string", - "readOnly" : true + "type" : "string" }, "title" : { - "description" : "Salutation e.g Mr. or Ms./Mrs.", - "type" : "string", - "maxLength" : 30, - "readOnly" : true + "description" : "Salutation: 1 - Mr., 2 - Ms., 3 - Mr. Dr., 4 - Ms. Dr.", + "enum" : [ + 1, + 2, + 3, + 4 + ], + "type" : "integer" }, "nick" : { "description" : "Nickname used in community.", "type" : "string", "maxLength" : 40, - "minLength" : 2, - "readOnly" : true + "minLength" : 2 }, - "maiden_name" : { - "description" : "Name at birth, maiden name.", - "type" : "string", - "maxLength" : 30, - "readOnly" : true + "occupation" : { + "description" : "Customer's current occupation: 1 - employee, 2 - executive, 3 - self-employed, 4 - freelancer, 5 - student, 6 - trainee, 7 - retired, 8 - privatier, 9 - unemployed", + "enum" : [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "type" : "integer" }, "adr_street" : { "description" : "Address street", "type" : "string", - "maxLength" : 100, - "readOnly" : true + "maxLength" : 100 }, "adr_street_number" : { "description" : "Address street number", "type" : "string", - "maxLength" : 10, - "readOnly" : true + "maxLength" : 10 }, "adr_post_code" : { "description" : "Address post code", "type" : "string", - "maxLength" : 10, - "readOnly" : true + "maxLength" : 10 }, "adr_city" : { "description" : "Address City", "type" : "string", - "maxLength" : 100, - "readOnly" : true + "maxLength" : 100 }, "adr_country" : { "description" : "Address Country", "type" : "string", - "maxLength" : 100, - "readOnly" : true + "maxLength" : 100 }, "adr_phone" : { "description" : "Phone home", "type" : "string", - "maxLength" : 30, - "readOnly" : true + "maxLength" : 30 }, "adr_mobile" : { "description" : "Phone mobile", "type" : "string", - "maxLength" : 30, - "readOnly" : true + "maxLength" : 30 }, "adr_fax" : { "description" : "Phone fax", "type" : "string", - "maxLength" : 30, - "readOnly" : true + "maxLength" : 30 }, "adr_businessphone" : { "description" : "Phone business", "type" : "string", - "maxLength" : 30, - "readOnly" : true + "maxLength" : 30 }, "birthday" : { "description" : "Date of birth", "type" : "string", - "format" : "date-time", - "readOnly" : true + "format" : "date-time" }, + "birthplace" : { + "description" : "Place of birth", + "type" : "string", + "maxLength" : 100 + }, "is_verified" : { "description" : "Indicates whether KYC has been performed.", "type" : "boolean", "readOnly" : true }, "nationality" : { - "$ref" : "./base_types/base_types.json#definitions/country", - "readOnly" : true + "$ref" : "./base_types/base_types.json#definitions/country" }, "marital_status" : { "description" : "1: single, 2: married, 3: widowed, 4: divorced, 5: seperated, 6: de facto", "enum" : [ 1, @@ -129,12 +158,11 @@ 3, 4, 5, 6 ], - "type" : "integer", - "readOnly" : true + "type" : "integer" }, "religion" : { "description" : "Denomination for tax reasons. 0: no information, 1: no denomination, 2: Protestant, 3: Roman-Catholic, 4-18: Other denominations", "enum" : [ 0, @@ -154,29 +182,33 @@ 15, 16, 17, 18 ], - "type" : "integer", - "readOnly" : true + "type" : "integer" }, "id_card_registration_city" : { "description" : "City where the id card is registered.", - "type" : "string", - "readOnly" : true + "type" : ["string", "null"] }, "id_card_number" : { "description" : "ID card number", - "type" : "string", - "readOnly" : true + "type" : ["string", "null"] }, "id_card_valid_until" : { "description" : "Expiration date of id card", "format" : "date-time", - "type" : "string", - "readOnly" : true + "type" : ["string", "null"] }, + "newsletter" : { + "description" : "Indicates whether customer has agreed to receiving newsletter or not", + "type" : "boolean" + }, + "affiliate_uid" : { + "description" : "Indicates the attachment of the customer to a certain affiliate", + "type" : ["string", "null"] + }, "created_at" : { "$ref" : "./base_types/base_types.json#definitions/created_at" }, "updated_at" : { "$ref" : "./base_types/base_types.json#definitions/updated_at" @@ -192,8 +224,24 @@ "href" : "customers" }, { "rel" : "accounts", "href" : "customers/{id}/accounts" + }, + { + "rel" : "confirmations", + "href" : "customers/{id}/confirmations" + }, + { + "rel" : "create", + "href" : "customers", + "method" : "POST", + "description" : "Creates a customer" + }, + { + "rel" : "update", + "href" : "customers/{id}", + "method" : "PUT", + "description" : "Updates customer data" } ] }