switchboard-contract 1.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/README.md +31 -0
  4. data/Rakefile +3 -0
  5. data/contracts/3/compiled/advice_session.avpr +190 -0
  6. data/contracts/3/compiled/advice_session_image.avpr +36 -0
  7. data/contracts/3/compiled/advice_session_review.avpr +90 -0
  8. data/contracts/3/compiled/advisor.avpr +77 -0
  9. data/contracts/3/compiled/advisor_config.avpr +38 -0
  10. data/contracts/3/compiled/lawyer.avpr +83 -0
  11. data/contracts/3/compiled/location.avpr +128 -0
  12. data/contracts/3/compiled/offer.avpr +111 -0
  13. data/contracts/3/compiled/package.avpr +85 -0
  14. data/contracts/3/compiled/package_detail.avpr +100 -0
  15. data/contracts/3/compiled/provider_offer.avpr +144 -0
  16. data/contracts/3/compiled/specialty.avpr +61 -0
  17. data/contracts/3/compiled/user.avpr +50 -0
  18. data/contracts/3/compiled/user_authentication.avpr +111 -0
  19. data/contracts/3/source/advice_session.avdl +72 -0
  20. data/contracts/3/source/advice_session_image.avdl +16 -0
  21. data/contracts/3/source/advice_session_review.avdl +40 -0
  22. data/contracts/3/source/advisor.avdl +30 -0
  23. data/contracts/3/source/advisor_config.avdl +17 -0
  24. data/contracts/3/source/common.inc +20 -0
  25. data/contracts/3/source/lawyer.avdl +45 -0
  26. data/contracts/3/source/location.avdl +76 -0
  27. data/contracts/3/source/offer.avdl +51 -0
  28. data/contracts/3/source/package.avdl +36 -0
  29. data/contracts/3/source/package_detail.avdl +41 -0
  30. data/contracts/3/source/provider_offer.avdl +38 -0
  31. data/contracts/3/source/specialty.avdl +33 -0
  32. data/contracts/3/source/user.avdl +12 -0
  33. data/contracts/3/source/user_authentication.avdl +57 -0
  34. data/contracts/4/compiled/lawyer.avpr +127 -0
  35. data/contracts/4/compiled/lawyer_address.avpr +54 -0
  36. data/contracts/4/compiled/review.avpr +44 -0
  37. data/contracts/4/compiled/specialty.avpr +43 -0
  38. data/contracts/4/source/lawyer.avdl +69 -0
  39. data/contracts/4/source/lawyer_address.avdl +31 -0
  40. data/contracts/4/source/review.avdl +28 -0
  41. data/contracts/4/source/specialty.avdl +23 -0
  42. data/contracts/messaging/compiled/access_token.avpr +41 -0
  43. data/contracts/messaging/compiled/channel.avpr +111 -0
  44. data/contracts/messaging/source/access_token.avdl +21 -0
  45. data/contracts/messaging/source/channel.avdl +59 -0
  46. data/contracts/mobile/compiled/advice_session.avpr +160 -0
  47. data/contracts/mobile/compiled/checkout.avpr +115 -0
  48. data/contracts/mobile/compiled/lawyer.avpr +787 -0
  49. data/contracts/mobile/compiled/offer.avpr +111 -0
  50. data/contracts/mobile/compiled/package.avpr +85 -0
  51. data/contracts/mobile/compiled/package_detail.avpr +100 -0
  52. data/contracts/mobile/compiled/package_slug.avpr +67 -0
  53. data/contracts/mobile/compiled/promotion.avpr +45 -0
  54. data/contracts/mobile/compiled/provider_offer.avpr +144 -0
  55. data/contracts/mobile/compiled/review.avpr +83 -0
  56. data/contracts/mobile/compiled/specialty.avpr +55 -0
  57. data/contracts/mobile/source/advice_session.avdl +61 -0
  58. data/contracts/mobile/source/checkout.avdl +90 -0
  59. data/contracts/mobile/source/lawyer.avdl +321 -0
  60. data/contracts/mobile/source/offer.avdl +51 -0
  61. data/contracts/mobile/source/package.avdl +36 -0
  62. data/contracts/mobile/source/package_detail.avdl +41 -0
  63. data/contracts/mobile/source/package_slug.avdl +30 -0
  64. data/contracts/mobile/source/promotion.avdl +18 -0
  65. data/contracts/mobile/source/provider_offer.avdl +38 -0
  66. data/contracts/mobile/source/review.avdl +43 -0
  67. data/contracts/mobile/source/specialty.avdl +32 -0
  68. data/contracts/sales_force/compiled/account.avpr +94 -0
  69. data/contracts/sales_force/compiled/account_professional.avpr +39 -0
  70. data/contracts/sales_force/source/account.avdl +50 -0
  71. data/contracts/sales_force/source/account_professional.avdl +14 -0
  72. data/contracts/verify/compiled/lawyer.avpr +79 -0
  73. data/contracts/verify/compiled/license.avpr +64 -0
  74. data/contracts/verify/source/lawyer.avdl +41 -0
  75. data/contracts/verify/source/license.avdl +36 -0
  76. data/lib/switchboard/contract.rb +8 -0
  77. data/lib/switchboard/contract/documentation.rb +7 -0
  78. data/lib/switchboard/contract/service.rb +15 -0
  79. data/lib/switchboard/contract/version.rb +5 -0
  80. metadata +164 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ed8d6e58c26c4e0c6e42c8046bfed2189a1e51d0
4
+ data.tar.gz: bc8466c282c739dfbd252298f0138956baef4fbc
5
+ SHA512:
6
+ metadata.gz: 1fed756aea747672deb05f508adfc5aed1a8076016dcd19cd4e237992719c5584a5c146d919eb2e62bf55cecd14ca62af18490a74b2f662abd820ddf2b5b3cc8
7
+ data.tar.gz: a37bba17095a39b40149f3c160f05c6f29b500ad07a3b9df5ad17086a7464636b69cc0edabee04e7591afb1afc512e4c844c8b7562697965e5b7541be73c9020
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Jeff Ching
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Switchboard::Contract
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'switchboard-contract'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install switchboard-contract
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/switchboard-contract/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'service_contract/tasks'
@@ -0,0 +1,190 @@
1
+ {
2
+ "protocol" : "AdviceSession",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "AdviceSession",
7
+ "doc" : "The main class for this protocol",
8
+ "fields" : [ {
9
+ "name" : "id",
10
+ "type" : "int",
11
+ "doc" : "The primary key"
12
+ }, {
13
+ "name" : "specialty_id",
14
+ "type" : "int"
15
+ }, {
16
+ "name" : "advisor_id",
17
+ "type" : "int"
18
+ }, {
19
+ "name" : "review_id",
20
+ "type" : "int"
21
+ }, {
22
+ "name" : "chose_advisor",
23
+ "type" : "boolean"
24
+ }, {
25
+ "name" : "state",
26
+ "type" : "string"
27
+ }, {
28
+ "name" : "called",
29
+ "type" : "boolean"
30
+ }, {
31
+ "name" : "advice_session_image_token",
32
+ "type" : [ "null", "string" ],
33
+ "default" : null
34
+ }, {
35
+ "name" : "advice_session_image_tokens",
36
+ "type" : {
37
+ "type" : "array",
38
+ "items" : "string"
39
+ }
40
+ }, {
41
+ "name" : "name",
42
+ "type" : "string"
43
+ }, {
44
+ "name" : "email_address",
45
+ "type" : "string"
46
+ }, {
47
+ "name" : "phone_number",
48
+ "type" : "string"
49
+ }, {
50
+ "name" : "payment_amount",
51
+ "type" : "int"
52
+ }, {
53
+ "name" : "promo_code",
54
+ "type" : "string"
55
+ }, {
56
+ "name" : "offer_id",
57
+ "type" : "int"
58
+ }, {
59
+ "name" : "location_id",
60
+ "type" : "int"
61
+ }, {
62
+ "name" : "lawyer_id",
63
+ "type" : "int"
64
+ }, {
65
+ "name" : "package_id",
66
+ "type" : "int"
67
+ }, {
68
+ "name" : "package_name",
69
+ "type" : "string"
70
+ } ]
71
+ }, {
72
+ "type" : "record",
73
+ "name" : "AdviceSessionFetchOption",
74
+ "doc" : "Options you can send for limiting AdviceSession results",
75
+ "fields" : [ {
76
+ "name" : "page",
77
+ "type" : "int",
78
+ "doc" : "Which page of records to fetch",
79
+ "default" : 1
80
+ }, {
81
+ "name" : "per_page",
82
+ "type" : "int",
83
+ "doc" : "How many records per page",
84
+ "default" : 30
85
+ } ]
86
+ }, {
87
+ "type" : "record",
88
+ "name" : "AdviceSessionCreateParams",
89
+ "doc" : "Params to create a new AdviceSession",
90
+ "fields" : [ {
91
+ "name" : "specialty_id",
92
+ "type" : "int"
93
+ }, {
94
+ "name" : "advisor_id",
95
+ "type" : "int"
96
+ }, {
97
+ "name" : "state",
98
+ "type" : "string"
99
+ }, {
100
+ "name" : "client_name",
101
+ "type" : "string"
102
+ }, {
103
+ "name" : "client_email_address",
104
+ "type" : "string"
105
+ }, {
106
+ "name" : "client_phone_number",
107
+ "type" : "string"
108
+ }, {
109
+ "name" : "payment_gateway",
110
+ "type" : [ "null", "string" ],
111
+ "default" : null
112
+ }, {
113
+ "name" : "card_href",
114
+ "type" : "string"
115
+ }, {
116
+ "name" : "name_on_card",
117
+ "type" : "string"
118
+ }, {
119
+ "name" : "advice_session_image_token",
120
+ "type" : [ "null", "string" ],
121
+ "default" : null
122
+ }, {
123
+ "name" : "advice_session_image_tokens",
124
+ "type" : {
125
+ "type" : "array",
126
+ "items" : "string"
127
+ }
128
+ }, {
129
+ "name" : "promo_code",
130
+ "type" : [ "null", "string" ],
131
+ "default" : null
132
+ } ]
133
+ }, {
134
+ "type" : "record",
135
+ "name" : "AdviceSessionPromoCode",
136
+ "fields" : [ {
137
+ "name" : "promo_discount_amount_in_cents",
138
+ "type" : "int"
139
+ }, {
140
+ "name" : "promo_advice_session_price_in_cents",
141
+ "type" : "int"
142
+ } ]
143
+ } ],
144
+ "messages" : {
145
+ "index" : {
146
+ "doc" : "Returns a list of AdviceSession",
147
+ "request" : [ {
148
+ "name" : "options",
149
+ "type" : "AdviceSessionFetchOption"
150
+ } ],
151
+ "response" : {
152
+ "type" : "array",
153
+ "items" : "AdviceSession"
154
+ }
155
+ },
156
+ "show" : {
157
+ "doc" : "Return a single AdviceSession",
158
+ "request" : [ {
159
+ "name" : "id",
160
+ "type" : "int"
161
+ } ],
162
+ "response" : {
163
+ "type" : "array",
164
+ "items" : "AdviceSession"
165
+ }
166
+ },
167
+ "create" : {
168
+ "doc" : "Create a new AdviceSession",
169
+ "request" : [ {
170
+ "name" : "advice_session",
171
+ "type" : "AdviceSessionCreateParams"
172
+ } ],
173
+ "response" : {
174
+ "type" : "array",
175
+ "items" : "AdviceSession"
176
+ }
177
+ },
178
+ "find_promo_code" : {
179
+ "doc" : "Apply an Advice Session Promo Code",
180
+ "request" : [ {
181
+ "name" : "promo_code",
182
+ "type" : "string"
183
+ } ],
184
+ "response" : {
185
+ "type" : "array",
186
+ "items" : "AdviceSessionPromoCode"
187
+ }
188
+ }
189
+ }
190
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "protocol" : "AdviceSessionImage",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "AdviceSessionImage",
7
+ "doc" : "The main class for this protocol",
8
+ "fields" : [ {
9
+ "name" : "token",
10
+ "type" : "string"
11
+ } ]
12
+ }, {
13
+ "type" : "record",
14
+ "name" : "AdviceSessionImageCreateParams",
15
+ "fields" : [ {
16
+ "name" : "data",
17
+ "type" : "string"
18
+ }, {
19
+ "name" : "content_type",
20
+ "type" : "string"
21
+ } ]
22
+ } ],
23
+ "messages" : {
24
+ "create" : {
25
+ "doc" : "Create a new AdviceSessionImage",
26
+ "request" : [ {
27
+ "name" : "advice_session_image",
28
+ "type" : "AdviceSessionImageCreateParams"
29
+ } ],
30
+ "response" : {
31
+ "type" : "array",
32
+ "items" : "AdviceSessionImage"
33
+ }
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ "protocol" : "AdviceSessionReview",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "AdviceSessionReview",
7
+ "doc" : "The main class for this protocol",
8
+ "fields" : [ {
9
+ "name" : "id",
10
+ "type" : "int",
11
+ "doc" : "The primary key"
12
+ }, {
13
+ "name" : "advice_session_id",
14
+ "type" : "int"
15
+ }, {
16
+ "name" : "rating",
17
+ "type" : "int"
18
+ }, {
19
+ "name" : "body",
20
+ "type" : "string"
21
+ }, {
22
+ "name" : "approval_status_id",
23
+ "type" : "int"
24
+ } ]
25
+ }, {
26
+ "type" : "record",
27
+ "name" : "AdviceSessionReviewCreateParams",
28
+ "doc" : "Params to create a new Review",
29
+ "fields" : [ {
30
+ "name" : "advice_session_id",
31
+ "type" : "int"
32
+ }, {
33
+ "name" : "rating",
34
+ "type" : "int"
35
+ }, {
36
+ "name" : "body",
37
+ "type" : "string"
38
+ } ]
39
+ }, {
40
+ "type" : "record",
41
+ "name" : "AdviceSessionReviewFetchOption",
42
+ "doc" : "Options you can send for limiting Review results",
43
+ "fields" : [ {
44
+ "name" : "page",
45
+ "type" : "int",
46
+ "doc" : "Which page of records to fetch",
47
+ "default" : 1
48
+ }, {
49
+ "name" : "per_page",
50
+ "type" : "int",
51
+ "doc" : "How many records per page",
52
+ "default" : 20
53
+ } ]
54
+ } ],
55
+ "messages" : {
56
+ "show" : {
57
+ "doc" : "Return a single Review",
58
+ "request" : [ {
59
+ "name" : "id",
60
+ "type" : "int"
61
+ } ],
62
+ "response" : {
63
+ "type" : "array",
64
+ "items" : "AdviceSessionReview"
65
+ }
66
+ },
67
+ "create" : {
68
+ "doc" : "Create a new Review",
69
+ "request" : [ {
70
+ "name" : "advice_session_review",
71
+ "type" : "AdviceSessionReviewCreateParams"
72
+ } ],
73
+ "response" : {
74
+ "type" : "array",
75
+ "items" : "AdviceSessionReview"
76
+ }
77
+ },
78
+ "index" : {
79
+ "doc" : "Returns a list of Review",
80
+ "request" : [ {
81
+ "name" : "options",
82
+ "type" : "AdviceSessionReviewFetchOption"
83
+ } ],
84
+ "response" : {
85
+ "type" : "array",
86
+ "items" : "AdviceSessionReview"
87
+ }
88
+ }
89
+ }
90
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "protocol" : "Advisor",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "Advisor",
7
+ "doc" : "The main class for this protocol",
8
+ "fields" : [ {
9
+ "name" : "id",
10
+ "type" : "int",
11
+ "doc" : "The primary key"
12
+ }, {
13
+ "name" : "lawyer_id",
14
+ "type" : "int"
15
+ }, {
16
+ "name" : "specialty_ids",
17
+ "type" : {
18
+ "type" : "array",
19
+ "items" : "int"
20
+ }
21
+ }, {
22
+ "name" : "states",
23
+ "type" : {
24
+ "type" : "array",
25
+ "items" : "string"
26
+ }
27
+ }, {
28
+ "name" : "available",
29
+ "type" : "boolean"
30
+ }, {
31
+ "name" : "offer_ids",
32
+ "type" : {
33
+ "type" : "array",
34
+ "items" : "int"
35
+ }
36
+ } ]
37
+ }, {
38
+ "type" : "record",
39
+ "name" : "AdvisorFetchOption",
40
+ "doc" : "Options you can send for limiting Advisor results",
41
+ "fields" : [ {
42
+ "name" : "page",
43
+ "type" : "int",
44
+ "doc" : "Which page of records to fetch",
45
+ "default" : 1
46
+ }, {
47
+ "name" : "per_page",
48
+ "type" : "int",
49
+ "doc" : "How many records per page",
50
+ "default" : 30
51
+ } ]
52
+ } ],
53
+ "messages" : {
54
+ "index" : {
55
+ "doc" : "Returns a list of Advisor",
56
+ "request" : [ {
57
+ "name" : "options",
58
+ "type" : "AdvisorFetchOption"
59
+ } ],
60
+ "response" : {
61
+ "type" : "array",
62
+ "items" : "Advisor"
63
+ }
64
+ },
65
+ "show" : {
66
+ "doc" : "Return a single Advisor",
67
+ "request" : [ {
68
+ "name" : "id",
69
+ "type" : "int"
70
+ } ],
71
+ "response" : {
72
+ "type" : "array",
73
+ "items" : "Advisor"
74
+ }
75
+ }
76
+ }
77
+ }