hubspot-ruby 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/hubspot-ruby.gemspec +42 -5
  3. data/lib/hubspot-ruby.rb +3 -0
  4. data/lib/hubspot/blog.rb +14 -48
  5. data/lib/hubspot/connection.rb +95 -0
  6. data/lib/hubspot/contact.rb +74 -91
  7. data/lib/hubspot/contact_list.rb +127 -0
  8. data/lib/hubspot/contact_properties.rb +12 -0
  9. data/lib/hubspot/deal.rb +29 -25
  10. data/lib/hubspot/exceptions.rb +2 -0
  11. data/lib/hubspot/form.rb +88 -4
  12. data/lib/hubspot/topic.rb +8 -24
  13. data/lib/hubspot/utils.rb +0 -51
  14. data/lib/hubspot/version.rb +1 -1
  15. data/spec/fixtures/vcr_cassettes/add_contacts_to_lists.yml +281 -0
  16. data/spec/fixtures/vcr_cassettes/contact_create.yml +34 -2
  17. data/spec/fixtures/vcr_cassettes/contact_create_existing_email.yml +34 -2
  18. data/spec/fixtures/vcr_cassettes/contact_create_invalid_email.yml +35 -3
  19. data/spec/fixtures/vcr_cassettes/contact_create_with_params.yml +34 -2
  20. data/spec/fixtures/vcr_cassettes/contact_destroy.yml +36 -4
  21. data/spec/fixtures/vcr_cassettes/contact_find_by_email_batch_mode.yml +509 -0
  22. data/spec/fixtures/vcr_cassettes/contact_find_by_id_batch_mode.yml +33 -0
  23. data/spec/fixtures/vcr_cassettes/contact_find_by_utk_batch_mode.yml +33 -0
  24. data/spec/fixtures/vcr_cassettes/contact_list_batch_find.yml +65 -0
  25. data/spec/fixtures/vcr_cassettes/contact_list_destroy.yml +63 -0
  26. data/spec/fixtures/vcr_cassettes/contact_list_example.yml +33 -0
  27. data/spec/fixtures/vcr_cassettes/contact_list_find.yml +96 -0
  28. data/spec/fixtures/vcr_cassettes/contact_list_refresh.yml +33 -0
  29. data/spec/fixtures/vcr_cassettes/contact_list_update.yml +36 -0
  30. data/spec/fixtures/vcr_cassettes/contacts_among_list.yml +189 -0
  31. data/spec/fixtures/vcr_cassettes/create_form.yml +39 -0
  32. data/spec/fixtures/vcr_cassettes/create_list.yml +36 -0
  33. data/spec/fixtures/vcr_cassettes/create_list_with_filters.yml +36 -0
  34. data/spec/fixtures/vcr_cassettes/deal_create.yml +29 -0
  35. data/spec/fixtures/vcr_cassettes/deal_find.yml +56 -0
  36. data/spec/fixtures/vcr_cassettes/destroy_deal.yml +110 -0
  37. data/spec/fixtures/vcr_cassettes/fail_to_create_form.yml +35 -0
  38. data/spec/fixtures/vcr_cassettes/fail_to_create_list.yml +35 -0
  39. data/spec/fixtures/vcr_cassettes/field_among_form.yml +34 -0
  40. data/spec/fixtures/vcr_cassettes/fields_among_form.yml +35 -0
  41. data/spec/fixtures/vcr_cassettes/find_all_contacts.yml +39 -0
  42. data/spec/fixtures/vcr_cassettes/find_all_dynamic_lists.yml +104 -0
  43. data/spec/fixtures/vcr_cassettes/find_all_forms.yml +15378 -0
  44. data/spec/fixtures/vcr_cassettes/find_all_lists.yml +138 -0
  45. data/spec/fixtures/vcr_cassettes/find_all_recent_contacts.yml +33 -0
  46. data/spec/fixtures/vcr_cassettes/find_all_stastic_lists.yml +21876 -0
  47. data/spec/fixtures/vcr_cassettes/form_destroy.yml +64 -0
  48. data/spec/fixtures/vcr_cassettes/form_example.yml +39 -0
  49. data/spec/fixtures/vcr_cassettes/form_find.yml +69 -0
  50. data/spec/fixtures/vcr_cassettes/form_submit_data.yml +130 -0
  51. data/spec/fixtures/vcr_cassettes/form_update.yml +77 -0
  52. data/spec/fixtures/vcr_cassettes/one_month_blog_posts_filter_state.yml +5168 -0
  53. data/spec/fixtures/vcr_cassettes/remove_contacts_from_lists.yml +315 -0
  54. data/spec/lib/hubspot/blog_spec.rb +4 -3
  55. data/spec/lib/hubspot/connection_spec.rb +112 -0
  56. data/spec/lib/hubspot/contact_list_spec.rb +249 -0
  57. data/spec/lib/hubspot/contact_properties_spec.rb +8 -0
  58. data/spec/lib/hubspot/contact_spec.rb +110 -54
  59. data/spec/lib/hubspot/deal_spec.rb +11 -0
  60. data/spec/lib/hubspot/form_spec.rb +157 -10
  61. data/spec/lib/hubspot/utils_spec.rb +0 -67
  62. data/spec/live/deals_integration_spec.rb +35 -0
  63. data/spec/spec_helper.rb +2 -0
  64. data/spec/support/tests_helper.rb +17 -0
  65. metadata +70 -33
@@ -0,0 +1,39 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.hubapi.com/contacts/v1/forms?hapikey=demo
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"Demo Form 1424708546","action":"","method":"POST","cssClass":"hs-form
9
+ stacked","redirect":"","submitText":"Sign Up","followUpId":"","leadNurturingCampaignId":"","notifyRecipients":"","embeddedCode":""}'
10
+ headers:
11
+ Content-Type:
12
+ - application/json
13
+ response:
14
+ status:
15
+ code: 200
16
+ message: OK
17
+ headers:
18
+ Access-Control-Allow-Credentials:
19
+ - 'false'
20
+ Content-Type:
21
+ - application/json; charset=UTF-8
22
+ Date:
23
+ - Mon, 23 Feb 2015 16:22:26 GMT
24
+ Vary:
25
+ - Accept-Encoding
26
+ - Accept-Encoding
27
+ Content-Length:
28
+ - '649'
29
+ Connection:
30
+ - keep-alive
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"guid":"8291bdd1-0681-4d99-b5f7-76ffffb4f98d","name":"Demo Form 1424708546","action":"","method":"POST","cssClass":"hs-form
34
+ stacked","redirect":"","fields":[],"submitText":"Sign Up","followUpId":"","notifyRecipients":"","leadNurturingCampaignId":"","formFieldGroups":[],"createdAt":1424708546415,"updatedAt":1424708546415,"performableHtml":"","migratedFrom":"","ignoreCurrentValues":false,"metaData":[],"deletable":true,"embeddedCode":"<script
35
+ charset=\"utf-8\" src=\"http://js.hubspot.com/forms/current.js\"></script>\n<script>\n hbspt.forms.create({\n portalId:
36
+ ''62515'',\n formId: ''8291bdd1-0681-4d99-b5f7-76ffffb4f98d''\n });\n</script>"}'
37
+ http_version:
38
+ recorded_at: Mon, 23 Feb 2015 16:22:26 GMT
39
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,36 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.hubapi.com/contacts/v1/lists?hapikey=demo
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"testing list","dynamic":false,"portal_id":null}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Access-Control-Allow-Credentials:
18
+ - 'false'
19
+ Content-Type:
20
+ - application/json; charset=UTF-8
21
+ Date:
22
+ - Sun, 22 Feb 2015 02:24:20 GMT
23
+ Vary:
24
+ - Accept-Encoding
25
+ - Accept-Encoding
26
+ Content-Length:
27
+ - '297'
28
+ Connection:
29
+ - keep-alive
30
+ body:
31
+ encoding: UTF-8
32
+ string: '{"metaData":{"processing":"DONE","lastProcessingStateChangeAt":1424571860081,"lastSizeChangeAt":0,"error":"","size":0},"dynamic":false,"listType":"STATIC","createdAt":1424571860081,"listId":97344,"updatedAt":1424571860081,"filters":[],"portalId":62515,"internalListId":97396,"name":"testing
33
+ list"}'
34
+ http_version:
35
+ recorded_at: Sun, 22 Feb 2015 02:24:20 GMT
36
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,36 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.hubapi.com/contacts/v1/lists?hapikey=demo
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"list with filters","filters":[[{"operator":"EQ","value":"@hubspot","property":"twitterhandle","type":"string"}]],"dynamic":false,"portal_id":null}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Access-Control-Allow-Credentials:
18
+ - 'false'
19
+ Content-Type:
20
+ - application/json; charset=UTF-8
21
+ Date:
22
+ - Wed, 25 Feb 2015 15:20:55 GMT
23
+ Vary:
24
+ - Accept-Encoding
25
+ - Accept-Encoding
26
+ Content-Length:
27
+ - '446'
28
+ Connection:
29
+ - keep-alive
30
+ body:
31
+ encoding: UTF-8
32
+ string: '{"metaData":{"processing":"INITIALIZING","error":"","lastProcessingStateChangeAt":1424877655355,"lastSizeChangeAt":0,"size":0},"dynamic":false,"filters":[[{"operator":"EQ","type":"string","filterFamily":"PropertyValue","withinTimeMode":"PAST","property":"twitterhandle","value":"@hubspot"}]],"listId":97909,"portalId":62515,"createdAt":1424877655355,"updatedAt":1424877655355,"listType":"STATIC","internalListId":97963,"name":"list
33
+ with filters"}'
34
+ http_version:
35
+ recorded_at: Wed, 25 Feb 2015 15:20:55 GMT
36
+ recorded_with: VCR 2.4.0
@@ -29,4 +29,33 @@ http_interactions:
29
29
  string: '{"portalId":62515,"dealId":1169756,"isDeleted":false,"associations":{"associatedVids":[27136],"associatedCompanyIds":[8954037],"associatedDealIds":[]},"properties":{"createdate":{"value":"1418044235821","timestamp":1418044235821,"source":null,"sourceId":null,"versions":[{"name":"createdate","value":"1418044235821","timestamp":1418044235821,"sourceVid":[]}]},"hs_createdate":{"value":"1418044235821","timestamp":1418044235821,"source":null,"sourceId":null,"versions":[{"name":"hs_createdate","value":"1418044235821","timestamp":1418044235821,"sourceVid":[]}]}}}'
30
30
  http_version:
31
31
  recorded_at: Mon, 08 Dec 2014 13:11:06 GMT
32
+ - request:
33
+ method: post
34
+ uri: https://api.hubapi.com/deals/v1/deal?hapikey=demo
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"portalId":62515,"associations":{"associatedCompanyIds":[8954037],"associatedVids":[27136]},"properties":[]}'
38
+ headers:
39
+ Content-Type:
40
+ - application/json
41
+ response:
42
+ status:
43
+ code: 200
44
+ message: OK
45
+ headers:
46
+ Access-Control-Allow-Credentials:
47
+ - 'false'
48
+ Content-Type:
49
+ - application/json; charset=UTF-8
50
+ Date:
51
+ - Sun, 22 Feb 2015 16:16:53 GMT
52
+ Content-Length:
53
+ - '562'
54
+ Connection:
55
+ - keep-alive
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"portalId":62515,"dealId":2153357,"isDeleted":false,"associations":{"associatedVids":[27136],"associatedCompanyIds":[8954037],"associatedDealIds":[]},"properties":{"hs_createdate":{"value":"1424621813221","timestamp":1424621813221,"source":null,"sourceId":null,"versions":[{"name":"hs_createdate","value":"1424621813221","timestamp":1424621813221,"sourceVid":[]}]},"createdate":{"value":"1424621813221","timestamp":1424621813221,"source":null,"sourceId":null,"versions":[{"name":"createdate","value":"1424621813221","timestamp":1424621813221,"sourceVid":[]}]}}}'
59
+ http_version:
60
+ recorded_at: Sun, 22 Feb 2015 16:16:53 GMT
32
61
  recorded_with: VCR 2.4.0
@@ -56,4 +56,60 @@ http_interactions:
56
56
  string: '{"portalId":62515,"dealId":1146647,"isDeleted":false,"associations":{"associatedVids":[27136],"associatedCompanyIds":[8954037],"associatedDealIds":[]},"properties":{"amount":{"value":"30","timestamp":1419698207401,"source":"API","sourceId":null,"versions":[{"name":"amount","value":"30","timestamp":1419698207401,"source":"API","sourceVid":[]}]},"num_associated_contacts":{"value":"1","timestamp":0,"source":"CALCULATED","sourceId":null,"versions":[{"name":"num_associated_contacts","value":"1","source":"CALCULATED","sourceVid":[]}]},"hs_createdate":{"value":"1419698207374","timestamp":1419698207401,"source":null,"sourceId":null,"versions":[{"name":"hs_createdate","value":"1419698207374","timestamp":1419698207401,"sourceVid":[]}]},"createdate":{"value":"1419698207374","timestamp":1419698207401,"source":null,"sourceId":null,"versions":[{"name":"createdate","value":"1419698207374","timestamp":1419698207401,"sourceVid":[]}]}}}'
57
57
  http_version:
58
58
  recorded_at: Sat, 27 Dec 2014 16:36:48 GMT
59
+ - request:
60
+ method: post
61
+ uri: https://api.hubapi.com/deals/v1/deal?hapikey=demo
62
+ body:
63
+ encoding: UTF-8
64
+ string: '{"portalId":62515,"associations":{"associatedCompanyIds":[8954037],"associatedVids":[27136]},"properties":[{"name":"amount","value":30}]}'
65
+ headers:
66
+ Content-Type:
67
+ - application/json
68
+ response:
69
+ status:
70
+ code: 200
71
+ message: OK
72
+ headers:
73
+ Access-Control-Allow-Credentials:
74
+ - 'false'
75
+ Content-Type:
76
+ - application/json; charset=UTF-8
77
+ Date:
78
+ - Sun, 22 Feb 2015 16:16:53 GMT
79
+ Content-Length:
80
+ - '986'
81
+ Connection:
82
+ - keep-alive
83
+ body:
84
+ encoding: UTF-8
85
+ string: '{"portalId":62515,"dealId":2153362,"isDeleted":false,"associations":{"associatedVids":[27136],"associatedCompanyIds":[8954037],"associatedDealIds":[]},"properties":{"amount":{"value":"30","timestamp":1424621813405,"source":"API","sourceId":null,"versions":[{"name":"amount","value":"30","timestamp":1424621813405,"source":"API","sourceVid":[]}]},"hs_lastmodifieddate":{"value":"1424621813411","timestamp":1424621813411,"source":"CALCULATED","sourceId":null,"versions":[{"name":"hs_lastmodifieddate","value":"1424621813411","timestamp":1424621813411,"source":"CALCULATED","sourceVid":[]}]},"hs_createdate":{"value":"1424621813411","timestamp":1424621813411,"source":null,"sourceId":null,"versions":[{"name":"hs_createdate","value":"1424621813411","timestamp":1424621813411,"sourceVid":[]}]},"createdate":{"value":"1424621813411","timestamp":1424621813411,"source":null,"sourceId":null,"versions":[{"name":"createdate","value":"1424621813411","timestamp":1424621813411,"sourceVid":[]}]}}}'
86
+ http_version:
87
+ recorded_at: Sun, 22 Feb 2015 16:16:53 GMT
88
+ - request:
89
+ method: get
90
+ uri: https://api.hubapi.com/deals/v1/deal/2153362?hapikey=demo
91
+ body:
92
+ encoding: US-ASCII
93
+ string: ''
94
+ headers: {}
95
+ response:
96
+ status:
97
+ code: 200
98
+ message: OK
99
+ headers:
100
+ Access-Control-Allow-Credentials:
101
+ - 'false'
102
+ Content-Type:
103
+ - application/json; charset=UTF-8
104
+ Date:
105
+ - Sun, 22 Feb 2015 16:16:53 GMT
106
+ Content-Length:
107
+ - '1175'
108
+ Connection:
109
+ - keep-alive
110
+ body:
111
+ encoding: UTF-8
112
+ string: '{"portalId":62515,"dealId":2153362,"isDeleted":false,"associations":{"associatedVids":[27136],"associatedCompanyIds":[8954037],"associatedDealIds":[]},"properties":{"amount":{"value":"30","timestamp":1424621813414,"source":"API","sourceId":null,"versions":[{"name":"amount","value":"30","timestamp":1424621813414,"source":"API","sourceVid":[]}]},"hs_lastmodifieddate":{"value":"1424621813411","timestamp":1424621813414,"source":"CALCULATED","sourceId":null,"versions":[{"name":"hs_lastmodifieddate","value":"1424621813411","timestamp":1424621813414,"source":"CALCULATED","sourceVid":[]}]},"num_associated_contacts":{"value":"1","timestamp":0,"source":"CALCULATED","sourceId":null,"versions":[{"name":"num_associated_contacts","value":"1","source":"CALCULATED","sourceVid":[]}]},"hs_createdate":{"value":"1424621813411","timestamp":1424621813414,"source":null,"sourceId":null,"versions":[{"name":"hs_createdate","value":"1424621813411","timestamp":1424621813414,"sourceVid":[]}]},"createdate":{"value":"1424621813411","timestamp":1424621813414,"source":null,"sourceId":null,"versions":[{"name":"createdate","value":"1424621813411","timestamp":1424621813414,"sourceVid":[]}]}}}'
113
+ http_version:
114
+ recorded_at: Sun, 22 Feb 2015 16:16:53 GMT
59
115
  recorded_with: VCR 2.4.0
@@ -108,4 +108,114 @@ http_interactions:
108
108
  string: '{"status":"error","message":"Deal does not exist","requestId":"31456253-ec6a-49a6-a170-6721fc030277"}'
109
109
  http_version:
110
110
  recorded_at: Fri, 09 Jan 2015 19:39:20 GMT
111
+ - request:
112
+ method: post
113
+ uri: https://api.hubapi.com/deals/v1/deal?hapikey=demo
114
+ body:
115
+ encoding: UTF-8
116
+ string: '{"portalId":62515,"associations":{"associatedCompanyIds":[8954037],"associatedVids":[27136]},"properties":[{"name":"amount","value":30}]}'
117
+ headers:
118
+ Content-Type:
119
+ - application/json
120
+ response:
121
+ status:
122
+ code: 200
123
+ message: OK
124
+ headers:
125
+ Access-Control-Allow-Credentials:
126
+ - 'false'
127
+ Content-Type:
128
+ - application/json; charset=UTF-8
129
+ Date:
130
+ - Sun, 22 Feb 2015 16:16:53 GMT
131
+ Content-Length:
132
+ - '986'
133
+ Connection:
134
+ - keep-alive
135
+ body:
136
+ encoding: UTF-8
137
+ string: '{"portalId":62515,"dealId":2153873,"isDeleted":false,"associations":{"associatedVids":[27136],"associatedCompanyIds":[8954037],"associatedDealIds":[]},"properties":{"amount":{"value":"30","timestamp":1424621813768,"source":"API","sourceId":null,"versions":[{"name":"amount","value":"30","timestamp":1424621813768,"source":"API","sourceVid":[]}]},"hs_lastmodifieddate":{"value":"1424621813771","timestamp":1424621813771,"source":"CALCULATED","sourceId":null,"versions":[{"name":"hs_lastmodifieddate","value":"1424621813771","timestamp":1424621813771,"source":"CALCULATED","sourceVid":[]}]},"hs_createdate":{"value":"1424621813771","timestamp":1424621813771,"source":null,"sourceId":null,"versions":[{"name":"hs_createdate","value":"1424621813771","timestamp":1424621813771,"sourceVid":[]}]},"createdate":{"value":"1424621813771","timestamp":1424621813771,"source":null,"sourceId":null,"versions":[{"name":"createdate","value":"1424621813771","timestamp":1424621813771,"sourceVid":[]}]}}}'
138
+ http_version:
139
+ recorded_at: Sun, 22 Feb 2015 16:16:53 GMT
140
+ - request:
141
+ method: get
142
+ uri: https://api.hubapi.com/deals/v1/deal/2153873?hapikey=demo
143
+ body:
144
+ encoding: US-ASCII
145
+ string: ''
146
+ headers: {}
147
+ response:
148
+ status:
149
+ code: 200
150
+ message: OK
151
+ headers:
152
+ Access-Control-Allow-Credentials:
153
+ - 'false'
154
+ Content-Type:
155
+ - application/json; charset=UTF-8
156
+ Date:
157
+ - Sun, 22 Feb 2015 16:16:53 GMT
158
+ Content-Length:
159
+ - '1175'
160
+ Connection:
161
+ - keep-alive
162
+ body:
163
+ encoding: UTF-8
164
+ string: '{"portalId":62515,"dealId":2153873,"isDeleted":false,"associations":{"associatedVids":[27136],"associatedCompanyIds":[8954037],"associatedDealIds":[]},"properties":{"amount":{"value":"30","timestamp":1424621813780,"source":"API","sourceId":null,"versions":[{"name":"amount","value":"30","timestamp":1424621813780,"source":"API","sourceVid":[]}]},"hs_lastmodifieddate":{"value":"1424621813771","timestamp":1424621813780,"source":"CALCULATED","sourceId":null,"versions":[{"name":"hs_lastmodifieddate","value":"1424621813771","timestamp":1424621813780,"source":"CALCULATED","sourceVid":[]}]},"num_associated_contacts":{"value":"1","timestamp":0,"source":"CALCULATED","sourceId":null,"versions":[{"name":"num_associated_contacts","value":"1","source":"CALCULATED","sourceVid":[]}]},"hs_createdate":{"value":"1424621813771","timestamp":1424621813780,"source":null,"sourceId":null,"versions":[{"name":"hs_createdate","value":"1424621813771","timestamp":1424621813780,"sourceVid":[]}]},"createdate":{"value":"1424621813771","timestamp":1424621813780,"source":null,"sourceId":null,"versions":[{"name":"createdate","value":"1424621813771","timestamp":1424621813780,"sourceVid":[]}]}}}'
165
+ http_version:
166
+ recorded_at: Sun, 22 Feb 2015 16:16:53 GMT
167
+ - request:
168
+ method: delete
169
+ uri: https://api.hubapi.com/deals/v1/deal/2153873?hapikey=demo
170
+ body:
171
+ encoding: US-ASCII
172
+ string: ''
173
+ headers: {}
174
+ response:
175
+ status:
176
+ code: 204
177
+ message: No Content
178
+ headers:
179
+ Access-Control-Allow-Credentials:
180
+ - 'false'
181
+ Content-Type:
182
+ - application/json; charset=UTF-8
183
+ Date:
184
+ - Sun, 22 Feb 2015 16:20:04 GMT
185
+ Connection:
186
+ - keep-alive
187
+ body:
188
+ encoding: UTF-8
189
+ string: ''
190
+ http_version:
191
+ recorded_at: Sun, 22 Feb 2015 16:20:04 GMT
192
+ - request:
193
+ method: get
194
+ uri: https://api.hubapi.com/deals/v1/deal/2153873?hapikey=demo
195
+ body:
196
+ encoding: US-ASCII
197
+ string: ''
198
+ headers: {}
199
+ response:
200
+ status:
201
+ code: 404
202
+ message: Not Found
203
+ headers:
204
+ Access-Control-Allow-Credentials:
205
+ - 'false'
206
+ Content-Type:
207
+ - application/json; charset=UTF-8
208
+ Date:
209
+ - Sun, 22 Feb 2015 16:20:04 GMT
210
+ X-Trace:
211
+ - 1BF95B4C12411F9FF5CF3361D112DC37830B229B83FB82885400A1ABA9
212
+ Content-Length:
213
+ - '101'
214
+ Connection:
215
+ - keep-alive
216
+ body:
217
+ encoding: UTF-8
218
+ string: '{"status":"error","message":"Deal does not exist","requestId":"0fa11d39-af49-4146-9a70-fdef574ab67b"}'
219
+ http_version:
220
+ recorded_at: Sun, 22 Feb 2015 16:20:04 GMT
111
221
  recorded_with: VCR 2.4.0
@@ -0,0 +1,35 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.hubapi.com/contacts/v1/forms?hapikey=demo
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 400
15
+ message: Bad Request
16
+ headers:
17
+ Access-Control-Allow-Credentials:
18
+ - 'false'
19
+ Content-Type:
20
+ - application/json; charset=UTF-8
21
+ Date:
22
+ - Mon, 23 Feb 2015 16:16:41 GMT
23
+ Vary:
24
+ - Accept-Encoding
25
+ - Accept-Encoding
26
+ Content-Length:
27
+ - '175'
28
+ Connection:
29
+ - keep-alive
30
+ body:
31
+ encoding: UTF-8
32
+ string: '{"status":"error","message":"Form name is required, form guid ''e218aaae-2783-4b7f-b072-4e8f5163e44b''","type":"MISSING_NAME","requestId":"696220a7-8411-421f-8945-3c0cd370a8a5"}'
33
+ http_version:
34
+ recorded_at: Mon, 23 Feb 2015 16:16:41 GMT
35
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,35 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.hubapi.com/contacts/v1/lists?hapikey=demo
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":null,"dynamic":false,"portal_id":null}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 400
15
+ message: Bad Request
16
+ headers:
17
+ Access-Control-Allow-Credentials:
18
+ - 'false'
19
+ Content-Type:
20
+ - application/json; charset=UTF-8
21
+ Date:
22
+ - Sun, 22 Feb 2015 02:29:50 GMT
23
+ Vary:
24
+ - Accept-Encoding
25
+ - Accept-Encoding
26
+ Content-Length:
27
+ - '110'
28
+ Connection:
29
+ - keep-alive
30
+ body:
31
+ encoding: UTF-8
32
+ string: '{"status":"error","message":"Every list must have a name.","requestId":"dc5b8484-32b4-42a5-8422-9e1ff097ed31"}'
33
+ http_version:
34
+ recorded_at: Sun, 22 Feb 2015 02:29:50 GMT
35
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,34 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.hubapi.com/contacts/v1/fields/561d9ce9-bb4c-45b4-8e32-21cdeaa3a7f0/email?hapikey=demo
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Access-Control-Allow-Credentials:
16
+ - 'false'
17
+ Content-Type:
18
+ - application/json; charset=UTF-8
19
+ Date:
20
+ - Mon, 23 Feb 2015 15:51:46 GMT
21
+ Vary:
22
+ - Accept-Encoding
23
+ - Accept-Encoding
24
+ Content-Length:
25
+ - '406'
26
+ Connection:
27
+ - keep-alive
28
+ body:
29
+ encoding: UTF-8
30
+ string: '{"name":"email","label":"Email","type":"string","fieldType":"text","description":"","groupName":"contactinformation","displayOrder":2,"required":true,"selectedOptions":[],"options":[],"validation":{"name":"email","message":"Please
31
+ enter a valid email address","data":"","useDefaultBlockList":false},"enabled":true,"hidden":false,"defaultValue":"","isSmartField":false,"unselectedLabel":"","placeholder":""}'
32
+ http_version:
33
+ recorded_at: Mon, 23 Feb 2015 15:51:46 GMT
34
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,35 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.hubapi.com/contacts/v1/fields/561d9ce9-bb4c-45b4-8e32-21cdeaa3a7f0?hapikey=demo
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Access-Control-Allow-Credentials:
16
+ - 'false'
17
+ Content-Type:
18
+ - application/json; charset=UTF-8
19
+ Date:
20
+ - Mon, 23 Feb 2015 15:16:12 GMT
21
+ Vary:
22
+ - Accept-Encoding
23
+ - Accept-Encoding
24
+ Content-Length:
25
+ - '1162'
26
+ Connection:
27
+ - keep-alive
28
+ body:
29
+ encoding: UTF-8
30
+ string: '[{"name":"firstname","label":"First Name","type":"string","fieldType":"text","description":"","groupName":"contactinformation","displayOrder":0,"required":false,"selectedOptions":[],"options":[],"validation":{"name":"","message":"","data":"","useDefaultBlockList":false},"enabled":true,"hidden":false,"defaultValue":"","isSmartField":false,"unselectedLabel":"","placeholder":""},{"name":"lastname","label":"Last
31
+ Name","type":"string","fieldType":"text","description":"","groupName":"contactinformation","displayOrder":1,"required":false,"selectedOptions":[],"options":[],"validation":{"name":"","message":"","data":"","useDefaultBlockList":false},"enabled":true,"hidden":false,"defaultValue":"","isSmartField":false,"unselectedLabel":"","placeholder":""},{"name":"email","label":"Email","type":"string","fieldType":"text","description":"","groupName":"contactinformation","displayOrder":2,"required":true,"selectedOptions":[],"options":[],"validation":{"name":"email","message":"Please
32
+ enter a valid email address","data":"","useDefaultBlockList":false},"enabled":true,"hidden":false,"defaultValue":"","isSmartField":false,"unselectedLabel":"","placeholder":""}]'
33
+ http_version:
34
+ recorded_at: Mon, 23 Feb 2015 15:16:12 GMT
35
+ recorded_with: VCR 2.4.0