@@ -29,7 +29,7 @@ with Apideck(
2929 app_id = " dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" ,
3030) as apideck:
3131
32- res = apideck.crm.activities.list(service_id = " salesforce" , filter_ = {
32+ res = apideck.crm.activities.list(raw = False , service_id = " salesforce" , limit = 20 , filter_ = {
3333 " updated_since" : dateutil.parser.isoparse(" 2020-09-30T07:43:32.000Z" ),
3434 }, sort = {
3535 " by" : apideck_unify.ActivitiesSortBy.CREATED_AT ,
@@ -91,7 +91,7 @@ with Apideck(
9191 app_id = " dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" ,
9292) as apideck:
9393
94- res = apideck.crm.activities.create(type_ = apideck_unify.ActivityType.MEETING , service_id = " salesforce" , activity_datetime = " 2021-05-01T12:00:00.000Z" , duration_seconds = 1800 , user_id = " 12345" , account_id = " 12345" , contact_id = " 12345" , company_id = " 12345" , opportunity_id = " 12345" , lead_id = " 12345" , owner_id = " 12345" , campaign_id = " 12345" , case_id = " 12345" , asset_id = " 12345" , contract_id = " 12345" , product_id = " 12345" , solution_id = " 12345" , custom_object_id = " 12345" , title = " Meeting" , description = " More info about the meeting" , note = " An internal note about the meeting" , location = " Space" , location_address = {
94+ res = apideck.crm.activities.create(type_ = apideck_unify.ActivityType.MEETING , raw = False , service_id = " salesforce" , activity_datetime = " 2021-05-01T12:00:00.000Z" , duration_seconds = 1800 , user_id = " 12345" , account_id = " 12345" , contact_id = " 12345" , company_id = " 12345" , opportunity_id = " 12345" , lead_id = " 12345" , owner_id = " 12345" , campaign_id = " 12345" , case_id = " 12345" , asset_id = " 12345" , contract_id = " 12345" , product_id = " 12345" , solution_id = " 12345" , custom_object_id = " 12345" , title = " Meeting" , description = " More info about the meeting" , note = " An internal note about the meeting" , location = " Space" , location_address = {
9595 " id" : " 123" ,
9696 " type" : apideck_unify.Type.PRIMARY ,
9797 " string" : " 25 Spring Street, Blackburn, VIC 3130" ,
@@ -121,6 +121,13 @@ with Apideck(
121121 " id" : " 2389328923893298" ,
122122 " name" : " employee_level" ,
123123 " description" : " Employee Level" ,
124+ " value" : {},
125+ },
126+ {
127+ " id" : " 2389328923893298" ,
128+ " name" : " employee_level" ,
129+ " description" : " Employee Level" ,
130+ " value" : True ,
124131 },
125132 ], attendees = [
126133 {
@@ -135,7 +142,35 @@ with Apideck(
135142 " status" : apideck_unify.ActivityAttendeeStatus.ACCEPTED ,
136143 },
137144 ], pass_through = [
138-
145+ {
146+ " service_id" : " <id>" ,
147+ " extend_paths" : [
148+ {
149+ " path" : " $.nested.property" ,
150+ " value" : {
151+ " TaxClassificationRef" : {
152+ " value" : " EUC-99990201-V1-00020000" ,
153+ },
154+ },
155+ },
156+ {
157+ " path" : " $.nested.property" ,
158+ " value" : {
159+ " TaxClassificationRef" : {
160+ " value" : " EUC-99990201-V1-00020000" ,
161+ },
162+ },
163+ },
164+ {
165+ " path" : " $.nested.property" ,
166+ " value" : {
167+ " TaxClassificationRef" : {
168+ " value" : " EUC-99990201-V1-00020000" ,
169+ },
170+ },
171+ },
172+ ],
173+ },
139174 ])
140175
141176 assert res.create_activity_response is not None
@@ -228,7 +263,7 @@ with Apideck(
228263 app_id = " dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" ,
229264) as apideck:
230265
231- res = apideck.crm.activities.get(id = " <id>" , service_id = " salesforce" , fields = " id,updated_at" )
266+ res = apideck.crm.activities.get(id = " <id>" , service_id = " salesforce" , raw = False , fields = " id,updated_at" )
232267
233268 assert res.get_activity_response is not None
234269
@@ -279,7 +314,7 @@ with Apideck(
279314 app_id = " dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" ,
280315) as apideck:
281316
282- res = apideck.crm.activities.update(id = " <id>" , type_ = apideck_unify.ActivityType.MEETING , service_id = " salesforce" , activity_datetime = " 2021-05-01T12:00:00.000Z" , duration_seconds = 1800 , user_id = " 12345" , account_id = " 12345" , contact_id = " 12345" , company_id = " 12345" , opportunity_id = " 12345" , lead_id = " 12345" , owner_id = " 12345" , campaign_id = " 12345" , case_id = " 12345" , asset_id = " 12345" , contract_id = " 12345" , product_id = " 12345" , solution_id = " 12345" , custom_object_id = " 12345" , title = " Meeting" , description = " More info about the meeting" , note = " An internal note about the meeting" , location = " Space" , location_address = {
317+ res = apideck.crm.activities.update(id = " <id>" , type_ = apideck_unify.ActivityType.MEETING , service_id = " salesforce" , raw = False , activity_datetime = " 2021-05-01T12:00:00.000Z" , duration_seconds = 1800 , user_id = " 12345" , account_id = " 12345" , contact_id = " 12345" , company_id = " 12345" , opportunity_id = " 12345" , lead_id = " 12345" , owner_id = " 12345" , campaign_id = " 12345" , case_id = " 12345" , asset_id = " 12345" , contract_id = " 12345" , product_id = " 12345" , solution_id = " 12345" , custom_object_id = " 12345" , title = " Meeting" , description = " More info about the meeting" , note = " An internal note about the meeting" , location = " Space" , location_address = {
283318 " id" : " 123" ,
284319 " type" : apideck_unify.Type.PRIMARY ,
285320 " string" : " 25 Spring Street, Blackburn, VIC 3130" ,
@@ -309,6 +344,7 @@ with Apideck(
309344 " id" : " 2389328923893298" ,
310345 " name" : " employee_level" ,
311346 " description" : " Employee Level" ,
347+ " value" : {},
312348 },
313349 {
314350 " id" : " 2389328923893298" ,
@@ -320,6 +356,10 @@ with Apideck(
320356 " id" : " 2389328923893298" ,
321357 " name" : " employee_level" ,
322358 " description" : " Employee Level" ,
359+ " value" : [
360+ {},
361+ {},
362+ ],
323363 },
324364 ], attendees = [
325365 {
@@ -333,11 +373,29 @@ with Apideck(
333373 " is_organizer" : True ,
334374 " status" : apideck_unify.ActivityAttendeeStatus.ACCEPTED ,
335375 },
376+ {
377+ " name" : " Elon Musk" ,
378+ " first_name" : " Elon" ,
379+ " middle_name" : " D." ,
380+ " last_name" : " Musk" ,
381+ " prefix" : " Mr." ,
382+ " suffix" : " PhD" ,
383+ " email_address" :
" [email protected] " ,
384+ " is_organizer" : True ,
385+ " status" : apideck_unify.ActivityAttendeeStatus.ACCEPTED ,
386+ },
336387 ], pass_through = [
337388 {
338389 " service_id" : " <id>" ,
339390 " extend_paths" : [
340-
391+ {
392+ " path" : " $.nested.property" ,
393+ " value" : {
394+ " TaxClassificationRef" : {
395+ " value" : " EUC-99990201-V1-00020000" ,
396+ },
397+ },
398+ },
341399 ],
342400 },
343401 {
@@ -380,6 +438,14 @@ with Apideck(
380438 },
381439 },
382440 },
441+ {
442+ " path" : " $.nested.property" ,
443+ " value" : {
444+ " TaxClassificationRef" : {
445+ " value" : " EUC-99990201-V1-00020000" ,
446+ },
447+ },
448+ },
383449 ],
384450 },
385451 ])
@@ -475,7 +541,7 @@ with Apideck(
475541 app_id = " dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" ,
476542) as apideck:
477543
478- res = apideck.crm.activities.delete(id = " <id>" , service_id = " salesforce" )
544+ res = apideck.crm.activities.delete(id = " <id>" , service_id = " salesforce" , raw = False )
479545
480546 assert res.delete_activity_response is not None
481547
0 commit comments