diff --git a/spec/cassettes/Change_Salesforce_contact_manually/can_be_set_if_the_Contact_exists_in_SF.yml b/spec/cassettes/Change_Salesforce_contact_manually/can_be_set_if_the_Contact_exists_in_SF.yml new file mode 100644 index 000000000..f2374d52b --- /dev/null +++ b/spec/cassettes/Change_Salesforce_contact_manually/can_be_set_if_the_Contact_exists_in_SF.yml @@ -0,0 +1,183 @@ +--- +http_interactions: +- request: + method: get + uri: "/services/data/v51.0/query?q=SELECT%20Id,%20Name,%20BillingCity,%20BillingState,%20BillingCountry,%20Type,%20School_Location__c,%20SheerID_School_Name__c,%20K_I_P__c,%20child_of_kip__c,%20Total_School_Enrollment__c%20FROM%20Account%20WHERE%20(RecordType.Name%20=%20%27School%27%20OR%20RecordType.Name%20=%20%27School%20District%27%20OR%20RecordType.Name%20=%20%27General%27)%20AND%20(Name%20IN%20(%27RSpec%20University%27))" + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Faraday v1.0.1 + Authorization: + - OAuth + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 22 Jan 2024 19:56:07 GMT + Content-Type: + - application/json;charset=UTF-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Set-Cookie: + - BrowserId=R-5DbrlgEe6oD9sXjYmahw; domain=.salesforce.com; path=/; expires=Tue, + 21-Jan-2025 19:56:06 GMT; Max-Age=31536000 + - CookieConsentPolicy=0:1; path=/; expires=Tue, 21-Jan-2025 19:56:06 GMT; Max-Age=31536000; + secure + - LSKey-c$CookieConsentPolicy=0:1; path=/; expires=Tue, 21-Jan-2025 19:56:06 + GMT; Max-Age=31536000; secure + Strict-Transport-Security: + - max-age=63072000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Robots-Tag: + - none + Cache-Control: + - no-cache,must-revalidate,max-age=0,no-store,private + Sforce-Limit-Info: + - api-usage=17813/5000000 + Vary: + - Accept-Encoding + Server: + - sfdcedge + X-Sfdc-Request-Id: + - b361f08d2d33096455adcd435d32ddbf + X-Sfdc-Edge-Cache: + - MISS + body: + encoding: ASCII-8BIT + string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"Account","url":"/services/data/v51.0/sobjects/Account/0010400001ayViVAAU"},"Id":"0010400001ayViVAAU","Name":"RSpec + University","BillingCity":null,"BillingState":null,"BillingCountry":"United + States","Type":null,"School_Location__c":"Domestic","SheerID_School_Name__c":null,"K_I_P__c":false,"child_of_kip__c":false,"Total_School_Enrollment__c":null}]}' + http_version: + recorded_at: Mon, 22 Jan 2024 19:56:07 GMT +- request: + method: post + uri: "/services/data/v51.0/sobjects/Contact" + body: + encoding: UTF-8 + string: '{"FirstName":"Nelly","LastName":"Casper","Email":"george@example.com","AccountId":"0010400001ayViVAAU"}' + headers: + User-Agent: + - Faraday v1.0.1 + Content-Type: + - application/json + Authorization: + - OAuth + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 22 Jan 2024 19:56:09 GMT + Content-Type: + - application/json;charset=UTF-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Set-Cookie: + - BrowserId=SGBmAblgEe63A_mFbUD-fw; domain=.salesforce.com; path=/; expires=Tue, + 21-Jan-2025 19:56:07 GMT; Max-Age=31536000 + - CookieConsentPolicy=0:1; path=/; expires=Tue, 21-Jan-2025 19:56:07 GMT; Max-Age=31536000; + secure + - LSKey-c$CookieConsentPolicy=0:1; path=/; expires=Tue, 21-Jan-2025 19:56:07 + GMT; Max-Age=31536000; secure + Strict-Transport-Security: + - max-age=63072000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Robots-Tag: + - none + Cache-Control: + - no-cache,must-revalidate,max-age=0,no-store,private + Sforce-Limit-Info: + - api-usage=17813/5000000 + Location: + - "/services/data/v51.0/sobjects/Contact/003VZ000002wESuYAM" + Vary: + - Accept-Encoding + Server: + - sfdcedge + X-Sfdc-Request-Id: + - 9d94f74df182526f7742431ecf8e169d + body: + encoding: ASCII-8BIT + string: '{"id":"003VZ000002wESuYAM","success":true,"errors":[]}' + http_version: + recorded_at: Mon, 22 Jan 2024 19:56:09 GMT +- request: + method: get + uri: "/services/data/v51.0/query?q=SELECT%20Id,%20Name,%20FirstName,%20LastName,%20Email,%20Email_alt__c,%20Faculty_Confirmed_Date__c,%20FV_Status__c,%20LastModifiedDate,%20AccountId,%20School_Type__c,%20SendFacultyVerificationTo__c,%20All_Emails__c,%20Adoption_Status__c,%20Grant_Tutor_Access__c,%20Title_1_school__c,%20Accounts_UUID__c,%20LeadSource,%20Signup_Date__c,%20Renewal_Eligible__c%20FROM%20Contact%20WHERE%20(Id%20=%20%27003VZ000002wESuYAM%27)%20LIMIT%201" + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Faraday v1.0.1 + Authorization: + - OAuth + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 22 Jan 2024 19:56:10 GMT + Content-Type: + - application/json;charset=UTF-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Set-Cookie: + - BrowserId=Shuq1rlgEe6oD9sXjYmahw; domain=.salesforce.com; path=/; expires=Tue, + 21-Jan-2025 19:56:10 GMT; Max-Age=31536000 + - CookieConsentPolicy=0:1; path=/; expires=Tue, 21-Jan-2025 19:56:10 GMT; Max-Age=31536000; + secure + - LSKey-c$CookieConsentPolicy=0:1; path=/; expires=Tue, 21-Jan-2025 19:56:10 + GMT; Max-Age=31536000; secure + Strict-Transport-Security: + - max-age=63072000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Robots-Tag: + - none + Cache-Control: + - no-cache,must-revalidate,max-age=0,no-store,private + Sforce-Limit-Info: + - api-usage=17816/5000000 + Vary: + - Accept-Encoding + Server: + - sfdcedge + X-Sfdc-Request-Id: + - 48b5384a826f4b45dd470639f179b9f9 + X-Sfdc-Edge-Cache: + - MISS + body: + encoding: ASCII-8BIT + string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"Contact","url":"/services/data/v51.0/sobjects/Contact/003VZ000002wESuYAM"},"Id":"003VZ000002wESuYAM","Name":"Nelly + Casper","FirstName":"Nelly","LastName":"Casper","Email":"george@example.com","Email_alt__c":null,"Faculty_Confirmed_Date__c":null,"FV_Status__c":null,"LastModifiedDate":"2024-01-22T19:56:09.000+0000","AccountId":"0010400001ayViVAAU","School_Type__c":null,"SendFacultyVerificationTo__c":null,"All_Emails__c":"george@example.com","Adoption_Status__c":"Not + Adopter","Grant_Tutor_Access__c":false,"Title_1_school__c":false,"Accounts_UUID__c":null,"LeadSource":null,"Signup_Date__c":null,"Renewal_Eligible__c":false}]}' + http_version: + recorded_at: Mon, 22 Jan 2024 19:56:10 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/cassettes/Change_Salesforce_contact_manually/cannot_be_set_if_the_Contact_does_not_exist_in_SF.yml b/spec/cassettes/Change_Salesforce_contact_manually/cannot_be_set_if_the_Contact_does_not_exist_in_SF.yml new file mode 100644 index 000000000..83bfdbe91 --- /dev/null +++ b/spec/cassettes/Change_Salesforce_contact_manually/cannot_be_set_if_the_Contact_does_not_exist_in_SF.yml @@ -0,0 +1,61 @@ +--- +http_interactions: +- request: + method: get + uri: "/services/data/v51.0/query?q=SELECT%20Id,%20Name,%20FirstName,%20LastName,%20Email,%20Email_alt__c,%20Faculty_Confirmed_Date__c,%20FV_Status__c,%20LastModifiedDate,%20AccountId,%20School_Type__c,%20SendFacultyVerificationTo__c,%20All_Emails__c,%20Adoption_Status__c,%20Grant_Tutor_Access__c,%20Title_1_school__c,%20Accounts_UUID__c,%20LeadSource,%20Signup_Date__c,%20Renewal_Eligible__c%20FROM%20Contact%20WHERE%20(Id%20=%20%270010v000002Wo0qAAC%27)%20LIMIT%201" + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Faraday v1.0.1 + Authorization: + - OAuth + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 22 Jan 2024 19:56:11 GMT + Content-Type: + - application/json;charset=UTF-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Set-Cookie: + - BrowserId=SsGuN7lgEe61h6E7PyMLdQ; domain=.salesforce.com; path=/; expires=Tue, + 21-Jan-2025 19:56:11 GMT; Max-Age=31536000 + - CookieConsentPolicy=0:1; path=/; expires=Tue, 21-Jan-2025 19:56:11 GMT; Max-Age=31536000; + secure + - LSKey-c$CookieConsentPolicy=0:1; path=/; expires=Tue, 21-Jan-2025 19:56:11 + GMT; Max-Age=31536000; secure + Strict-Transport-Security: + - max-age=63072000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Robots-Tag: + - none + Cache-Control: + - no-cache,must-revalidate,max-age=0,no-store,private + Sforce-Limit-Info: + - api-usage=17814/5000000 + Vary: + - Accept-Encoding + Server: + - sfdcedge + X-Sfdc-Request-Id: + - 2d05aa915cee419dab8ad1a3dba08560 + X-Sfdc-Edge-Cache: + - MISS + body: + encoding: ASCII-8BIT + string: '{"totalSize":0,"done":true,"records":[]}' + http_version: + recorded_at: Mon, 22 Jan 2024 19:56:11 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/cassettes/Change_Salesforce_contact_manually/cannot_be_set_if_the_ID_is_of_malformed.yml b/spec/cassettes/Change_Salesforce_contact_manually/cannot_be_set_if_the_ID_is_of_malformed.yml new file mode 100644 index 000000000..3215fa89d --- /dev/null +++ b/spec/cassettes/Change_Salesforce_contact_manually/cannot_be_set_if_the_ID_is_of_malformed.yml @@ -0,0 +1,59 @@ +--- +http_interactions: +- request: + method: get + uri: "/services/data/v51.0/query?q=SELECT%20Id,%20Name,%20FirstName,%20LastName,%20Email,%20Email_alt__c,%20Faculty_Confirmed_Date__c,%20FV_Status__c,%20LastModifiedDate,%20AccountId,%20School_Type__c,%20SendFacultyVerificationTo__c,%20All_Emails__c,%20Adoption_Status__c,%20Grant_Tutor_Access__c,%20Title_1_school__c,%20Accounts_UUID__c,%20LeadSource,%20Signup_Date__c,%20Renewal_Eligible__c%20FROM%20Contact%20WHERE%20(Id%20=%20%27somethingwonky%27)%20LIMIT%201" + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Faraday v1.0.1 + Authorization: + - OAuth + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 400 + message: Bad Request + headers: + Date: + - Mon, 22 Jan 2024 19:56:06 GMT + Content-Type: + - application/json;charset=UTF-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Set-Cookie: + - BrowserId=R2AMy7lgEe6PKx2XYQNBUg; domain=.salesforce.com; path=/; expires=Tue, + 21-Jan-2025 19:56:06 GMT; Max-Age=31536000 + - CookieConsentPolicy=0:1; path=/; expires=Tue, 21-Jan-2025 19:56:06 GMT; Max-Age=31536000; + secure + - LSKey-c$CookieConsentPolicy=0:1; path=/; expires=Tue, 21-Jan-2025 19:56:06 + GMT; Max-Age=31536000; secure + Strict-Transport-Security: + - max-age=63072000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Robots-Tag: + - none + Cache-Control: + - no-cache,must-revalidate,max-age=0,no-store,private + Sforce-Limit-Info: + - api-usage=17813/5000000 + Server: + - sfdcedge + X-Sfdc-Request-Id: + - efe2388c358b8d81b0974ea66f757bad + body: + encoding: UTF-8 + string: '[{"message":"\nRenewal_Eligible__c FROM Contact WHERE (Id = ''somethingwonky'') + LIMIT 1\n ^\nERROR at Row:1:Column:339\ninvalid + ID field: somethingwonky","errorCode":"INVALID_QUERY_FILTER_OPERATOR"}]' + http_version: + recorded_at: Mon, 22 Jan 2024 19:56:06 GMT +recorded_with: VCR 3.0.3