Sha256: 9611625419a62271577cc9f6986409ed721e661357e4a1730965ca047c958dd6
Contents?: true
Size: 901 Bytes
Versions: 31
Compression:
Stored size: 901 Bytes
Contents
module WebLogins def get_web_login(email, login_type, options={}) options.merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("CRM/WebLogins/Search?emailAddress=#{email}&loginTypeId=#{login_type}"), options) JSON.parse(response.body) end def create_web_login(constituent, email_id, email, login_type, primary, temporary, options={}) parameters = { 'Constituent': { 'Id': constituent, }, 'Email': { 'Id': email_id, }, 'FailedAttempts': 3, 'Inactive': false, 'Login': email, 'LoginType': { 'Id': login_type, }, 'PrimaryIndicator': primary, 'TemporaryIndicator': temporary, } options.merge!(basic_auth: @auth, headers: @headers) options.merge!(:body => parameters) self.class.post(base_api_endpoint('CRM/WebLogins'), options) end end
Version data entries
31 entries across 31 versions & 1 rubygems