@origincloud/billing 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v1beta1/index.d.ts +2 -0
- package/dist/v1beta1/index.d.ts.map +1 -1
- package/dist/v1beta1/index.js +2 -0
- package/dist/v1beta1/index.js.map +1 -1
- package/dist/v1beta1/legal_acceptance.d.ts +194 -0
- package/dist/v1beta1/legal_acceptance.d.ts.map +1 -0
- package/dist/v1beta1/legal_acceptance.js +111 -0
- package/dist/v1beta1/legal_acceptance.js.map +1 -0
- package/dist/v1beta1/legal_document.d.ts +220 -0
- package/dist/v1beta1/legal_document.d.ts.map +1 -0
- package/dist/v1beta1/legal_document.js +141 -0
- package/dist/v1beta1/legal_document.js.map +1 -0
- package/package.json +3 -3
- package/src/v1beta1/index.ts +2 -0
- package/src/v1beta1/legal_acceptance.ts +274 -0
- package/src/v1beta1/legal_document.ts +325 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// Code generated by the SDK's generator (generator/). DO NOT EDIT.
|
|
2
|
+
// source: origincloud/billing/v1beta1/legal_document.proto
|
|
3
|
+
import { pathValue, query, } from "@origincloud/core";
|
|
4
|
+
/**
|
|
5
|
+
* Calls LegalDocumentService.
|
|
6
|
+
*
|
|
7
|
+
* The legal documents Origin Cloud publishes: the Terms of Service, the Data
|
|
8
|
+
* Processing Agreement, the Service Level Agreement and the Acceptable Use
|
|
9
|
+
* Policy a customer accepts, and the documents published beside them. Every
|
|
10
|
+
* version stays readable under its fixed name once it is published, and none
|
|
11
|
+
* is ever changed: a correction is a new version.
|
|
12
|
+
*
|
|
13
|
+
* Every method of this service is answered without an access token.
|
|
14
|
+
*/
|
|
15
|
+
export class LegalDocumentClient {
|
|
16
|
+
/**
|
|
17
|
+
* The endpoint the client sends its calls to, which also serves the
|
|
18
|
+
* operations its methods answer with.
|
|
19
|
+
*/
|
|
20
|
+
service;
|
|
21
|
+
/** A client of LegalDocumentService that sends its calls through `client`. */
|
|
22
|
+
constructor(client) {
|
|
23
|
+
this.service = client.service("billing", false);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Lists the published legal documents, in a fixed order: `terms`, `dpa`,
|
|
27
|
+
* `sla`, `aup`, `subprocessors`, `toms`, `privacy`, `switching`,
|
|
28
|
+
* `shared-responsibility`. A document with no published version yet is
|
|
29
|
+
* left out.
|
|
30
|
+
*/
|
|
31
|
+
async listLegalDocuments(request, options) {
|
|
32
|
+
return this.service.call({
|
|
33
|
+
method: "GET",
|
|
34
|
+
path: `/v1beta1/legalDocuments`,
|
|
35
|
+
query: query(request, []),
|
|
36
|
+
idempotent: true,
|
|
37
|
+
unauthenticated: true,
|
|
38
|
+
}, options);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Iterates over everything listLegalDocuments lists from the request's page on,
|
|
42
|
+
* fetching the next page as the loop reaches it. A page that fails ends
|
|
43
|
+
* the iteration with its error.
|
|
44
|
+
*/
|
|
45
|
+
async *allLegalDocuments(request, options) {
|
|
46
|
+
for (let page = request;;) {
|
|
47
|
+
const response = await this.listLegalDocuments(page, options);
|
|
48
|
+
yield* response.legalDocuments ?? [];
|
|
49
|
+
if (!response.nextPageToken)
|
|
50
|
+
return;
|
|
51
|
+
page = { ...page, pageToken: response.nextPageToken };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Returns a legal document, with the version in force now and the latest
|
|
56
|
+
* one published. Fails with `NOT_FOUND` for a document with no published
|
|
57
|
+
* version.
|
|
58
|
+
*/
|
|
59
|
+
async getLegalDocument(request, options) {
|
|
60
|
+
const p0 = pathValue("name", request.name, "legalDocuments/*");
|
|
61
|
+
return this.service.call({
|
|
62
|
+
method: "GET",
|
|
63
|
+
path: `/v1beta1/${p0}`,
|
|
64
|
+
query: query(request, ["name"]),
|
|
65
|
+
idempotent: true,
|
|
66
|
+
unauthenticated: true,
|
|
67
|
+
}, options);
|
|
68
|
+
}
|
|
69
|
+
/** Lists a legal document's published versions, the latest first. */
|
|
70
|
+
async listLegalDocumentVersions(request, options) {
|
|
71
|
+
const p0 = pathValue("parent", request.parent, "legalDocuments/*");
|
|
72
|
+
return this.service.call({
|
|
73
|
+
method: "GET",
|
|
74
|
+
path: `/v1beta1/${p0}/versions`,
|
|
75
|
+
query: query(request, ["parent"]),
|
|
76
|
+
idempotent: true,
|
|
77
|
+
unauthenticated: true,
|
|
78
|
+
}, options);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Iterates over everything listLegalDocumentVersions lists from the request's page on,
|
|
82
|
+
* fetching the next page as the loop reaches it. A page that fails ends
|
|
83
|
+
* the iteration with its error.
|
|
84
|
+
*/
|
|
85
|
+
async *allLegalDocumentVersions(request, options) {
|
|
86
|
+
for (let page = request;;) {
|
|
87
|
+
const response = await this.listLegalDocumentVersions(page, options);
|
|
88
|
+
yield* response.legalDocumentVersions ?? [];
|
|
89
|
+
if (!response.nextPageToken)
|
|
90
|
+
return;
|
|
91
|
+
page = { ...page, pageToken: response.nextPageToken };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** Returns one published version of a legal document, its text included. */
|
|
95
|
+
async getLegalDocumentVersion(request, options) {
|
|
96
|
+
const p0 = pathValue("name", request.name, "legalDocuments/*/versions/*");
|
|
97
|
+
return this.service.call({
|
|
98
|
+
method: "GET",
|
|
99
|
+
path: `/v1beta1/${p0}`,
|
|
100
|
+
query: query(request, ["name"]),
|
|
101
|
+
idempotent: true,
|
|
102
|
+
unauthenticated: true,
|
|
103
|
+
}, options);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Returns a published version as a PDF (`application/pdf`), the file
|
|
107
|
+
* itself rather than JSON. Every page's footer names the document, the
|
|
108
|
+
* version, the date it takes effect and its `sha256`.
|
|
109
|
+
*
|
|
110
|
+
* It answers with the file itself: its bytes, as they came, and their content type.
|
|
111
|
+
*/
|
|
112
|
+
async downloadLegalDocumentVersion(request, options) {
|
|
113
|
+
const p0 = pathValue("name", request.name, "legalDocuments/*/versions/*");
|
|
114
|
+
return this.service.download({
|
|
115
|
+
method: "GET",
|
|
116
|
+
path: `/v1beta1/${p0}:download`,
|
|
117
|
+
query: query(request, ["name"]),
|
|
118
|
+
idempotent: true,
|
|
119
|
+
unauthenticated: true,
|
|
120
|
+
}, options);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** What a version changes, and so what publishing it asks of a customer. */
|
|
124
|
+
export const LegalDocumentVersion_ChangeClass = {
|
|
125
|
+
/** Not used. */
|
|
126
|
+
CHANGE_CLASS_UNSPECIFIED: "CHANGE_CLASS_UNSPECIFIED",
|
|
127
|
+
/**
|
|
128
|
+
* Changes rights or obligations. For a document customers accept, a
|
|
129
|
+
* customer accepts this version before it applies to them, and it is
|
|
130
|
+
* announced at least six weeks before it takes effect.
|
|
131
|
+
*/
|
|
132
|
+
MATERIAL: "MATERIAL",
|
|
133
|
+
/**
|
|
134
|
+
* Announced ahead and never accepted, such as a new sub-processor,
|
|
135
|
+
* announced at least 30 days before it takes effect.
|
|
136
|
+
*/
|
|
137
|
+
NOTICE: "NOTICE",
|
|
138
|
+
/** Wording, corrections and formatting. Asks nothing of anyone. */
|
|
139
|
+
EDITORIAL: "EDITORIAL",
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=legal_document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legal_document.js","sourceRoot":"","sources":["../../src/v1beta1/legal_document.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,2DAA2D;AAE3D,OAAO,EAML,SAAS,EACT,KAAK,GACN,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;GAUG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;;OAGG;IACM,OAAO,CAAU;IAE1B,8EAA8E;IAC9E,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,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,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,4BAA4B,CAAC,OAA4C,EAAE,OAAqB;QACpG,MAAM,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,6BAA6B,CAAC,CAAC;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,YAAY,EAAE,WAAW;YAC/B,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;YAC/B,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,IAAI;SACtB,EACD,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAwFD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,gBAAgB;IAChB,wBAAwB,EAAE,0BAA0B;IACpD;;;;OAIG;IACH,QAAQ,EAAE,UAAU;IACpB;;;OAGG;IACH,MAAM,EAAE,QAAQ;IAChB,mEAAmE;IACnE,SAAS,EAAE,WAAW;CACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origincloud/billing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Origin Cloud's billing service: billing accounts and the projects they pay for, payment methods, cost and usage, spend limits and the price list.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/origincloudhq/sdk-typescript#readme",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"!dist/**/*.tsbuildinfo"
|
|
35
35
|
],
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@origincloud/core": "^0.
|
|
37
|
+
"@origincloud/core": "^0.28.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@origincloud/core": "^0.
|
|
40
|
+
"@origincloud/core": "^0.28.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/v1beta1/index.ts
CHANGED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
// Code generated by the SDK's generator (generator/). DO NOT EDIT.
|
|
2
|
+
// source: origincloud/billing/v1beta1/legal_acceptance.proto
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
type CalendarDate,
|
|
6
|
+
type CallOptions,
|
|
7
|
+
type Client,
|
|
8
|
+
type Service,
|
|
9
|
+
pathValue,
|
|
10
|
+
query,
|
|
11
|
+
} from "@origincloud/core";
|
|
12
|
+
import type { BillingAddress } from "./billing_account.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Calls LegalAcceptanceService.
|
|
16
|
+
*
|
|
17
|
+
* A billing account's acceptances of the legal documents customers accept:
|
|
18
|
+
* the Terms of Service, the Data Processing Agreement, the Service Level
|
|
19
|
+
* Agreement and the Acceptable Use Policy. The billing account is the legal
|
|
20
|
+
* entity that accepts. An acceptance is a record that never changes, and it
|
|
21
|
+
* is kept after the billing account and its organization are deleted.
|
|
22
|
+
*/
|
|
23
|
+
export class LegalAcceptanceClient {
|
|
24
|
+
/**
|
|
25
|
+
* The endpoint the client sends its calls to, which also serves the
|
|
26
|
+
* operations its methods answer with.
|
|
27
|
+
*/
|
|
28
|
+
readonly service: Service;
|
|
29
|
+
|
|
30
|
+
/** A client of LegalAcceptanceService that sends its calls through `client`. */
|
|
31
|
+
constructor(client: Client) {
|
|
32
|
+
this.service = client.service("billing", false);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Lists a billing account's acceptances, the latest first. Needs
|
|
37
|
+
* `admin.billing_account.get` on the organization.
|
|
38
|
+
*/
|
|
39
|
+
async listLegalAcceptances(request: ListLegalAcceptancesRequest, options?: CallOptions): Promise<ListLegalAcceptancesResponse> {
|
|
40
|
+
const p0 = pathValue("parent", request.parent, "organizations/*/billingAccounts/*");
|
|
41
|
+
return this.service.call<ListLegalAcceptancesResponse>(
|
|
42
|
+
{
|
|
43
|
+
method: "GET",
|
|
44
|
+
path: `/v1beta1/${p0}/legalAcceptances`,
|
|
45
|
+
query: query(request, ["parent"]),
|
|
46
|
+
idempotent: true,
|
|
47
|
+
},
|
|
48
|
+
options,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Iterates over everything listLegalAcceptances lists from the request's page on,
|
|
54
|
+
* fetching the next page as the loop reaches it. A page that fails ends
|
|
55
|
+
* the iteration with its error.
|
|
56
|
+
*/
|
|
57
|
+
async *allLegalAcceptances(request: ListLegalAcceptancesRequest, options?: CallOptions): AsyncGenerator<LegalAcceptance, void, undefined> {
|
|
58
|
+
for (let page = request; ; ) {
|
|
59
|
+
const response = await this.listLegalAcceptances(page, options);
|
|
60
|
+
yield* response.legalAcceptances ?? [];
|
|
61
|
+
if (!response.nextPageToken) return;
|
|
62
|
+
page = { ...page, pageToken: response.nextPageToken };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Returns one of a billing account's acceptances. Needs
|
|
68
|
+
* `admin.billing_account.get` on the organization.
|
|
69
|
+
*/
|
|
70
|
+
async getLegalAcceptance(request: GetLegalAcceptanceRequest, options?: CallOptions): Promise<LegalAcceptance> {
|
|
71
|
+
const p0 = pathValue("name", request.name, "organizations/*/billingAccounts/*/legalAcceptances/*");
|
|
72
|
+
return this.service.call<LegalAcceptance>(
|
|
73
|
+
{
|
|
74
|
+
method: "GET",
|
|
75
|
+
path: `/v1beta1/${p0}`,
|
|
76
|
+
query: query(request, ["name"]),
|
|
77
|
+
idempotent: true,
|
|
78
|
+
},
|
|
79
|
+
options,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Accepts versions of legal documents for a billing account, all of them
|
|
85
|
+
* or none. Each version is named with the `sha256` of the text the caller
|
|
86
|
+
* showed, and must be the version in force or one published to take effect
|
|
87
|
+
* later. A version the account accepted before is returned as it was then.
|
|
88
|
+
* `actsAsBusiness` must be true: the services are offered to businesses
|
|
89
|
+
* only. Needs `admin.billing_account.update` on the organization.
|
|
90
|
+
*/
|
|
91
|
+
async acceptLegalDocuments(request: AcceptLegalDocumentsRequest, options?: CallOptions): Promise<ListLegalAcceptancesResponse> {
|
|
92
|
+
const p0 = pathValue("name", request.name, "organizations/*/billingAccounts/*");
|
|
93
|
+
return this.service.call<ListLegalAcceptancesResponse>(
|
|
94
|
+
{
|
|
95
|
+
method: "POST",
|
|
96
|
+
path: `/v1beta1/${p0}:acceptLegalDocuments`,
|
|
97
|
+
body: request,
|
|
98
|
+
idempotent: true,
|
|
99
|
+
},
|
|
100
|
+
options,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Returns the legal document versions a billing account has yet to
|
|
106
|
+
* accept. A version is `blocking` once it is in force: until the account
|
|
107
|
+
* accepts it, creating or growing billable resources charged to the
|
|
108
|
+
* account is refused. Running resources are never affected. Needs
|
|
109
|
+
* `admin.billing_account.get` on the organization.
|
|
110
|
+
*/
|
|
111
|
+
async queryLegalRequirements(request: QueryLegalRequirementsRequest, options?: CallOptions): Promise<QueryLegalRequirementsResponse> {
|
|
112
|
+
const p0 = pathValue("name", request.name, "organizations/*/billingAccounts/*");
|
|
113
|
+
return this.service.call<QueryLegalRequirementsResponse>(
|
|
114
|
+
{
|
|
115
|
+
method: "GET",
|
|
116
|
+
path: `/v1beta1/${p0}:queryLegalRequirements`,
|
|
117
|
+
query: query(request, ["name"]),
|
|
118
|
+
idempotent: true,
|
|
119
|
+
},
|
|
120
|
+
options,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** A billing account's acceptance of one version of a legal document. */
|
|
126
|
+
export interface LegalAcceptance {
|
|
127
|
+
/** The acceptance's resource name. */
|
|
128
|
+
name?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The version accepted,
|
|
131
|
+
* `legalDocuments/{legal_document}/versions/{version}`.
|
|
132
|
+
*/
|
|
133
|
+
legalDocumentVersion?: string;
|
|
134
|
+
/** The SHA-256 of the text accepted: the version's `sha256`. */
|
|
135
|
+
sha256?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Who accepted: `user:{id}`, or `service_account:{id}` for a service
|
|
138
|
+
* account.
|
|
139
|
+
*/
|
|
140
|
+
accepter?: string;
|
|
141
|
+
/** When the version was accepted. */
|
|
142
|
+
acceptTime?: string;
|
|
143
|
+
/** How the acceptance came about. */
|
|
144
|
+
method?: LegalAcceptance_Method;
|
|
145
|
+
/** Whether the accepter confirmed acting as a business. Always true. */
|
|
146
|
+
actsAsBusiness?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* The legal entity that accepted, as it was at `acceptTime`: the
|
|
149
|
+
* organization's name.
|
|
150
|
+
*/
|
|
151
|
+
organizationDisplayName?: string;
|
|
152
|
+
/**
|
|
153
|
+
* The billing account's address at `acceptTime`; unset for an account
|
|
154
|
+
* that had none.
|
|
155
|
+
*/
|
|
156
|
+
billingAddress?: BillingAddress;
|
|
157
|
+
/**
|
|
158
|
+
* The billing account's VAT identification number at `acceptTime`;
|
|
159
|
+
* empty when it had none.
|
|
160
|
+
*/
|
|
161
|
+
vatId?: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** How the acceptance came about. */
|
|
165
|
+
export const LegalAcceptance_Method = {
|
|
166
|
+
/** Not used. */
|
|
167
|
+
METHOD_UNSPECIFIED: "METHOD_UNSPECIFIED",
|
|
168
|
+
/** When the organization or the billing account was created. */
|
|
169
|
+
SIGNUP: "SIGNUP",
|
|
170
|
+
/** A changed version of a document the account had accepted before. */
|
|
171
|
+
CHANGE: "CHANGE",
|
|
172
|
+
/**
|
|
173
|
+
* The first version of a document, by an account that existed before
|
|
174
|
+
* the document was published.
|
|
175
|
+
*/
|
|
176
|
+
MIGRATION: "MIGRATION",
|
|
177
|
+
} as const;
|
|
178
|
+
|
|
179
|
+
/** How the acceptance came about. */
|
|
180
|
+
export type LegalAcceptance_Method = (typeof LegalAcceptance_Method)[keyof typeof LegalAcceptance_Method];
|
|
181
|
+
|
|
182
|
+
/** A legal document version a billing account has yet to accept. */
|
|
183
|
+
export interface LegalRequirement {
|
|
184
|
+
/** The version, `legalDocuments/{legal_document}/versions/{version}`. */
|
|
185
|
+
legalDocumentVersion?: string;
|
|
186
|
+
/** The version's title, such as `Terms of Service`. */
|
|
187
|
+
displayName?: string;
|
|
188
|
+
/** The day the version takes effect. */
|
|
189
|
+
effectiveDate?: CalendarDate;
|
|
190
|
+
/** A plain-language summary of what changed. */
|
|
191
|
+
changeSummary?: string;
|
|
192
|
+
/** The version's `sha256`, to accept it by. */
|
|
193
|
+
sha256?: string;
|
|
194
|
+
/**
|
|
195
|
+
* In force already: until it is accepted, creating or growing billable
|
|
196
|
+
* resources charged to the account is refused.
|
|
197
|
+
*/
|
|
198
|
+
blocking?: boolean;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** A version to accept, with the text it was shown as. */
|
|
202
|
+
export interface LegalDocumentVersionToAccept {
|
|
203
|
+
/** The version, `legalDocuments/{legal_document}/versions/{version}`. */
|
|
204
|
+
legalDocumentVersion?: string;
|
|
205
|
+
/**
|
|
206
|
+
* The version's `sha256`, as read with it: an acceptance is refused when
|
|
207
|
+
* the text shown isn't the version's.
|
|
208
|
+
*/
|
|
209
|
+
sha256?: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** The request for ListLegalAcceptances. */
|
|
213
|
+
export interface ListLegalAcceptancesRequest {
|
|
214
|
+
/**
|
|
215
|
+
* The billing account,
|
|
216
|
+
* `organizations/{organization}/billingAccounts/{billing_account}`.
|
|
217
|
+
*/
|
|
218
|
+
parent?: string;
|
|
219
|
+
/**
|
|
220
|
+
* The most acceptances to return; the server clamps it, and 0 means its
|
|
221
|
+
* default.
|
|
222
|
+
*/
|
|
223
|
+
pageSize?: number;
|
|
224
|
+
/** A previous response's `nextPageToken`, for the page after it. */
|
|
225
|
+
pageToken?: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/** The response for ListLegalAcceptances and AcceptLegalDocuments. */
|
|
229
|
+
export interface ListLegalAcceptancesResponse {
|
|
230
|
+
/**
|
|
231
|
+
* The acceptances on this page; for AcceptLegalDocuments, one per version
|
|
232
|
+
* accepted, in the order requested.
|
|
233
|
+
*/
|
|
234
|
+
legalAcceptances?: LegalAcceptance[];
|
|
235
|
+
/** The token for the next page; empty on the last one. */
|
|
236
|
+
nextPageToken?: string;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/** The request for GetLegalAcceptance. */
|
|
240
|
+
export interface GetLegalAcceptanceRequest {
|
|
241
|
+
/** The acceptance to return. */
|
|
242
|
+
name?: string;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/** The request for AcceptLegalDocuments. */
|
|
246
|
+
export interface AcceptLegalDocumentsRequest {
|
|
247
|
+
/**
|
|
248
|
+
* The billing account that accepts,
|
|
249
|
+
* `organizations/{organization}/billingAccounts/{billing_account}`.
|
|
250
|
+
*/
|
|
251
|
+
name?: string;
|
|
252
|
+
/** The versions to accept. */
|
|
253
|
+
versions?: LegalDocumentVersionToAccept[];
|
|
254
|
+
/**
|
|
255
|
+
* That the caller acts as a business (§ 14 BGB) for the billing account's
|
|
256
|
+
* legal entity. Must be true.
|
|
257
|
+
*/
|
|
258
|
+
actsAsBusiness?: boolean;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/** The request for QueryLegalRequirements. */
|
|
262
|
+
export interface QueryLegalRequirementsRequest {
|
|
263
|
+
/**
|
|
264
|
+
* The billing account,
|
|
265
|
+
* `organizations/{organization}/billingAccounts/{billing_account}`.
|
|
266
|
+
*/
|
|
267
|
+
name?: string;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/** The response for QueryLegalRequirements. */
|
|
271
|
+
export interface QueryLegalRequirementsResponse {
|
|
272
|
+
/** The versions to accept, by document, then by the day they take effect. */
|
|
273
|
+
requirements?: LegalRequirement[];
|
|
274
|
+
}
|