pub struct LegalDocumentClient { /* private fields */ }Expand description
Calls LegalDocumentService.
The legal documents Origin Cloud publishes: the Terms of Service, the Data Processing Agreement, the Service Level Agreement and the Acceptable Use Policy a customer accepts, and the documents published beside them. Every version stays readable under its fixed name once it is published, and none is ever changed: a correction is a new version.
Every method of this service is answered without an access token.
Implementations§
Source§impl LegalDocumentClient
impl LegalDocumentClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of LegalDocumentService that sends its calls through client.
Sourcepub fn service(&self) -> &Service
pub fn service(&self) -> &Service
The endpoint the client sends its calls to, which also serves the operations its methods answer with.
Sourcepub async fn list_legal_documents(
&self,
request: ListLegalDocumentsRequest,
) -> Result<ListLegalDocumentsResponse, Error>
pub async fn list_legal_documents( &self, request: ListLegalDocumentsRequest, ) -> Result<ListLegalDocumentsResponse, Error>
Lists the published legal documents, in a fixed order: terms, dpa,
sla, aup, subprocessors, toms, privacy, switching,
shared-responsibility. A document with no published version yet is
left out.
Sourcepub fn all_legal_documents(
&self,
request: ListLegalDocumentsRequest,
) -> Pages<LegalDocument>
pub fn all_legal_documents( &self, request: ListLegalDocumentsRequest, ) -> Pages<LegalDocument>
Returns everything list_legal_documents lists from request’s page on, fetching the next page as the stream reaches it. A page that fails ends the stream with its error.
Sourcepub async fn get_legal_document(
&self,
request: GetLegalDocumentRequest,
) -> Result<LegalDocument, Error>
pub async fn get_legal_document( &self, request: GetLegalDocumentRequest, ) -> Result<LegalDocument, Error>
Returns a legal document, with the version in force now and the latest
one published. Fails with NOT_FOUND for a document with no published
version.
Sourcepub async fn list_legal_document_versions(
&self,
request: ListLegalDocumentVersionsRequest,
) -> Result<ListLegalDocumentVersionsResponse, Error>
pub async fn list_legal_document_versions( &self, request: ListLegalDocumentVersionsRequest, ) -> Result<ListLegalDocumentVersionsResponse, Error>
Lists a legal document’s published versions, the latest first.
Sourcepub fn all_legal_document_versions(
&self,
request: ListLegalDocumentVersionsRequest,
) -> Pages<LegalDocumentVersion>
pub fn all_legal_document_versions( &self, request: ListLegalDocumentVersionsRequest, ) -> Pages<LegalDocumentVersion>
Returns everything list_legal_document_versions lists from request’s page on, fetching the next page as the stream reaches it. A page that fails ends the stream with its error.
Sourcepub async fn get_legal_document_version(
&self,
request: GetLegalDocumentVersionRequest,
) -> Result<LegalDocumentVersion, Error>
pub async fn get_legal_document_version( &self, request: GetLegalDocumentVersionRequest, ) -> Result<LegalDocumentVersion, Error>
Returns one published version of a legal document, its text included.
Sourcepub async fn download_legal_document_version(
&self,
request: DownloadLegalDocumentVersionRequest,
) -> Result<HttpBody, Error>
pub async fn download_legal_document_version( &self, request: DownloadLegalDocumentVersionRequest, ) -> Result<HttpBody, Error>
Returns a published version as a PDF (application/pdf), the file
itself rather than JSON. Every page’s footer names the document, the
version, the date it takes effect and its sha256.
It answers with the file itself, not JSON: an HttpBody with the file’s bytes and media type.