switchboard-contract 1.9.5

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.
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
@@ -0,0 +1,14 @@
1
+ @namespace("Switchboard")
2
+
3
+ protocol AccountProfessional {
4
+ record AccountProfessional {
5
+ /** sales force account id (string uuid) */
6
+ string account_id;
7
+
8
+ /** avvo account id */
9
+ int professional_id;
10
+ }
11
+
12
+ array<AccountProfessional> create(AccountProfessional params);
13
+ array<AccountProfessional> destroy(AccountProfessional params);
14
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "protocol" : "Lawyer",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "Lawyer",
7
+ "doc" : "The main class for this protocol",
8
+ "fields" : [ {
9
+ "name" : "id",
10
+ "type" : "int",
11
+ "doc" : "The primary key"
12
+ }, {
13
+ "name" : "firstname",
14
+ "type" : "string",
15
+ "doc" : "name"
16
+ }, {
17
+ "name" : "middlename",
18
+ "type" : "string"
19
+ }, {
20
+ "name" : "lastname",
21
+ "type" : "string"
22
+ }, {
23
+ "name" : "suffix",
24
+ "type" : "string"
25
+ }, {
26
+ "name" : "avvo_rating",
27
+ "type" : "float",
28
+ "doc" : "Avvo Rating (Scale of 1-10)"
29
+ }, {
30
+ "name" : "client_review_count",
31
+ "type" : "int",
32
+ "doc" : "Number of reviews the average is based upon"
33
+ }, {
34
+ "name" : "aggregate_client_review_score",
35
+ "type" : "float",
36
+ "doc" : "Average client review score (Scale of 1-5)"
37
+ }, {
38
+ "name" : "licensed_since",
39
+ "type" : "string",
40
+ "doc" : "year licensed since *"
41
+ }, {
42
+ "name" : "specialties",
43
+ "type" : {
44
+ "type" : "array",
45
+ "items" : "string"
46
+ },
47
+ "doc" : "List of specialties this lawyer practices"
48
+ } ]
49
+ } ],
50
+ "messages" : {
51
+ "index" : {
52
+ "doc" : "Look up many lawyers in bulk",
53
+ "request" : [ ],
54
+ "response" : {
55
+ "type" : "array",
56
+ "items" : "Lawyer"
57
+ }
58
+ },
59
+ "show" : {
60
+ "doc" : "Look up a single lawyer by id",
61
+ "request" : [ {
62
+ "name" : "id",
63
+ "type" : "int"
64
+ } ],
65
+ "response" : {
66
+ "type" : "array",
67
+ "items" : "Lawyer"
68
+ }
69
+ },
70
+ "search" : {
71
+ "doc" : "Look up many lawyers in bulk",
72
+ "request" : [ ],
73
+ "response" : {
74
+ "type" : "array",
75
+ "items" : "Lawyer"
76
+ }
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "protocol" : "License",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "License",
7
+ "doc" : "The main class for this protocol",
8
+ "fields" : [ {
9
+ "name" : "id",
10
+ "type" : "int",
11
+ "doc" : "The primary key"
12
+ }, {
13
+ "name" : "authority_name",
14
+ "type" : "string",
15
+ "doc" : "name"
16
+ }, {
17
+ "name" : "state",
18
+ "type" : "string"
19
+ }, {
20
+ "name" : "status",
21
+ "type" : "string"
22
+ }, {
23
+ "name" : "license_number",
24
+ "type" : "string"
25
+ }, {
26
+ "name" : "status_type",
27
+ "type" : "string",
28
+ "doc" : "License's status *"
29
+ }, {
30
+ "name" : "license_date",
31
+ "type" : "int",
32
+ "doc" : "seconds from epoch since the license was issued *"
33
+ }, {
34
+ "name" : "lawyer_id",
35
+ "type" : "int",
36
+ "doc" : "primary key of the Lawyer object for this license"
37
+ }, {
38
+ "name" : "last_updated",
39
+ "type" : "int",
40
+ "doc" : "seconds from epoch when license was last updated"
41
+ } ]
42
+ } ],
43
+ "messages" : {
44
+ "index" : {
45
+ "doc" : "Look up many licenses in bulk",
46
+ "request" : [ ],
47
+ "response" : {
48
+ "type" : "array",
49
+ "items" : "License"
50
+ }
51
+ },
52
+ "show" : {
53
+ "doc" : "Look up a single license by id",
54
+ "request" : [ {
55
+ "name" : "id",
56
+ "type" : "int"
57
+ } ],
58
+ "response" : {
59
+ "type" : "array",
60
+ "items" : "License"
61
+ }
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,41 @@
1
+ @namespace("Switchboard")
2
+
3
+ protocol Lawyer {
4
+
5
+ /** The main class for this protocol */
6
+ record Lawyer {
7
+ /** The primary key */
8
+ int id;
9
+
10
+ /** name */
11
+ string firstname;
12
+ string middlename;
13
+ string lastname;
14
+ string suffix;
15
+
16
+ /** Avvo Rating (Scale of 1-10) */
17
+ float avvo_rating;
18
+
19
+ /** Number of reviews the average is based upon */
20
+ int client_review_count;
21
+
22
+ /** Average client review score (Scale of 1-5) */
23
+ float aggregate_client_review_score;
24
+
25
+ /** year licensed since **/
26
+ string licensed_since;
27
+
28
+ /** List of specialties this lawyer practices */
29
+ array<string> specialties;
30
+
31
+ }
32
+
33
+ /** Look up many lawyers in bulk */
34
+ array<Lawyer> index();
35
+
36
+ /** Look up a single lawyer by id */
37
+ array<Lawyer> show(int id);
38
+
39
+ /** Look up many lawyers in bulk */
40
+ array<Lawyer> search();
41
+ }
@@ -0,0 +1,36 @@
1
+ @namespace("Switchboard")
2
+
3
+ protocol License {
4
+
5
+ /** The main class for this protocol */
6
+ record License {
7
+ /** The primary key */
8
+ int id;
9
+
10
+ /** name */
11
+ string authority_name;
12
+ string state;
13
+ string status;
14
+ string license_number;
15
+
16
+ /** License's status **/
17
+ string status_type;
18
+
19
+ /** seconds from epoch since the license was issued **/
20
+ int license_date;
21
+
22
+ /** primary key of the Lawyer object for this license */
23
+ int lawyer_id;
24
+
25
+ /** seconds from epoch when license was last updated */
26
+ int last_updated;
27
+
28
+ }
29
+
30
+ /** Look up many licenses in bulk */
31
+ array<License> index();
32
+
33
+ /** Look up a single license by id */
34
+ array<License> show(int id);
35
+
36
+ }
@@ -0,0 +1,8 @@
1
+ require 'service_contract'
2
+
3
+ module Switchboard
4
+ module Contract
5
+ autoload :Documentation, "switchboard/contract/documentation"
6
+ autoload :Service, "switchboard/contract/service"
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ class Switchboard::Contract::Documentation < ServiceContract::Avro::Documentation
2
+ helpers do
3
+ def service
4
+ Switchboard::Contract::Service
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ class Switchboard::Contract::Service < ServiceContract::Avro::Service
2
+ class << self
3
+ def data_dir
4
+ File.expand_path("../../../../contracts", __FILE__)
5
+ end
6
+
7
+ def title
8
+ "Switchboard-contract"
9
+ end
10
+
11
+ def description
12
+ "Switchboard-contract"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ module Switchboard
2
+ module Contract
3
+ VERSION = "1.9.5"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,164 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: switchboard-contract
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.9.5
5
+ platform: ruby
6
+ authors:
7
+ - Jeff Ching
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-02-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: service_contract
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description: Service Contract for Avvo's Public API
56
+ email:
57
+ - jching@avvo.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - LICENSE.txt
63
+ - README.md
64
+ - Rakefile
65
+ - contracts/3/compiled/advice_session.avpr
66
+ - contracts/3/compiled/advice_session_image.avpr
67
+ - contracts/3/compiled/advice_session_review.avpr
68
+ - contracts/3/compiled/advisor.avpr
69
+ - contracts/3/compiled/advisor_config.avpr
70
+ - contracts/3/compiled/lawyer.avpr
71
+ - contracts/3/compiled/location.avpr
72
+ - contracts/3/compiled/offer.avpr
73
+ - contracts/3/compiled/package.avpr
74
+ - contracts/3/compiled/package_detail.avpr
75
+ - contracts/3/compiled/provider_offer.avpr
76
+ - contracts/3/compiled/specialty.avpr
77
+ - contracts/3/compiled/user.avpr
78
+ - contracts/3/compiled/user_authentication.avpr
79
+ - contracts/3/source/advice_session.avdl
80
+ - contracts/3/source/advice_session_image.avdl
81
+ - contracts/3/source/advice_session_review.avdl
82
+ - contracts/3/source/advisor.avdl
83
+ - contracts/3/source/advisor_config.avdl
84
+ - contracts/3/source/common.inc
85
+ - contracts/3/source/lawyer.avdl
86
+ - contracts/3/source/location.avdl
87
+ - contracts/3/source/offer.avdl
88
+ - contracts/3/source/package.avdl
89
+ - contracts/3/source/package_detail.avdl
90
+ - contracts/3/source/provider_offer.avdl
91
+ - contracts/3/source/specialty.avdl
92
+ - contracts/3/source/user.avdl
93
+ - contracts/3/source/user_authentication.avdl
94
+ - contracts/4/compiled/lawyer.avpr
95
+ - contracts/4/compiled/lawyer_address.avpr
96
+ - contracts/4/compiled/review.avpr
97
+ - contracts/4/compiled/specialty.avpr
98
+ - contracts/4/source/lawyer.avdl
99
+ - contracts/4/source/lawyer_address.avdl
100
+ - contracts/4/source/review.avdl
101
+ - contracts/4/source/specialty.avdl
102
+ - contracts/messaging/compiled/access_token.avpr
103
+ - contracts/messaging/compiled/channel.avpr
104
+ - contracts/messaging/source/access_token.avdl
105
+ - contracts/messaging/source/channel.avdl
106
+ - contracts/mobile/compiled/advice_session.avpr
107
+ - contracts/mobile/compiled/checkout.avpr
108
+ - contracts/mobile/compiled/lawyer.avpr
109
+ - contracts/mobile/compiled/offer.avpr
110
+ - contracts/mobile/compiled/package.avpr
111
+ - contracts/mobile/compiled/package_detail.avpr
112
+ - contracts/mobile/compiled/package_slug.avpr
113
+ - contracts/mobile/compiled/promotion.avpr
114
+ - contracts/mobile/compiled/provider_offer.avpr
115
+ - contracts/mobile/compiled/review.avpr
116
+ - contracts/mobile/compiled/specialty.avpr
117
+ - contracts/mobile/source/advice_session.avdl
118
+ - contracts/mobile/source/checkout.avdl
119
+ - contracts/mobile/source/lawyer.avdl
120
+ - contracts/mobile/source/offer.avdl
121
+ - contracts/mobile/source/package.avdl
122
+ - contracts/mobile/source/package_detail.avdl
123
+ - contracts/mobile/source/package_slug.avdl
124
+ - contracts/mobile/source/promotion.avdl
125
+ - contracts/mobile/source/provider_offer.avdl
126
+ - contracts/mobile/source/review.avdl
127
+ - contracts/mobile/source/specialty.avdl
128
+ - contracts/sales_force/compiled/account.avpr
129
+ - contracts/sales_force/compiled/account_professional.avpr
130
+ - contracts/sales_force/source/account.avdl
131
+ - contracts/sales_force/source/account_professional.avdl
132
+ - contracts/verify/compiled/lawyer.avpr
133
+ - contracts/verify/compiled/license.avpr
134
+ - contracts/verify/source/lawyer.avdl
135
+ - contracts/verify/source/license.avdl
136
+ - lib/switchboard/contract.rb
137
+ - lib/switchboard/contract/documentation.rb
138
+ - lib/switchboard/contract/service.rb
139
+ - lib/switchboard/contract/version.rb
140
+ homepage: ''
141
+ licenses:
142
+ - MIT
143
+ metadata: {}
144
+ post_install_message:
145
+ rdoc_options: []
146
+ require_paths:
147
+ - lib
148
+ required_ruby_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ requirements: []
159
+ rubyforge_project:
160
+ rubygems_version: 2.4.5.1
161
+ signing_key:
162
+ specification_version: 4
163
+ summary: Service Contract for Avvo's Public API
164
+ test_files: []