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
@@ -2,7 +2,7 @@ module Hubspot
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 7
5
+ PATCH = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -0,0 +1,281 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.hubapi.com/contacts/v1/lists/static?count=3&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
+ - Sat, 21 Feb 2015 23:44:56 GMT
21
+ Vary:
22
+ - Accept-Encoding
23
+ - Accept-Encoding
24
+ Content-Length:
25
+ - '1013'
26
+ Connection:
27
+ - keep-alive
28
+ body:
29
+ encoding: UTF-8
30
+ string: '{"lists":[{"metaData":{"size":0,"error":"","processing":"DONE","lastProcessingStateChangeAt":1336673990262,"lastSizeChangeAt":1424559295352},"name":"HubSpot-HootSuite
31
+ App","dynamic":false,"filters":[[{"property":"twitterhandle","withinTimeMode":"PAST","operator":"IS_NOT_EMPTY"}]],"portalId":62515,"createdAt":1336673951299,"listId":2,"updatedAt":1336673951299,"internalListId":2},{"metaData":{"size":0,"error":"","processing":"DONE","lastProcessingStateChangeAt":1344891893390,"lastSizeChangeAt":1424561579485},"name":"staticTest","dynamic":false,"filters":[],"portalId":62515,"createdAt":1344891893390,"listId":3,"updatedAt":1344891893390,"listType":"STATIC","internalListId":5},{"metaData":{"size":2,"error":"","processing":"DONE","lastProcessingStateChangeAt":1345057450679,"lastSizeChangeAt":1421930685051},"name":"Workface
32
+ Leads","dynamic":false,"filters":[],"portalId":62515,"createdAt":1345057450679,"listId":4,"updatedAt":1345057450679,"listType":"STATIC","internalListId":6}],"offset":3,"has-more":true}'
33
+ http_version:
34
+ recorded_at: Sat, 21 Feb 2015 23:44:56 GMT
35
+ - request:
36
+ method: post
37
+ uri: https://api.hubapi.com/contacts/v1/lists/4/add?hapikey=demo
38
+ body:
39
+ encoding: UTF-8
40
+ string: '{"vids":[82325]}'
41
+ headers:
42
+ Content-Type:
43
+ - application/json
44
+ response:
45
+ status:
46
+ code: 200
47
+ message: OK
48
+ headers:
49
+ Access-Control-Allow-Credentials:
50
+ - 'false'
51
+ Content-Type:
52
+ - application/json; charset=UTF-8
53
+ Date:
54
+ - Sat, 21 Feb 2015 23:44:56 GMT
55
+ Vary:
56
+ - Accept-Encoding
57
+ - Accept-Encoding
58
+ Content-Length:
59
+ - '29'
60
+ Connection:
61
+ - keep-alive
62
+ body:
63
+ encoding: UTF-8
64
+ string: '{"updated":[],"discarded":[]}'
65
+ http_version:
66
+ recorded_at: Sat, 21 Feb 2015 23:44:56 GMT
67
+ - request:
68
+ method: get
69
+ uri: https://api.hubapi.com/contacts/v1/lists/4/contacts/all?count=1&hapikey=demo&property=email
70
+ body:
71
+ encoding: US-ASCII
72
+ string: ''
73
+ headers: {}
74
+ response:
75
+ status:
76
+ code: 200
77
+ message: OK
78
+ headers:
79
+ Access-Control-Allow-Credentials:
80
+ - 'false'
81
+ Content-Type:
82
+ - application/json; charset=UTF-8
83
+ Date:
84
+ - Sat, 21 Feb 2015 23:44:56 GMT
85
+ Vary:
86
+ - Accept-Encoding
87
+ - Accept-Encoding
88
+ Content-Length:
89
+ - '957'
90
+ Connection:
91
+ - keep-alive
92
+ body:
93
+ encoding: UTF-8
94
+ string: '{"contacts":[{"addedAt":1410377496034,"vid":240665,"canonical-vid":240665,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mNsNODXC4cCiO1rRF5kyLVGEzhXV_HMmNlQFhtWelfM4TLn-3ue7pRoiEYvv12LuuHq3RfETobGBrMa-UxZSM_MWm650qp0oRonwZeiWcXzoAUCMOknG2A4KJR9IBdCOP3T1Ur7","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mNsNODXC4cCiO1rRF5kyLVGEzhXV_HMmNlQFhtWelfM4TLn-3ue7pRoiEYvv12LuuHq3RfETobGBrMa-UxZSM_MWm650qp0oRonwZeiWcXzoAUCMOknG2A4KJR9IBdCOP3T1Ur7/","properties":{"lastmodifieddate":{"value":"1423206291283"},"email":{"value":"jimmy@jack.com"}},"form-submissions":[],"identity-profiles":[{"vid":240665,"saved-at-timestamp":1410370949852,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"jimmy@jack.com","timestamp":1410370949831},{"type":"LEAD_GUID","value":"17af62d8-4228-4033-976d-ce9bad8b3fb4","timestamp":1410370949840}]}],"merge-audits":[]}],"has-more":true,"vid-offset":240665}'
95
+ http_version:
96
+ recorded_at: Sat, 21 Feb 2015 23:44:56 GMT
97
+ - request:
98
+ method: get
99
+ uri: https://api.hubapi.com/contacts/v1/lists/dynamic?count=1&hapikey=demo
100
+ body:
101
+ encoding: US-ASCII
102
+ string: ''
103
+ headers: {}
104
+ response:
105
+ status:
106
+ code: 200
107
+ message: OK
108
+ headers:
109
+ Access-Control-Allow-Credentials:
110
+ - 'false'
111
+ Content-Type:
112
+ - application/json; charset=UTF-8
113
+ Date:
114
+ - Sat, 21 Feb 2015 23:44:57 GMT
115
+ Vary:
116
+ - Accept-Encoding
117
+ - Accept-Encoding
118
+ Content-Length:
119
+ - '421'
120
+ Connection:
121
+ - keep-alive
122
+ body:
123
+ encoding: UTF-8
124
+ string: '{"lists":[{"dynamic":true,"metaData":{"processing":"DONE","lastProcessingStateChangeAt":1335448864306,"error":"","lastSizeChangeAt":1424402567742,"size":3355},"filters":[[{"operator":"IS_NOT_EMPTY","withinTimeMode":"PAST","property":"twitterhandle"}]],"portalId":62515,"createdAt":1335448813688,"listId":1,"updatedAt":1335448813688,"listType":"DYNAMIC","internalListId":1,"name":"twitterers"}],"offset":1,"has-more":true}'
125
+ http_version:
126
+ recorded_at: Sat, 21 Feb 2015 23:44:56 GMT
127
+ - request:
128
+ method: post
129
+ uri: https://api.hubapi.com/contacts/v1/lists/1/add?hapikey=demo
130
+ body:
131
+ encoding: UTF-8
132
+ string: '{"vids":[82325]}'
133
+ headers:
134
+ Content-Type:
135
+ - application/json
136
+ response:
137
+ status:
138
+ code: 400
139
+ message: Bad Request
140
+ headers:
141
+ Access-Control-Allow-Credentials:
142
+ - 'false'
143
+ Content-Type:
144
+ - application/json; charset=UTF-8
145
+ Date:
146
+ - Sat, 21 Feb 2015 23:44:57 GMT
147
+ Vary:
148
+ - Accept-Encoding
149
+ - Accept-Encoding
150
+ Content-Length:
151
+ - '124'
152
+ Connection:
153
+ - keep-alive
154
+ body:
155
+ encoding: UTF-8
156
+ string: '{"status":"error","message":"Can not operate manually on a dynamic
157
+ list","requestId":"3b34806d-ad9e-405d-b0b6-4f5a02b16b10"}'
158
+ http_version:
159
+ recorded_at: Sat, 21 Feb 2015 23:44:57 GMT
160
+ - request:
161
+ method: get
162
+ uri: https://api.hubapi.com/contacts/v1/contact/vid/1/profile?hapikey=demo
163
+ body:
164
+ encoding: US-ASCII
165
+ string: ''
166
+ headers: {}
167
+ response:
168
+ status:
169
+ code: 404
170
+ message: Not Found
171
+ headers:
172
+ Access-Control-Allow-Credentials:
173
+ - 'false'
174
+ Content-Type:
175
+ - application/json; charset=UTF-8
176
+ Date:
177
+ - Sat, 21 Feb 2015 23:46:15 GMT
178
+ Vary:
179
+ - Accept-Encoding
180
+ - Accept-Encoding
181
+ Content-Length:
182
+ - '104'
183
+ Connection:
184
+ - keep-alive
185
+ body:
186
+ encoding: UTF-8
187
+ string: '{"status":"error","message":"contact does not exist","requestId":"e101ec44-b2f6-40d1-a634-167d2dd5d3f7"}'
188
+ http_version:
189
+ recorded_at: Sat, 21 Feb 2015 23:46:15 GMT
190
+ - request:
191
+ method: get
192
+ uri: https://api.hubapi.com/contacts/v1/contact/vid/4/profile?hapikey=demo
193
+ body:
194
+ encoding: US-ASCII
195
+ string: ''
196
+ headers: {}
197
+ response:
198
+ status:
199
+ code: 404
200
+ message: Not Found
201
+ headers:
202
+ Access-Control-Allow-Credentials:
203
+ - 'false'
204
+ Content-Type:
205
+ - application/json; charset=UTF-8
206
+ Date:
207
+ - Sun, 22 Feb 2015 19:54:20 GMT
208
+ Vary:
209
+ - Accept-Encoding
210
+ - Accept-Encoding
211
+ Content-Length:
212
+ - '104'
213
+ Connection:
214
+ - keep-alive
215
+ body:
216
+ encoding: UTF-8
217
+ string: '{"status":"error","message":"contact does not exist","requestId":"ac145de3-e950-49bf-ac3e-0b842c6df1a3"}'
218
+ http_version:
219
+ recorded_at: Sun, 22 Feb 2015 19:54:20 GMT
220
+ - request:
221
+ method: get
222
+ uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=1&hapikey=demo
223
+ body:
224
+ encoding: US-ASCII
225
+ string: ''
226
+ headers: {}
227
+ response:
228
+ status:
229
+ code: 200
230
+ message: OK
231
+ headers:
232
+ Access-Control-Allow-Credentials:
233
+ - 'false'
234
+ Content-Type:
235
+ - application/json; charset=UTF-8
236
+ Date:
237
+ - Sun, 22 Feb 2015 19:55:34 GMT
238
+ Vary:
239
+ - Accept-Encoding
240
+ - Accept-Encoding
241
+ Content-Length:
242
+ - '1290'
243
+ Connection:
244
+ - keep-alive
245
+ body:
246
+ encoding: UTF-8
247
+ string: '{"contacts":[{"addedAt":1405347851360,"vid":154835,"canonical-vid":154835,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mOjbX1LstSdcbofAXxlASdeCjS9HRg20tm1ulyNHjfcLp9-B3chMI9VqXuHnxQ5FY6VdS9KRsIaaOJxRbsCkf7XmvSI1dEV17_yblF_iklHItsX-vQvFVMhxumtCI5zaoZ-c4_r","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mOjbX1LstSdcbofAXxlASdeCjS9HRg20tm1ulyNHjfcLp9-B3chMI9VqXuHnxQ5FY6VdS9KRsIaaOJxRbsCkf7XmvSI1dEV17_yblF_iklHItsX-vQvFVMhxumtCI5zaoZ-c4_r/","properties":{"firstname":{"value":"HubSpot"},"lastmodifieddate":{"value":"1423205608157"},"lastname":{"value":"Test"}},"form-submissions":[{"conversion-id":"b18f9fd8-b8d3-49e5-898a-ac301fac93e9","timestamp":1405347851180,"form-id":"b844ad5e-32bd-41e1-b0e6-ed990c5f3d1b","portal-id":62515,"page-url":"http://demo.hubapi.com/your-stunning-headline-30","page-title":"Your
248
+ stunning headline!","page-id":"324527","title":"My New Form","meta-data":[]}],"identity-profiles":[{"vid":154835,"saved-at-timestamp":1405347851237,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"test@hubspot.com","timestamp":1405347851180},{"type":"LEAD_GUID","value":"c8f20860-d3d6-4b57-b092-86a07cebdcbc","timestamp":1405347851237}]}],"merge-audits":[]}],"has-more":true,"vid-offset":154835}'
249
+ http_version:
250
+ recorded_at: Sun, 22 Feb 2015 19:55:34 GMT
251
+ - request:
252
+ method: get
253
+ uri: https://api.hubapi.com/contacts/v1/contact/vid/2/profile?hapikey=demo
254
+ body:
255
+ encoding: US-ASCII
256
+ string: ''
257
+ headers: {}
258
+ response:
259
+ status:
260
+ code: 404
261
+ message: Not Found
262
+ headers:
263
+ Access-Control-Allow-Credentials:
264
+ - 'false'
265
+ Content-Type:
266
+ - application/json; charset=UTF-8
267
+ Date:
268
+ - Wed, 25 Feb 2015 18:02:43 GMT
269
+ Vary:
270
+ - Accept-Encoding
271
+ - Accept-Encoding
272
+ Content-Length:
273
+ - '104'
274
+ Connection:
275
+ - keep-alive
276
+ body:
277
+ encoding: UTF-8
278
+ string: '{"status":"error","message":"contact does not exist","requestId":"eb80c0ec-fe1e-49f7-8007-69ab7fc6ab57"}'
279
+ http_version:
280
+ recorded_at: Wed, 25 Feb 2015 18:02:42 GMT
281
+ recorded_with: VCR 2.4.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.hubapi.com/contacts/v1/contact?hapikey=demo
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: ! '{"properties":[{"property":"email","value":"newcontact1361564912@hsgem.com"}]}'
8
+ string: '{"properties":[{"property":"email","value":"newcontact1361564912@hsgem.com"}]}'
9
9
  headers: {}
10
10
  response:
11
11
  status:
@@ -26,7 +26,39 @@ http_interactions:
26
26
  - keep-alive
27
27
  body:
28
28
  encoding: US-ASCII
29
- string: ! '{"vid":154963,"portal-id":62515,"profile-token":"AO_T-mO_ghCK-Ia-VTb9_2r9z6sSvJu1gQkVT4Y0GmhKxIP-e3PyPRBHyhh4qeC-yu-5881gXoLArqPN2BvJu9MSJLXCSyJNZjyX0hkD2yvbnkrKBZtpXjS1XtQL2R8VinrL5AZAQ073","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mO_ghCK-Ia-VTb9_2r9z6sSvJu1gQkVT4Y0GmhKxIP-e3PyPRBHyhh4qeC-yu-5881gXoLArqPN2BvJu9MSJLXCSyJNZjyX0hkD2yvbnkrKBZtpXjS1XtQL2R8VinrL5AZAQ073/","properties":{"email":{"value":"newcontact1361564912@hsgem.com","versions":[{"value":"newcontact1361564912@hsgem.com","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564913945,"selected":false}]},"createdate":{"value":"1361564913945","versions":[{"value":"1361564913945","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564913945,"selected":false}]}},"form-submissions":[],"list-memberships":[],"identity-profiles":[{"vid":154963,"identities":[{"type":"EMAIL","value":"newcontact1361564912@hsgem.com","timestamp":1361564913945},{"type":"LEAD_GUID","value":"b8c6e48e-e5b3-4322-b192-27ec5629175e","timestamp":1361564913954}]}]}'
29
+ string: '{"vid":154963,"portal-id":62515,"profile-token":"AO_T-mO_ghCK-Ia-VTb9_2r9z6sSvJu1gQkVT4Y0GmhKxIP-e3PyPRBHyhh4qeC-yu-5881gXoLArqPN2BvJu9MSJLXCSyJNZjyX0hkD2yvbnkrKBZtpXjS1XtQL2R8VinrL5AZAQ073","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mO_ghCK-Ia-VTb9_2r9z6sSvJu1gQkVT4Y0GmhKxIP-e3PyPRBHyhh4qeC-yu-5881gXoLArqPN2BvJu9MSJLXCSyJNZjyX0hkD2yvbnkrKBZtpXjS1XtQL2R8VinrL5AZAQ073/","properties":{"email":{"value":"newcontact1361564912@hsgem.com","versions":[{"value":"newcontact1361564912@hsgem.com","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564913945,"selected":false}]},"createdate":{"value":"1361564913945","versions":[{"value":"1361564913945","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564913945,"selected":false}]}},"form-submissions":[],"list-memberships":[],"identity-profiles":[{"vid":154963,"identities":[{"type":"EMAIL","value":"newcontact1361564912@hsgem.com","timestamp":1361564913945},{"type":"LEAD_GUID","value":"b8c6e48e-e5b3-4322-b192-27ec5629175e","timestamp":1361564913954}]}]}'
30
30
  http_version:
31
31
  recorded_at: Fri, 22 Feb 2013 20:28:34 GMT
32
+ - request:
33
+ method: post
34
+ uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"properties":[{"property":"email","value":"newcontact1424888102@hsgem.com"}]}'
38
+ headers:
39
+ Content-Type:
40
+ - application/json
41
+ response:
42
+ status:
43
+ code: 405
44
+ message: Method Not Allowed
45
+ headers:
46
+ Access-Control-Allow-Credentials:
47
+ - 'false'
48
+ Allow:
49
+ - HEAD,GET,OPTIONS
50
+ Date:
51
+ - Wed, 25 Feb 2015 18:15:03 GMT
52
+ Vary:
53
+ - Accept-Encoding
54
+ - Accept-Encoding
55
+ Content-Length:
56
+ - '0'
57
+ Connection:
58
+ - keep-alive
59
+ body:
60
+ encoding: UTF-8
61
+ string: ''
62
+ http_version:
63
+ recorded_at: Wed, 25 Feb 2015 18:15:02 GMT
32
64
  recorded_with: VCR 2.4.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.hubapi.com/contacts/v1/contact?hapikey=demo
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: ! '{"properties":[{"property":"email","value":"testingapis@hubspot.com"}]}'
8
+ string: '{"properties":[{"property":"email","value":"testingapis@hubspot.com"}]}'
9
9
  headers: {}
10
10
  response:
11
11
  status:
@@ -24,7 +24,39 @@ http_interactions:
24
24
  - keep-alive
25
25
  body:
26
26
  encoding: US-ASCII
27
- string: ! '{"status":"error","message":"{\"msg\":\"Contact already existed\",\"error\":\"CONTACT_EXISTS\",\"property\":{\"vid\":82325,\"identities\":[{\"type\":\"EMAIL\",\"value\":\"testingapis@hubspot.com\",\"timestamp\":1345062449327},{\"type\":\"LEAD_GUID\",\"value\":\"c0da5c41-f289-4642-910c-9aa2b0fba245\",\"timestamp\":1345062449333}]}}","guid":"cd0e6f59-c8a3-4ae5-b897-3b3990ebda40"}'
27
+ string: '{"status":"error","message":"{\"msg\":\"Contact already existed\",\"error\":\"CONTACT_EXISTS\",\"property\":{\"vid\":82325,\"identities\":[{\"type\":\"EMAIL\",\"value\":\"testingapis@hubspot.com\",\"timestamp\":1345062449327},{\"type\":\"LEAD_GUID\",\"value\":\"c0da5c41-f289-4642-910c-9aa2b0fba245\",\"timestamp\":1345062449333}]}}","guid":"cd0e6f59-c8a3-4ae5-b897-3b3990ebda40"}'
28
28
  http_version:
29
29
  recorded_at: Fri, 22 Feb 2013 20:28:35 GMT
30
+ - request:
31
+ method: post
32
+ uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"properties":[{"property":"email","value":"testingapis@hubspot.com"}]}'
36
+ headers:
37
+ Content-Type:
38
+ - application/json
39
+ response:
40
+ status:
41
+ code: 405
42
+ message: Method Not Allowed
43
+ headers:
44
+ Access-Control-Allow-Credentials:
45
+ - 'false'
46
+ Allow:
47
+ - HEAD,GET,OPTIONS
48
+ Date:
49
+ - Wed, 25 Feb 2015 18:15:03 GMT
50
+ Vary:
51
+ - Accept-Encoding
52
+ - Accept-Encoding
53
+ Content-Length:
54
+ - '0'
55
+ Connection:
56
+ - keep-alive
57
+ body:
58
+ encoding: UTF-8
59
+ string: ''
60
+ http_version:
61
+ recorded_at: Wed, 25 Feb 2015 18:15:03 GMT
30
62
  recorded_with: VCR 2.4.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.hubapi.com/contacts/v1/contact?hapikey=demo
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: ! '{"properties":[{"property":"email","value":"not_an_email"}]}'
8
+ string: '{"properties":[{"property":"email","value":"not_an_email"}]}'
9
9
  headers: {}
10
10
  response:
11
11
  status:
@@ -24,8 +24,40 @@ http_interactions:
24
24
  - keep-alive
25
25
  body:
26
26
  encoding: US-ASCII
27
- string: ! '{"status":"error","message":"Invalid value for type in identity:
28
- value: \"not_an_email\"\ntype: EMAIL\ntimestamp: 1361564916579\n","guid":"74dee415-f9fd-4525-83e6-436df7c2aa56"}'
27
+ string: '{"status":"error","message":"Invalid value for type in identity: value:
28
+ \"not_an_email\"\ntype: EMAIL\ntimestamp: 1361564916579\n","guid":"74dee415-f9fd-4525-83e6-436df7c2aa56"}'
29
29
  http_version:
30
30
  recorded_at: Fri, 22 Feb 2013 20:28:36 GMT
31
+ - request:
32
+ method: post
33
+ uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo
34
+ body:
35
+ encoding: UTF-8
36
+ string: '{"properties":[{"property":"email","value":"not_an_email"}]}'
37
+ headers:
38
+ Content-Type:
39
+ - application/json
40
+ response:
41
+ status:
42
+ code: 405
43
+ message: Method Not Allowed
44
+ headers:
45
+ Access-Control-Allow-Credentials:
46
+ - 'false'
47
+ Allow:
48
+ - HEAD,GET,OPTIONS
49
+ Date:
50
+ - Wed, 25 Feb 2015 18:15:04 GMT
51
+ Vary:
52
+ - Accept-Encoding
53
+ - Accept-Encoding
54
+ Content-Length:
55
+ - '0'
56
+ Connection:
57
+ - keep-alive
58
+ body:
59
+ encoding: UTF-8
60
+ string: ''
61
+ http_version:
62
+ recorded_at: Wed, 25 Feb 2015 18:15:03 GMT
31
63
  recorded_with: VCR 2.4.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.hubapi.com/contacts/v1/contact?hapikey=demo
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: ! '{"properties":[{"property":"firstname","value":"Hugh"},{"property":"lastname","value":"Jackman"},{"property":"email","value":"newcontact_x_1361564914@hsgem.com"}]}'
8
+ string: '{"properties":[{"property":"firstname","value":"Hugh"},{"property":"lastname","value":"Jackman"},{"property":"email","value":"newcontact_x_1361564914@hsgem.com"}]}'
9
9
  headers: {}
10
10
  response:
11
11
  status:
@@ -26,7 +26,39 @@ http_interactions:
26
26
  - keep-alive
27
27
  body:
28
28
  encoding: US-ASCII
29
- string: ! '{"vid":154964,"portal-id":62515,"profile-token":"AO_T-mMaMO14Jys0CrLFvkD56Xc8f7PvvFmhsvSPDDdm6-6uF2wbsFHaXFthseHCDcYvwjiWsMGmF9JSy1cdRpd2-PHwsGHsvBwWTwTDSH7cfTId6uYx7xpng_5YxQM9KauZgI_NJMKL","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMaMO14Jys0CrLFvkD56Xc8f7PvvFmhsvSPDDdm6-6uF2wbsFHaXFthseHCDcYvwjiWsMGmF9JSy1cdRpd2-PHwsGHsvBwWTwTDSH7cfTId6uYx7xpng_5YxQM9KauZgI_NJMKL/","properties":{"email":{"value":"newcontact_x_1361564914@hsgem.com","versions":[{"value":"newcontact_x_1361564914@hsgem.com","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564915163,"selected":false}]},"createdate":{"value":"1361564915163","versions":[{"value":"1361564915163","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564915163,"selected":false}]},"lastname":{"value":"Jackman","versions":[{"value":"Jackman","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564915163,"selected":false}]},"firstname":{"value":"Hugh","versions":[{"value":"Hugh","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564915163,"selected":false}]}},"form-submissions":[],"list-memberships":[],"identity-profiles":[{"vid":154964,"identities":[{"type":"EMAIL","value":"newcontact_x_1361564914@hsgem.com","timestamp":1361564915163},{"type":"LEAD_GUID","value":"49034e6d-f3f4-4018-8b50-1baa22cdb514","timestamp":1361564915173}]}]}'
29
+ string: '{"vid":154964,"portal-id":62515,"profile-token":"AO_T-mMaMO14Jys0CrLFvkD56Xc8f7PvvFmhsvSPDDdm6-6uF2wbsFHaXFthseHCDcYvwjiWsMGmF9JSy1cdRpd2-PHwsGHsvBwWTwTDSH7cfTId6uYx7xpng_5YxQM9KauZgI_NJMKL","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMaMO14Jys0CrLFvkD56Xc8f7PvvFmhsvSPDDdm6-6uF2wbsFHaXFthseHCDcYvwjiWsMGmF9JSy1cdRpd2-PHwsGHsvBwWTwTDSH7cfTId6uYx7xpng_5YxQM9KauZgI_NJMKL/","properties":{"email":{"value":"newcontact_x_1361564914@hsgem.com","versions":[{"value":"newcontact_x_1361564914@hsgem.com","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564915163,"selected":false}]},"createdate":{"value":"1361564915163","versions":[{"value":"1361564915163","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564915163,"selected":false}]},"lastname":{"value":"Jackman","versions":[{"value":"Jackman","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564915163,"selected":false}]},"firstname":{"value":"Hugh","versions":[{"value":"Hugh","source-type":"API","source-id":null,"source-label":null,"timestamp":1361564915163,"selected":false}]}},"form-submissions":[],"list-memberships":[],"identity-profiles":[{"vid":154964,"identities":[{"type":"EMAIL","value":"newcontact_x_1361564914@hsgem.com","timestamp":1361564915163},{"type":"LEAD_GUID","value":"49034e6d-f3f4-4018-8b50-1baa22cdb514","timestamp":1361564915173}]}]}'
30
30
  http_version:
31
31
  recorded_at: Fri, 22 Feb 2013 20:28:35 GMT
32
+ - request:
33
+ method: post
34
+ uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"properties":[{"property":"firstname","value":"Hugh"},{"property":"lastname","value":"Jackman"},{"property":"email","value":"newcontact_x_1424888102@hsgem.com"}]}'
38
+ headers:
39
+ Content-Type:
40
+ - application/json
41
+ response:
42
+ status:
43
+ code: 405
44
+ message: Method Not Allowed
45
+ headers:
46
+ Access-Control-Allow-Credentials:
47
+ - 'false'
48
+ Allow:
49
+ - HEAD,GET,OPTIONS
50
+ Date:
51
+ - Wed, 25 Feb 2015 18:15:03 GMT
52
+ Vary:
53
+ - Accept-Encoding
54
+ - Accept-Encoding
55
+ Content-Length:
56
+ - '0'
57
+ Connection:
58
+ - keep-alive
59
+ body:
60
+ encoding: UTF-8
61
+ string: ''
62
+ http_version:
63
+ recorded_at: Wed, 25 Feb 2015 18:15:02 GMT
32
64
  recorded_with: VCR 2.4.0