Module: WebLogins
- Included in:
- TessituraRest
- Defined in:
- lib/tessitura_rest/crm/web_logins.rb
Instance Method Summary collapse
- #create_web_login(constituent, email_id, email, login_type, primary, temporary, options = {}) ⇒ Object
- #get_web_login(email, login_type, options = {}) ⇒ Object
Instance Method Details
#create_web_login(constituent, email_id, email, login_type, primary, temporary, options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/tessitura_rest/crm/web_logins.rb', line 8 def create_web_login(constituent, email_id, email, login_type, primary, temporary, = {}) parameters = { 'Constituent': { 'Id': constituent, }, 'Email': { 'Id': email_id, }, 'FailedAttempts': 3, 'Inactive': false, 'Login': email, 'LoginType': { 'Id': login_type, }, 'PrimaryIndicator': primary, 'TemporaryIndicator': temporary, } .merge!(basic_auth: @auth, headers: @headers) .merge!(:body => parameters) self.class.post(base_api_endpoint('CRM/WebLogins'), ) end |
#get_web_login(email, login_type, options = {}) ⇒ Object
2 3 4 5 6 |
# File 'lib/tessitura_rest/crm/web_logins.rb', line 2 def get_web_login(email, login_type, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("CRM/WebLogins/Search?emailAddress=#{email}&loginTypeId=#{login_type}"), ) JSON.parse(response.body) end |