fidor_schema 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4dc5099e6308916a078cd74e1e7a8912bc23be31
4
- data.tar.gz: ccb1d0e215ddb06ff92f4f67636439b25a2f4db6
3
+ metadata.gz: cacd9b90d4afd09a59a09adfde1faf7df2947717
4
+ data.tar.gz: d777b912086d49bbc59711477aebafb75fd40546
5
5
  SHA512:
6
- metadata.gz: 9fa70a26d0950850772a127b3cbdc9c8067c269007afe09eba86d5658493984d8453dc8f92fb719260233cba04d6c07bba2ace8a16bd83ef0801989a9b22af1f
7
- data.tar.gz: 30cbb0cd681e1c984d6ed123872070147786df4a86720d3055175f10aa32dcfd57521e3b73b60c10c939835780a832b61f5a8cefe2379ad074faa02212da64ff
6
+ metadata.gz: 146f08392166a782420e9d34e9e22fc7bf7a050a948672966cdee5387cce6e42b88a23f6bba62ed4dc1798d4d107efc83d1ab8e4ded2ac1666fd93ee6b4663ae
7
+ data.tar.gz: 28f3fa2181234fd18d474c56f2df77be7f431127783350b8aaa5101ba16c400a5be7e25e2538cf4079facfb66237e3e2ac38c8200564beb2bd647c8dc039f0a7
data/.gitignore CHANGED
@@ -6,3 +6,4 @@ Gemfile.lock
6
6
  .ruby-gemset
7
7
  *.swp
8
8
  .idea
9
+ .DS_Store
data/.travis.yml CHANGED
@@ -12,3 +12,5 @@ rvm:
12
12
  cache: bundler
13
13
 
14
14
  script: bundle exec rspec
15
+
16
+ sudo: false
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  A more detailed view of the changes can be found in the [commit messages](https://github.com/fidor/fidor_schema/commits/)
4
4
 
5
+ ## v0.9.0 (2015-08-17)
6
+
7
+ * New transaction types (`capital_gains_tax`, `solidarity_tax`).
8
+ * Added `preauths` schema.
9
+ * Added `short_term_loan` schema.
10
+ * Enabled customer creation to the `customer` schema.
11
+ * Various cleanups / small tweaks.
12
+
5
13
  ##2015-06
6
14
 
7
15
  * add transfer_approval resource
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/fidor/fidor_schema.svg?branch=master)](https://travis-ci.org/fidor/fidor_schema)
2
+
1
3
  # Fidor API Schema - BETA
2
4
 
3
5
  The Fidor API is described with [JSON Schema](http://json-schema.org), which serves
@@ -7,7 +9,7 @@ This gem(besides the schema) provides a single utility method: the path to the
7
9
  json files.
8
10
 
9
11
  gem install fidor_schema
10
-
12
+
11
13
  require 'fidor_schema'
12
14
  Fidor::Schema.path
13
15
 
@@ -1,5 +1,5 @@
1
1
  module Fidor
2
2
  class Schema
3
- VERSION='0.8.0'
3
+ VERSION = '0.10.0'
4
4
  end
5
- end
5
+ end
@@ -8,8 +8,10 @@
8
8
  "type" : "string"
9
9
  },
10
10
  "account_id" : {
11
- "description" : "Fidor account the transaction belongs to.",
12
- "type" : "string"
11
+ "description" : "Fidor account the transaction belongs to",
12
+ "type" : "string",
13
+ "maxLength" : 8,
14
+ "pattern" : "^[0-9]{8}$"
13
15
  },
14
16
  "user_id" : {
15
17
  "description" : "Identifies the user who created this object",
@@ -21,41 +23,6 @@
21
23
  "readOnly" : true,
22
24
  "type" : "string"
23
25
  },
24
- "transaction_type" : {
25
- "description" : "Type of the transaction",
26
- "enum" : [
27
- "bonus",
28
- "credit_interest",
29
- "creditcard_annual_fee",
30
- "creditcard_atm_fee",
31
- "creditcard_foreign_exchange_fee",
32
- "creditcard_notification_fee",
33
- "creditcard_order_cancellation",
34
- "creditcard_order_fee",
35
- "creditcard_order_withdrawal_fee",
36
- "creditcard_payin",
37
- "creditcard_payout",
38
- "creditcard_preauth",
39
- "creditcard_release",
40
- "debit_interest",
41
- "emoney_payin",
42
- "fee",
43
- "fidor_payin",
44
- "fidor_payout",
45
- "gmt_fee",
46
- "gmt_refund",
47
- "gmt_payout",
48
- "payout",
49
- "prepaid_mobile_topup",
50
- "sepa_authorization",
51
- "sepa_b2b_direct_debit",
52
- "sepa_core_direct_debit",
53
- "sepa_payin",
54
- "unknown"
55
- ],
56
- "type" : "string",
57
- "maxLength" : 255
58
- },
59
26
  "phone" : {
60
27
  "description" : "A phone or fax number, formatted with country code: +49 123 1233213",
61
28
  "type" : "string",
@@ -132,6 +99,55 @@
132
99
  "description" : "A fee amount in account currency, in minor units, e.g. 1EUR is represented as 100.",
133
100
  "type" : "integer",
134
101
  "minimum" : 0
102
+ },
103
+ "transaction_type": {
104
+ "description" : "Type of the transaction",
105
+ "enum" : [
106
+ "bonus",
107
+ "credit_interest",
108
+ "creditcard_annual_fee",
109
+ "creditcard_atm_fee",
110
+ "creditcard_foreign_exchange_fee",
111
+ "creditcard_notification_fee",
112
+ "creditcard_order_cancellation",
113
+ "creditcard_order_fee",
114
+ "creditcard_order_withdrawal_fee",
115
+ "creditcard_payin",
116
+ "creditcard_payout",
117
+ "creditcard_preauth",
118
+ "creditcard_release",
119
+ "debit_interest",
120
+ "emoney_payin",
121
+ "fee",
122
+ "fidor_payin",
123
+ "fidor_payout",
124
+ "gmt_fee",
125
+ "gmt_refund",
126
+ "gmt_payout",
127
+ "payout",
128
+ "prepaid_mobile_topup",
129
+ "sepa_authorization",
130
+ "sepa_b2b_direct_debit",
131
+ "sepa_core_direct_debit",
132
+ "sepa_payin",
133
+ "unknown"
134
+ ],
135
+ "type" : "string",
136
+ "maxLength" : 255
137
+ },
138
+ "preauth_type": {
139
+ "description" : "Type of the preauthorization",
140
+ "enum" : [
141
+ "creditcard_preauth",
142
+ "internal_transfer_preauth",
143
+ "capital_bond_preauth",
144
+ "currency_order_preauth",
145
+ "gmt_preauth",
146
+ "ripple_preauth",
147
+ "unknown"
148
+ ],
149
+ "type" : "string",
150
+ "maxLength" : 255
135
151
  }
136
152
  }
137
153
  }
@@ -0,0 +1,10 @@
1
+ {
2
+ "type" : "object",
3
+ "title" : "Blocked Amount",
4
+ "name" : "blocked_amount",
5
+ "description" : "",
6
+ "properties" : {
7
+
8
+ },
9
+ "links" : []
10
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema" : "http://json-schema.org/draft-04/schema#",
3
+ "type" : "object",
4
+ "title" : "Card PIN Code",
5
+ "name" : "pin",
6
+ "rel" : "pin",
7
+ "description" : "Card PIN code",
8
+ "parent" : "card",
9
+ "properties": {
10
+ "id": {
11
+ "$ref" : "../base_types/base_types.json#definitions/id"
12
+ },
13
+ "account_id" : {
14
+ "$ref" : "../base_types/base_types.json#definitions/account_id"
15
+ },
16
+ "pin" : {
17
+ "description" : "Personal identification number of the card",
18
+ "type" : "string",
19
+ "pattern" : "^[0-9]{4}$"
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,236 @@
1
+ {
2
+ "$schema" : "http://json-schema.org/draft-04/schema#",
3
+ "type" : "object",
4
+ "title" : "Card",
5
+ "name" : "card",
6
+ "description" : "Cards endpoint",
7
+ "required" : ["type", "design", "currency", "pin"],
8
+ "properties" : {
9
+ "id" : {
10
+ "$ref" : "./base_types/base_types.json#definitions/id"
11
+ },
12
+ "account_id" : {
13
+ "$ref" : "./base_types/base_types.json#definitions/account_id",
14
+ "readOnly" : true
15
+ },
16
+ "inscription" : {
17
+ "description" : "Card holder",
18
+ "type" : "string",
19
+ "readOnly" : true
20
+ },
21
+ "type" : {
22
+ "description" : "Card type",
23
+ "type" : "string",
24
+ "enum" : [
25
+ "fidor_digital_prepaid_mastercard_virtual",
26
+ "fidor_smart_prepaid_mastercard_cowboy",
27
+ "fidor_smart_prepaid_mastercard_ambassador",
28
+ "fidor_smart_prepaid_mastercard_girls",
29
+ "fidor_smart_prepaid_mastercard_pimp",
30
+ "fidor_smart_prepaid_mastercard_community",
31
+ "fidor_smart_prepaid_mastercard_classic_black",
32
+ "fidor_smart_prepaid_mastercard_classic_green",
33
+ "fidor_digital_prepaid_mastercard_virtuell",
34
+ "fidor_smart_prepaid_mastercard_classic_green2",
35
+ "fidor_smart_prepaid_mastercard_classic_black2",
36
+ "fidor_smart_prepaid_mastercard_classic_green_bis",
37
+ "fidor_smart_prepaid_mastercard_classic_black_bis",
38
+ "fidor_corporatecard_classic",
39
+ "fidor_smart_prepaid_mastercard_classic_green_ter",
40
+ "fidor_smart_prepaid_mastercard_classic_black_ter",
41
+ "fidor_travian_prepaid_mastercard",
42
+ "fidor_smartcard",
43
+ "fidor_debit_master_card"
44
+ ]
45
+ },
46
+ "design" : {
47
+ "description" : "Card design",
48
+ "type" : "string"
49
+ },
50
+ "currency" : {
51
+ "$ref" : "./base_types/base_types.json#definitions/currency"
52
+ },
53
+ "physical" : {
54
+ "description" : "Indicates if the card is a physical one",
55
+ "type" : "boolean",
56
+ "readOnly" : true
57
+ },
58
+ "valid_until" : {
59
+ "description" : "Card expiration date",
60
+ "format" : "date-time",
61
+ "readOnly" : true
62
+ },
63
+ "balance" : {
64
+ "description" : "Balance of the related account in minor units, e.g. 1EUR is represented as 100. Must be greater than 0 e.g. at least one cent in EUR",
65
+ "$ref" : "./base_types/base_types.json#definitions/amount",
66
+ "readOnly" : true
67
+ },
68
+ "atm_limit" : {
69
+ "description" : "ATM limit in minor units, e.g. 1EUR is represented as 100. Must be greater than 0 e.g. at least one cent in EUR",
70
+ "$ref" : "./base_types/base_types.json#definitions/amount"
71
+ },
72
+ "transaction_single_limit" : {
73
+ "description" : "Transaction single limit in minor units, e.g. 1EUR is represented as 100. Must be greater than 0 e.g. at least one cent in EUR",
74
+ "$ref" : "./base_types/base_types.json#definitions/amount"
75
+ },
76
+ "transaction_volume_limit" : {
77
+ "description" : "Transaction volume limit in minor units, e.g. 1EUR is represented as 100. Must be greater than 0 e.g. at least one cent in EUR",
78
+ "$ref" : "./base_types/base_types.json#definitions/amount"
79
+ },
80
+ "email_notification" : {
81
+ "description" : "Email notification",
82
+ "type" : "boolean",
83
+ "default" : true
84
+ },
85
+ "sms_notification" : {
86
+ "description" : "SMS notification",
87
+ "type" : "boolean",
88
+ "default" : false
89
+ },
90
+ "payed" : {
91
+ "description" : "Card payed boolean",
92
+ "type" : "boolean",
93
+ "readOnly" : true
94
+ },
95
+ "state" : {
96
+ "description" : "State of the card",
97
+ "type" : "string",
98
+ "enum" : [
99
+ "created",
100
+ "mobile_tan_sent",
101
+ "card_registration_requirments_check",
102
+ "card_registration_pending",
103
+ "card_registration_in_progress",
104
+ "card_registration_canceled",
105
+ "card_registration_completed",
106
+ "active",
107
+ "revoked",
108
+ "canceled",
109
+ "disabled",
110
+ "lost",
111
+ "expired",
112
+ "annual_fee_pending_active",
113
+ "annual_fee_pending_registration_completed"
114
+ ],
115
+ "readOnly" : true
116
+ },
117
+ "lock_reason" : {
118
+ "description" : "Reason for card lock",
119
+ "type" : "string",
120
+ "enum" : [
121
+ "termination",
122
+ "compromised",
123
+ "lost",
124
+ "stolen",
125
+ "unneeded",
126
+ "better_offer",
127
+ "other_card",
128
+ "fraud"
129
+ ],
130
+ "readOnly" : true
131
+ },
132
+ "disabled" : {
133
+ "description" : "Card disabled boolean",
134
+ "type" : "boolean",
135
+ "readOnly" : true
136
+ },
137
+ "created_at" : {
138
+ "$ref" : "./base_types/base_types.json#definitions/created_at"
139
+ },
140
+ "updated_at" : {
141
+ "$ref" : "./base_types/base_types.json#definitions/updated_at"
142
+ }
143
+ },
144
+ "links" : [
145
+ {
146
+ "description" : "All cards of a customer",
147
+ "href" : "cards",
148
+ "method" : "GET",
149
+ "rel" : "instances",
150
+ "title" : "Index"
151
+ },
152
+ {
153
+ "description" : "Card details",
154
+ "href" : "cards/{id}",
155
+ "method" : "GET",
156
+ "rel" : "self",
157
+ "title" : "Show"
158
+ },
159
+ {
160
+ "description" : "Card PIN code",
161
+ "href" : "cards/{id}/pin",
162
+ "method" : "GET",
163
+ "rel" : "pin",
164
+ "title" : "PIN code",
165
+ "schema" : "pin"
166
+ },
167
+ {
168
+ "description" : "Card PAN number",
169
+ "href" : "cards/{id}/pan",
170
+ "method" : "GET",
171
+ "rel" : "pan",
172
+ "title" : "Permanent Account Number"
173
+ },
174
+ {
175
+ "description" : "Lock a card",
176
+ "href" : "cards/{id}/lock",
177
+ "method" : "PUT",
178
+ "rel" : "lock",
179
+ "title" : "Lock"
180
+ },
181
+ {
182
+ "description" : "Unlock a card",
183
+ "href" : "cards/{id}/unlock",
184
+ "method" : "PUT",
185
+ "rel" : "unlock",
186
+ "title" : "Unlock"
187
+ },
188
+ {
189
+ "description" : "Block a card: in case of fraud / lost / stolen card",
190
+ "href" : "cards/{id}/block",
191
+ "method" : "PUT",
192
+ "rel" : "block",
193
+ "title" : "Block"
194
+ },
195
+ {
196
+ "description" : "Activate a new card",
197
+ "href" : "cards/{id}/activate",
198
+ "method" : "PUT",
199
+ "rel" : "activate",
200
+ "title" : "Activate",
201
+ "properties" : {
202
+ "cvc_code" : {
203
+ "description" : "Card's pin",
204
+ "type" : "string",
205
+ "pattern" : "^[0-9]{3}$"
206
+ }
207
+ }
208
+ },
209
+ {
210
+ "description" : "Cancel an existing card: cancel card subscription, lock card",
211
+ "href" : "cards/{id}/cancel",
212
+ "method" : "PUT",
213
+ "rel" : "cancel",
214
+ "title" : "Cancel"
215
+ },
216
+ {
217
+ "description" : "Update limits of a card",
218
+ "href" : "cards/{id}/limits",
219
+ "method" : "PUT",
220
+ "rel" : "limits",
221
+ "title" : "Update Limits"
222
+ },
223
+ {
224
+ "description" : "Create a new card and initiate the order",
225
+ "href" : "cards",
226
+ "method" : "POST",
227
+ "rel" : "create",
228
+ "title" : "Create",
229
+ "properties" : {
230
+ "pin" : {
231
+ "$ref" : "./card/pin.json#properties/pin"
232
+ }
233
+ }
234
+ }
235
+ ]
236
+ }
@@ -10,7 +10,7 @@
10
10
  "account_id" : {
11
11
  "description" : "An account creditor identities belong to",
12
12
  "$ref" : "./base_types/base_types.json#definitions/account_id",
13
- "readonly" : true
13
+ "readOnly" : true
14
14
  },
15
15
  "created_at" : {
16
16
  "$ref" : "./base_types/base_types.json#definitions/created_at"