| @@ 87-103 (lines=17) @@ | ||
| 84 | * @param array $body |
|
| 85 | * @return object |
|
| 86 | */ |
|
| 87 | public function sendNewMessage(array $body) |
|
| 88 | { |
|
| 89 | // make the URL for this request |
|
| 90 | $url = $this->transformUrl(sprintf('%s/SendNewDocumentMessage', self::URI)); |
|
| 91 | ||
| 92 | // get the headers for this request |
|
| 93 | $headers = $this->headers->make('PUT', $url, $body); |
|
| 94 | ||
| 95 | // get the response |
|
| 96 | $response = $this->client->post($url, [ |
|
| 97 | 'headers' => $headers, |
|
| 98 | 'json' => $body, |
|
| 99 | ]); |
|
| 100 | ||
| 101 | // return the response |
|
| 102 | return $response; |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| 106 | * Sends a message to an external person with a link/URL |
|
| @@ 112-128 (lines=17) @@ | ||
| 109 | * @param array $body |
|
| 110 | * @return object |
|
| 111 | */ |
|
| 112 | public function sendExternalMessage(array $body) |
|
| 113 | { |
|
| 114 | // make the URL for this request |
|
| 115 | $url = $this->transformUrl(sprintf('%s/SendExternalMessage', self::URI)); |
|
| 116 | ||
| 117 | // get the headers for this request |
|
| 118 | $headers = $this->headers->make('POST', $url, $body); |
|
| 119 | ||
| 120 | // get the response |
|
| 121 | $response = $this->client->post($url, [ |
|
| 122 | 'headers' => $headers, |
|
| 123 | 'json' => $body, |
|
| 124 | ]); |
|
| 125 | ||
| 126 | // return the response |
|
| 127 | return $response; |
|
| 128 | } |
|
| 129 | } |
|
| 130 | ||
| @@ 93-111 (lines=19) @@ | ||
| 90 | * @param string $requestId |
|
| 91 | * @return object |
|
| 92 | */ |
|
| 93 | public function invalidate(string $requestId) |
|
| 94 | { |
|
| 95 | // make the URL for this request |
|
| 96 | $url = $this->transformUrl(sprintf('%s/Invalidate', self::URI)); |
|
| 97 | ||
| 98 | $body = ['RequestId' => $requestId]; |
|
| 99 | ||
| 100 | // get the headers for this request |
|
| 101 | $headers = $this->headers->make('PUT', $url, $body); |
|
| 102 | ||
| 103 | // get the response |
|
| 104 | $response = $this->client->put($url, [ |
|
| 105 | 'headers' => $headers, |
|
| 106 | 'json' => $body, |
|
| 107 | ]); |
|
| 108 | ||
| 109 | // return the response |
|
| 110 | return $response; |
|
| 111 | } |
|
| 112 | } |
|
| 113 | ||