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
@@ -0,0 +1,111 @@
1
+ {
2
+ "protocol" : "Offer",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "Package",
7
+ "fields" : [ {
8
+ "name" : "id",
9
+ "type" : "int",
10
+ "doc" : "The primary key"
11
+ }, {
12
+ "name" : "name",
13
+ "type" : "string"
14
+ }, {
15
+ "name" : "short_description",
16
+ "type" : "string"
17
+ }, {
18
+ "name" : "call",
19
+ "type" : "boolean"
20
+ }, {
21
+ "name" : "call_duration_in_minutes",
22
+ "type" : "int"
23
+ }, {
24
+ "name" : "document",
25
+ "type" : "boolean"
26
+ }, {
27
+ "name" : "max_document_length_in_pages",
28
+ "type" : "int"
29
+ }, {
30
+ "name" : "claim_game",
31
+ "type" : "boolean"
32
+ }, {
33
+ "name" : "offline",
34
+ "type" : "boolean"
35
+ }, {
36
+ "name" : "specialty_id",
37
+ "type" : "int"
38
+ }, {
39
+ "name" : "micro_description",
40
+ "type" : "string"
41
+ } ]
42
+ }, {
43
+ "type" : "record",
44
+ "name" : "Offer",
45
+ "doc" : "The main class for this protocol",
46
+ "fields" : [ {
47
+ "name" : "id",
48
+ "type" : "int",
49
+ "doc" : "The primary key"
50
+ }, {
51
+ "name" : "state_id",
52
+ "type" : "int"
53
+ }, {
54
+ "name" : "consumer_fee_in_cents",
55
+ "type" : "int"
56
+ }, {
57
+ "name" : "package",
58
+ "type" : "Package"
59
+ } ]
60
+ }, {
61
+ "type" : "record",
62
+ "name" : "OfferFetchOption",
63
+ "fields" : [ {
64
+ "name" : "page",
65
+ "type" : "int",
66
+ "doc" : "Which page of records to fetch",
67
+ "default" : 1
68
+ }, {
69
+ "name" : "per_page",
70
+ "type" : "int",
71
+ "doc" : "How many records per page",
72
+ "default" : 10
73
+ }, {
74
+ "name" : "package_id",
75
+ "type" : "int",
76
+ "doc" : "The ID of the package this offer is associated with."
77
+ }, {
78
+ "name" : "enabled",
79
+ "type" : "boolean",
80
+ "doc" : "Enabled meaning it is available for the public to purchase."
81
+ }, {
82
+ "name" : "name",
83
+ "type" : "string",
84
+ "doc" : "The name of the package this offer is associated with."
85
+ } ]
86
+ } ],
87
+ "messages" : {
88
+ "index" : {
89
+ "doc" : "Returns a list of Offers",
90
+ "request" : [ {
91
+ "name" : "options",
92
+ "type" : "OfferFetchOption"
93
+ } ],
94
+ "response" : {
95
+ "type" : "array",
96
+ "items" : "Offer"
97
+ }
98
+ },
99
+ "show" : {
100
+ "doc" : "Return a single Offer",
101
+ "request" : [ {
102
+ "name" : "id",
103
+ "type" : "int"
104
+ } ],
105
+ "response" : {
106
+ "type" : "array",
107
+ "items" : "Offer"
108
+ }
109
+ }
110
+ }
111
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "protocol" : "Package",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "Package",
7
+ "doc" : "The main class for this protocol",
8
+ "fields" : [ {
9
+ "name" : "id",
10
+ "type" : "int",
11
+ "doc" : "The primary key"
12
+ }, {
13
+ "name" : "name",
14
+ "type" : "string"
15
+ }, {
16
+ "name" : "short_description",
17
+ "type" : "string"
18
+ }, {
19
+ "name" : "call",
20
+ "type" : "boolean"
21
+ }, {
22
+ "name" : "call_duration_in_minutes",
23
+ "type" : "int"
24
+ }, {
25
+ "name" : "document",
26
+ "type" : "boolean"
27
+ }, {
28
+ "name" : "max_document_length_in_pages",
29
+ "type" : "int"
30
+ }, {
31
+ "name" : "claim_game",
32
+ "type" : "boolean"
33
+ }, {
34
+ "name" : "offline",
35
+ "type" : "boolean"
36
+ }, {
37
+ "name" : "specialty_id",
38
+ "type" : "int"
39
+ }, {
40
+ "name" : "micro_description",
41
+ "type" : "string"
42
+ } ]
43
+ }, {
44
+ "type" : "record",
45
+ "name" : "PackageFetchOption",
46
+ "fields" : [ {
47
+ "name" : "page",
48
+ "type" : "int",
49
+ "doc" : "Which page of records to fetch",
50
+ "default" : 1
51
+ }, {
52
+ "name" : "per_page",
53
+ "type" : "int",
54
+ "doc" : "How many records per page",
55
+ "default" : 10
56
+ }, {
57
+ "name" : "specialty_id",
58
+ "type" : "int"
59
+ } ]
60
+ } ],
61
+ "messages" : {
62
+ "index" : {
63
+ "doc" : "Returns a list of Packages",
64
+ "request" : [ {
65
+ "name" : "options",
66
+ "type" : "PackageFetchOption"
67
+ } ],
68
+ "response" : {
69
+ "type" : "array",
70
+ "items" : "Package"
71
+ }
72
+ },
73
+ "show" : {
74
+ "doc" : "Return a single Package",
75
+ "request" : [ {
76
+ "name" : "id",
77
+ "type" : "int"
78
+ } ],
79
+ "response" : {
80
+ "type" : "array",
81
+ "items" : "Package"
82
+ }
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,100 @@
1
+ {
2
+ "protocol" : "PackageDetail",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "Package",
7
+ "doc" : "The main class for this protocol",
8
+ "fields" : [ {
9
+ "name" : "id",
10
+ "type" : "int",
11
+ "doc" : "The primary key"
12
+ }, {
13
+ "name" : "name",
14
+ "type" : "string"
15
+ }, {
16
+ "name" : "short_description",
17
+ "type" : "string"
18
+ }, {
19
+ "name" : "call",
20
+ "type" : "boolean"
21
+ }, {
22
+ "name" : "call_duration_in_minutes",
23
+ "type" : "int"
24
+ }, {
25
+ "name" : "document",
26
+ "type" : "boolean"
27
+ }, {
28
+ "name" : "max_document_length_in_pages",
29
+ "type" : "int"
30
+ }, {
31
+ "name" : "claim_game",
32
+ "type" : "boolean"
33
+ }, {
34
+ "name" : "offline",
35
+ "type" : "boolean"
36
+ }, {
37
+ "name" : "specialty_id",
38
+ "type" : "int"
39
+ }, {
40
+ "name" : "how_it_works",
41
+ "type" : "string"
42
+ }, {
43
+ "name" : "whats_included",
44
+ "type" : "string"
45
+ }, {
46
+ "name" : "whats_not_included",
47
+ "type" : "string"
48
+ }, {
49
+ "name" : "micro_description",
50
+ "type" : "string"
51
+ }, {
52
+ "name" : "right_for_you_if",
53
+ "type" : "string"
54
+ }, {
55
+ "name" : "hero_image_url",
56
+ "type" : "string"
57
+ } ]
58
+ }, {
59
+ "type" : "record",
60
+ "name" : "PackageFetchOption",
61
+ "fields" : [ {
62
+ "name" : "page",
63
+ "type" : "int",
64
+ "doc" : "Which page of records to fetch",
65
+ "default" : 1
66
+ }, {
67
+ "name" : "per_page",
68
+ "type" : "int",
69
+ "doc" : "How many records per page",
70
+ "default" : 10
71
+ }, {
72
+ "name" : "specialty_id",
73
+ "type" : "int"
74
+ } ]
75
+ } ],
76
+ "messages" : {
77
+ "index" : {
78
+ "doc" : "Returns a list of Packages",
79
+ "request" : [ {
80
+ "name" : "options",
81
+ "type" : "PackageFetchOption"
82
+ } ],
83
+ "response" : {
84
+ "type" : "array",
85
+ "items" : "Package"
86
+ }
87
+ },
88
+ "show" : {
89
+ "doc" : "Return a single Package",
90
+ "request" : [ {
91
+ "name" : "id",
92
+ "type" : "int"
93
+ } ],
94
+ "response" : {
95
+ "type" : "array",
96
+ "items" : "Package"
97
+ }
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "protocol" : "PackageSlug",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "PackageSlug",
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" : "name",
17
+ "type" : "string"
18
+ }, {
19
+ "name" : "slug",
20
+ "type" : "string"
21
+ } ]
22
+ }, {
23
+ "type" : "record",
24
+ "name" : "PackageFetchOption",
25
+ "fields" : [ {
26
+ "name" : "page",
27
+ "type" : "int",
28
+ "doc" : "Which page of records to fetch",
29
+ "default" : 1
30
+ }, {
31
+ "name" : "per_page",
32
+ "type" : "int",
33
+ "doc" : "How many records per page",
34
+ "default" : 10
35
+ }, {
36
+ "name" : "specialty_id",
37
+ "type" : "int"
38
+ }, {
39
+ "name" : "advisor",
40
+ "type" : "boolean"
41
+ } ]
42
+ } ],
43
+ "messages" : {
44
+ "index" : {
45
+ "doc" : "Returns a list of PackageSlugs",
46
+ "request" : [ {
47
+ "name" : "options",
48
+ "type" : "PackageFetchOption"
49
+ } ],
50
+ "response" : {
51
+ "type" : "array",
52
+ "items" : "PackageSlug"
53
+ }
54
+ },
55
+ "show" : {
56
+ "doc" : "Return a single PackageSlug",
57
+ "request" : [ {
58
+ "name" : "id",
59
+ "type" : "int"
60
+ } ],
61
+ "response" : {
62
+ "type" : "array",
63
+ "items" : "PackageSlug"
64
+ }
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "protocol" : "Promotion",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "Promotion",
7
+ "fields" : [ {
8
+ "name" : "discount_amount_in_cents",
9
+ "type" : "int"
10
+ }, {
11
+ "name" : "new_total_price_in_cents",
12
+ "type" : "int"
13
+ } ]
14
+ }, {
15
+ "type" : "record",
16
+ "name" : "PromotionFetchOption",
17
+ "fields" : [ {
18
+ "name" : "page",
19
+ "type" : "int",
20
+ "default" : 1
21
+ }, {
22
+ "name" : "per_page",
23
+ "type" : "int",
24
+ "default" : 10
25
+ }, {
26
+ "name" : "offer_id",
27
+ "type" : "int"
28
+ }, {
29
+ "name" : "short_code",
30
+ "type" : "string"
31
+ } ]
32
+ } ],
33
+ "messages" : {
34
+ "index" : {
35
+ "request" : [ {
36
+ "name" : "options",
37
+ "type" : "PromotionFetchOption"
38
+ } ],
39
+ "response" : {
40
+ "type" : "array",
41
+ "items" : "Promotion"
42
+ }
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,144 @@
1
+ {
2
+ "protocol" : "ProviderOffer",
3
+ "namespace" : "Switchboard",
4
+ "types" : [ {
5
+ "type" : "record",
6
+ "name" : "Package",
7
+ "doc" : "The main class for this protocol",
8
+ "fields" : [ {
9
+ "name" : "id",
10
+ "type" : "int",
11
+ "doc" : "The primary key"
12
+ }, {
13
+ "name" : "name",
14
+ "type" : "string"
15
+ }, {
16
+ "name" : "short_description",
17
+ "type" : "string"
18
+ }, {
19
+ "name" : "call",
20
+ "type" : "boolean"
21
+ }, {
22
+ "name" : "call_duration_in_minutes",
23
+ "type" : "int"
24
+ }, {
25
+ "name" : "document",
26
+ "type" : "boolean"
27
+ }, {
28
+ "name" : "max_document_length_in_pages",
29
+ "type" : "int"
30
+ }, {
31
+ "name" : "claim_game",
32
+ "type" : "boolean"
33
+ }, {
34
+ "name" : "offline",
35
+ "type" : "boolean"
36
+ }, {
37
+ "name" : "specialty_id",
38
+ "type" : "int"
39
+ }, {
40
+ "name" : "micro_description",
41
+ "type" : "string"
42
+ } ]
43
+ }, {
44
+ "type" : "record",
45
+ "name" : "PackageFetchOption",
46
+ "fields" : [ {
47
+ "name" : "page",
48
+ "type" : "int",
49
+ "doc" : "Which page of records to fetch",
50
+ "default" : 1
51
+ }, {
52
+ "name" : "per_page",
53
+ "type" : "int",
54
+ "doc" : "How many records per page",
55
+ "default" : 10
56
+ }, {
57
+ "name" : "specialty_id",
58
+ "type" : "int"
59
+ } ]
60
+ }, {
61
+ "type" : "record",
62
+ "name" : "ProviderOffer",
63
+ "doc" : "The main class for this protocol",
64
+ "fields" : [ {
65
+ "name" : "id",
66
+ "type" : "int",
67
+ "doc" : "The primary key"
68
+ }, {
69
+ "name" : "state_id",
70
+ "type" : "int"
71
+ }, {
72
+ "name" : "lawyer_id",
73
+ "type" : "int"
74
+ }, {
75
+ "name" : "provider_id",
76
+ "type" : "int"
77
+ }, {
78
+ "name" : "offer_id",
79
+ "type" : "int"
80
+ }, {
81
+ "name" : "consumer_fee_in_cents",
82
+ "type" : "int"
83
+ }, {
84
+ "name" : "available",
85
+ "type" : "boolean"
86
+ }, {
87
+ "name" : "package",
88
+ "type" : "Package"
89
+ } ]
90
+ }, {
91
+ "type" : "record",
92
+ "name" : "ProviderOfferFetchOption",
93
+ "fields" : [ {
94
+ "name" : "page",
95
+ "type" : "int",
96
+ "doc" : "Which page of records to fetch",
97
+ "default" : 1
98
+ }, {
99
+ "name" : "per_page",
100
+ "type" : "int",
101
+ "doc" : "How many records per page",
102
+ "default" : 10
103
+ }, {
104
+ "name" : "provider_id",
105
+ "type" : "int"
106
+ }, {
107
+ "name" : "offer_id",
108
+ "type" : "int"
109
+ }, {
110
+ "name" : "state_id",
111
+ "type" : "int"
112
+ }, {
113
+ "name" : "specialty_id",
114
+ "type" : "int"
115
+ }, {
116
+ "name" : "available",
117
+ "type" : "boolean"
118
+ } ]
119
+ } ],
120
+ "messages" : {
121
+ "index" : {
122
+ "doc" : "Returns a list of ProviderOffers",
123
+ "request" : [ {
124
+ "name" : "options",
125
+ "type" : "ProviderOfferFetchOption"
126
+ } ],
127
+ "response" : {
128
+ "type" : "array",
129
+ "items" : "ProviderOffer"
130
+ }
131
+ },
132
+ "show" : {
133
+ "doc" : "Return a single ProviderOffer",
134
+ "request" : [ {
135
+ "name" : "id",
136
+ "type" : "int"
137
+ } ],
138
+ "response" : {
139
+ "type" : "array",
140
+ "items" : "ProviderOffer"
141
+ }
142
+ }
143
+ }
144
+ }