Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update contact property endpoints #166

Merged
merged 1 commit into from
Dec 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.0.0 (TBD)

* Updates the endpoints referenced in `ContactProperties` to match the new
HubSpot [ContactProperty endpoints].

[ContactProperty endpoints]: https://developers.hubspot.com/docs/methods/contacts/contact-properties-overview

## 0.6.1 (November 29, 2018)

* [#148] Deprecate the use of the hubspot rake tasks. Deprecating these tasks
Expand All @@ -6,7 +13,6 @@

[#148]: https://github.com/adimichele/hubspot-ruby/pull/148


* [#148] Fix backwards compatibility to ensure users can access the hubspot rake
tasks

Expand Down
18 changes: 9 additions & 9 deletions lib/hubspot/contact_properties.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module Hubspot
class ContactProperties < Properties

ALL_PROPERTIES_PATH = '/contacts/v2/properties'
ALL_GROUPS_PATH = '/contacts/v2/groups'
CREATE_PROPERTY_PATH = '/contacts/v2/properties/'
UPDATE_PROPERTY_PATH = '/contacts/v2/properties/named/:property_name'
DELETE_PROPERTY_PATH = '/contacts/v2/properties/named/:property_name'
CREATE_GROUP_PATH = '/contacts/v2/groups/'
UPDATE_GROUP_PATH = '/contacts/v2/groups/named/:group_name'
DELETE_GROUP_PATH = '/contacts/v2/groups/named/:group_name'
ALL_PROPERTIES_PATH = "/properties/v1/contacts/properties"
ALL_GROUPS_PATH = "/properties/v1/contacts/groups"
CREATE_PROPERTY_PATH = "/properties/v1/contacts/properties"
UPDATE_PROPERTY_PATH = "/properties/v1/contacts/properties/named/:property_name"
DELETE_PROPERTY_PATH = "/properties/v1/contacts/properties/named/:property_name"
CREATE_GROUP_PATH = "/properties/v1/contacts/groups"
UPDATE_GROUP_PATH = "/properties/v1/contacts/groups/named/:group_name"
DELETE_GROUP_PATH = "/properties/v1/contacts/groups/named/:group_name"

class << self
def add_default_parameters(opts={})
Expand Down Expand Up @@ -56,4 +56,4 @@ def valid_params(params)
end
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/groups?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/properties?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/properties?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: post
uri: https://api.hubapi.com/contacts/v2/groups/?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups?hapikey=demo
body:
encoding: UTF-8
string: '{"name":"ff_group1","displayName":"Test Group One","displayOrder":100}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: post
uri: https://api.hubapi.com/contacts/v2/groups/?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups?hapikey=demo
body:
encoding: UTF-8
string: '{"name":"ff_group234","displayOrder":100}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: post
uri: https://api.hubapi.com/contacts/v2/properties/?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/properties?hapikey=demo
body:
encoding: UTF-8
string: '{"name":"my_new_property","groupName":"contactinformation","description":"What
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: delete
uri: https://api.hubapi.com/contacts/v2/groups/named/ff_group1?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups/named/ff_group1?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: delete
uri: https://api.hubapi.com/contacts/v2/groups/named/ff_group1?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups/named/ff_group1?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: delete
uri: https://api.hubapi.com/contacts/v2/properties/named/my_new_property?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/properties/named/my_new_property?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: delete
uri: https://api.hubapi.com/contacts/v2/properties/named/my_new_property?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/properties/named/my_new_property?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/groups?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/groups?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/properties?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/properties?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/properties?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/properties?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: put
uri: https://api.hubapi.com/contacts/v2/groups/named/ff_group1?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups/named/ff_group1?hapikey=demo
body:
encoding: UTF-8
string: '{"name":"ff_group1","displayName":"Test Group OneA","displayOrder":100}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: put
uri: https://api.hubapi.com/contacts/v2/properties/named/my_new_property?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/properties/named/my_new_property?hapikey=demo
body:
encoding: UTF-8
string: '{"name":"my_new_property","groupName":"contactinformation","description":"What
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/groups?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down Expand Up @@ -133,7 +133,7 @@ http_interactions:
recorded_at: Mon, 26 Nov 2018 21:46:19 GMT
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/properties?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/properties?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/groups?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down Expand Up @@ -133,7 +133,7 @@ http_interactions:
recorded_at: Mon, 26 Nov 2018 21:47:12 GMT
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/properties?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/properties?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down Expand Up @@ -176,7 +176,7 @@ http_interactions:
recorded_at: Mon, 26 Nov 2018 21:47:13 GMT
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/groups?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/groups?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down Expand Up @@ -307,7 +307,7 @@ http_interactions:
recorded_at: Mon, 26 Nov 2018 21:47:14 GMT
- request:
method: get
uri: https://api.hubapi.com/contacts/v2/properties?hapikey=demo
uri: https://api.hubapi.com/properties/v1/contacts/properties?hapikey=demo
body:
encoding: US-ASCII
string: ''
Expand Down