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

Add list_memberships.create #42

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions lib/pardot/objects/list_memberships.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,22 @@ def read_by_id id, params = {}
get "/do/read/id/#{id}", params
end

def create list_id, prospect_id, params = {}
post "/do/create/list_id/#{list_id}/prospect_id/#{prospect_id}", params
end

protected

def get path, params = {}, result = "listMembership"
response = @client.get "listMembership", path, params
result ? response[result] : response
end

def post path, params = {}, result = "listMembership"
response = @client.post "listMembership", path, params
result ? response[result] : response
end

end

end
Expand Down
2 changes: 1 addition & 1 deletion ruby-pardot.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |s|
s.rubyforge_project = "ruby-pardot"

s.add_dependency "crack", "0.4.3"
s.add_dependency "httparty", "0.13.1"
s.add_dependency "httparty"

s.add_development_dependency "bundler", ">= 1.10"
s.add_development_dependency "rspec"
Expand Down