Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function alt_create_ticket() {
- $client = Factory::createWithApiKey(redacted);
- $properties = [
- "hs_pipeline" => "0",
- "hs_pipeline_stage" => "1",
- "hs_ticket_priority" => "HIGH",
- "hubspot_owner_id" => "",
- "subject" => "Example Ticket",
- "content" => "I am creating a new ticket"
- ];
- $SimplePublicObjectInput = new SimplePublicObjectInput(['properties' => $properties]);
- try {
- $apiResponse = $client->crm()->tickets()->basicApi()->create($SimplePublicObjectInput);
- var_dump($apiResponse);
- } catch (ApiException $e) {
- echo "Exception when calling basic_api->create: ", $e->getMessage();
- }
- }
- alt_create_ticket();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement