Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request balanced#5 from matthewfl/rev1
Browse files Browse the repository at this point in the history
working with tests Rev1
  • Loading branch information
matin committed Jul 30, 2013
2 parents 3ea982b + c40ca0f commit 076afa1
Show file tree
Hide file tree
Showing 12 changed files with 198 additions and 60 deletions.
3 changes: 2 additions & 1 deletion responses/customers.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
},
"type": "array",
"minItems": 1,
"uniqueItems": true
"uniqueItems": true,
"required": true
}
}
}
34 changes: 34 additions & 0 deletions responses/error_view.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"type": "object",
"properties": {
"_uris": {
"type": "object",
"required": true
},
"status": {
"type": "string",
"required": true
},
"category_code": {
"type": "string",
"required": true
},
"description": {
"type": "string",
"required": true
},
"status_code": {
"type": "integer",
"required": true
},
"category_type": {
"type": "string",
"required": true
},
"request_id": {
"type": "string",
"required": true
}
},
"additionalProperties": false
}
14 changes: 1 addition & 13 deletions responses/models/bank_account_verifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"properties": {
"id": {
"type": "string",
"pattern": "BZ[a-zA-Z0-9]{22}",
"pattern": "BZ[a-zA-Z0-9]{21,22}",
"required": true
},
"href": {
Expand Down Expand Up @@ -42,18 +42,6 @@
"$ref": "status.json",
"required": true
},
"amount1": {
"type": "integer",
"minimum": 1,
"maximum": 99,
"required": true
},
"amount2": {
"type": "integer",
"minimum": 1,
"maximum": 99,
"required": true
},
"meta": {
"type": "object",
"required": true
Expand Down
17 changes: 13 additions & 4 deletions responses/models/bank_accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": {
"type": "string",
"required": true,
"pattern": "BA[a-zA-Z0-9]{22}",
"pattern": "BA[a-zA-Z0-9]{21,22}"
},
"href": {
"type": "string",
Expand All @@ -23,7 +23,10 @@
"required": true
},
"name": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"required": true
},
"account_number": {
Expand All @@ -38,7 +41,10 @@
},
"account_type": {
"type": "string",
"enum": ["checking", "savings"],
"enum": [
"checking",
"savings"
],
"required": true
},
"address": {
Expand All @@ -65,7 +71,10 @@
"type": "object",
"properties": {
"customer": {
"type": ["null", "string"],
"type": [
"null",
"string"
],
"format": "uri",
"required": true
}
Expand Down
2 changes: 1 addition & 1 deletion responses/models/card_holds.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": {
"type": "string",
"required": true,
"pattern": "HL[a-zA-Z0-9]{22}",
"pattern": "HL[a-zA-Z0-9]{21,22}",
},
"href": {
"type": "string",
Expand Down
32 changes: 24 additions & 8 deletions responses/models/cards.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": {
"type": "string",
"required": true,
"pattern": "CC[a-zA-Z0-9]{22}",
"pattern": "CC[a-zA-Z0-9]{21,22}"
},
"href": {
"type": "string",
Expand All @@ -23,12 +23,15 @@
"required": true
},
"name": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"required": true
},
"number": {
"type": "string",
"pattern": "[0-9]{6}x{5,6}[0-9]{4}",
"pattern": "x{11,12}[0-9]{4}",
"required": true
},
"month": {
Expand All @@ -43,8 +46,13 @@
},
"cvv": {
"anyOf": [
{ "type": "string", "pattern": "x{3,4}" },
{ "type": "null" }
{
"type": "string",
"pattern": "x{3,4}"
},
{
"type": "null"
}
],
"required": true
},
Expand Down Expand Up @@ -76,7 +84,12 @@
},
"brand": {
"type": "string",
"enum": ["Visa", "MasterCard", "Discover", "American Express"],
"enum": [
"Visa",
"MasterCard",
"Discover",
"American Express"
],
"required": false
},
"can_debit": {
Expand All @@ -95,7 +108,10 @@
"type": "object",
"properties": {
"customer": {
"type": ["null", "string"],
"type": [
"null",
"string"
],
"format": "uri",
"required": true
}
Expand All @@ -105,4 +121,4 @@
}
},
"additionalProperties": false
}
}
31 changes: 24 additions & 7 deletions responses/models/credits.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": {
"type": "string",
"required": true,
"pattern": "CR[a-zA-Z0-9]{22}",
"pattern": "CR[a-zA-Z0-9]{21,22}"
},
"href": {
"type": "string",
Expand Down Expand Up @@ -36,27 +36,38 @@
},
"currency": {
"type": "string",
"enum": ["USD"],
"enum": [
"USD"
],
"required": true
},
"appears_on_statement_as": {
"type": "string",
"required": true
},
"description": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"required": true
},
"status": {
"$ref": "status.json",
"required": true
},
"failure_reason_code": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"required": true
},
"failure_reason": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"required": true
},
"meta": {
Expand All @@ -67,7 +78,10 @@
"type": "object",
"properties": {
"customer": {
"type": ["null", "string"],
"type": [
"null",
"string"
],
"format": "uri",
"required": true
},
Expand All @@ -77,7 +91,10 @@
"required": true
},
"order": {
"type": ["null", "string"],
"type": [
"null",
"string"
],
"format": "uri",
"required": true
}
Expand Down
Loading

0 comments on commit 076afa1

Please sign in to comment.