Advertisement
Guest User

Untitled

a guest
Dec 7th, 2021
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. function alt_create_ticket() {
  2. $client = Factory::createWithApiKey(redacted);
  3.  
  4. $properties = [
  5. "hs_pipeline" => "0",
  6. "hs_pipeline_stage" => "1",
  7. "hs_ticket_priority" => "HIGH",
  8. "hubspot_owner_id" => "",
  9. "subject" => "Example Ticket",
  10. "content" => "I am creating a new ticket"
  11. ];
  12. $SimplePublicObjectInput = new SimplePublicObjectInput(['properties' => $properties]);
  13.  
  14. try {
  15. $apiResponse = $client->crm()->tickets()->basicApi()->create($SimplePublicObjectInput);
  16. var_dump($apiResponse);
  17. } catch (ApiException $e) {
  18. echo "Exception when calling basic_api->create: ", $e->getMessage();
  19. }
  20. }
  21.  
  22.  
  23. alt_create_ticket();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement