Permalink
Browse files

add merge method

  • Loading branch information...
1 parent 0134280 commit b1c315a0a3f741199a9d6d68fc889fcd13ec225f @bemky bemky committed Sep 21, 2016
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/mls/account.rb
View
9 lib/mls/account.rb
@@ -91,6 +91,15 @@ def company_name
return company
end
+ def merge_in(account_id)
+ req = Net::HTTP::Put.new("/accounts/#{self.id}/merge")
+ req.body = { account_id: account_id }.to_json
+ Account.connection.instance_variable_get(:@connection).send_request(req)
+ return true
+ rescue Sunstone::Exception::NotFound
+ return false
+ end
+
def self.send_reset_password_email(url, email_address)
req = Net::HTTP::Post.new("/accounts/password")
req.body = { email_address: email_address, url: url }.to_json

0 comments on commit b1c315a

Please sign in to comment.