github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/docs/ContractApi.md (about) 1 # \ContractApi 2 3 All URIs are relative to *http://localhost* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**GetContract**](ContractApi.md#GetContract) | **Get** /v2/contracts/{contract_id} | 契約IDの契約情報を取得する 8 [**GetContractUser**](ContractApi.md#GetContractUser) | **Get** /v2/contracts/{contract_id}/users/{user_id} | 契約IDの契約情報を取得する 9 [**GetContractUsers**](ContractApi.md#GetContractUsers) | **Get** /v2/contracts/{contract_id}/users | 契約IDの契約情報を取得する 10 [**GetContracts**](ContractApi.md#GetContracts) | **Get** /v2/contracts | 契約一覧情報を取得する 11 12 13 14 ## GetContract 15 16 > Contract GetContract(ctx).Page(page).Limit(limit).Offset(offset).Execute() 17 18 契約IDの契約情報を取得する 19 20 21 22 ### Example 23 24 ```go 25 package main 26 27 import ( 28 "context" 29 "fmt" 30 "os" 31 openapiclient "./openapi" 32 ) 33 34 func main() { 35 page := "page_example" // string | (optional) 36 limit := int64(789) // int64 | ページネーションのうち、上位何件取得するか (optional) 37 offset := int64(789) // int64 | ページネーションのうち、何件読み飛ばすか (optional) 38 39 configuration := openapiclient.NewConfiguration() 40 api_client := openapiclient.NewAPIClient(configuration) 41 resp, r, err := api_client.ContractApi.GetContract(context.Background()).Page(page).Limit(limit).Offset(offset).Execute() 42 if err.Error() != "" { 43 fmt.Fprintf(os.Stderr, "Error when calling `ContractApi.GetContract``: %v\n", err) 44 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 45 } 46 // response from `GetContract`: Contract 47 fmt.Fprintf(os.Stdout, "Response from `ContractApi.GetContract`: %v\n", resp) 48 } 49 ``` 50 51 ### Path Parameters 52 53 54 55 ### Other Parameters 56 57 Other parameters are passed through a pointer to a apiGetContractRequest struct via the builder pattern 58 59 60 Name | Type | Description | Notes 61 ------------- | ------------- | ------------- | ------------- 62 **page** | **string** | | 63 **limit** | **int64** | ページネーションのうち、上位何件取得するか | 64 **offset** | **int64** | ページネーションのうち、何件読み飛ばすか | 65 66 ### Return type 67 68 [**Contract**](Contract.md) 69 70 ### Authorization 71 72 No authorization required 73 74 ### HTTP request headers 75 76 - **Content-Type**: Not defined 77 - **Accept**: application/json 78 79 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 80 [[Back to Model list]](../README.md#documentation-for-models) 81 [[Back to README]](../README.md) 82 83 84 ## GetContractUser 85 86 > ContractUser GetContractUser(ctx, contractId, userId).Execute() 87 88 契約IDの契約情報を取得する 89 90 91 92 ### Example 93 94 ```go 95 package main 96 97 import ( 98 "context" 99 "fmt" 100 "os" 101 openapiclient "./openapi" 102 ) 103 104 func main() { 105 contractId := "contractId_example" // string | 106 userId := "userId_example" // string | 107 108 configuration := openapiclient.NewConfiguration() 109 api_client := openapiclient.NewAPIClient(configuration) 110 resp, r, err := api_client.ContractApi.GetContractUser(context.Background(), contractId, userId).Execute() 111 if err.Error() != "" { 112 fmt.Fprintf(os.Stderr, "Error when calling `ContractApi.GetContractUser``: %v\n", err) 113 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 114 } 115 // response from `GetContractUser`: ContractUser 116 fmt.Fprintf(os.Stdout, "Response from `ContractApi.GetContractUser`: %v\n", resp) 117 } 118 ``` 119 120 ### Path Parameters 121 122 123 Name | Type | Description | Notes 124 ------------- | ------------- | ------------- | ------------- 125 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 126 **contractId** | **string** | | 127 **userId** | **string** | | 128 129 ### Other Parameters 130 131 Other parameters are passed through a pointer to a apiGetContractUserRequest struct via the builder pattern 132 133 134 Name | Type | Description | Notes 135 ------------- | ------------- | ------------- | ------------- 136 137 138 139 ### Return type 140 141 [**ContractUser**](ContractUser.md) 142 143 ### Authorization 144 145 No authorization required 146 147 ### HTTP request headers 148 149 - **Content-Type**: Not defined 150 - **Accept**: application/json 151 152 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 153 [[Back to Model list]](../README.md#documentation-for-models) 154 [[Back to README]](../README.md) 155 156 157 ## GetContractUsers 158 159 > MultipleContractUser GetContractUsers(ctx, contractId).Execute() 160 161 契約IDの契約情報を取得する 162 163 164 165 ### Example 166 167 ```go 168 package main 169 170 import ( 171 "context" 172 "fmt" 173 "os" 174 openapiclient "./openapi" 175 ) 176 177 func main() { 178 contractId := "contractId_example" // string | 179 180 configuration := openapiclient.NewConfiguration() 181 api_client := openapiclient.NewAPIClient(configuration) 182 resp, r, err := api_client.ContractApi.GetContractUsers(context.Background(), contractId).Execute() 183 if err.Error() != "" { 184 fmt.Fprintf(os.Stderr, "Error when calling `ContractApi.GetContractUsers``: %v\n", err) 185 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 186 } 187 // response from `GetContractUsers`: MultipleContractUser 188 fmt.Fprintf(os.Stdout, "Response from `ContractApi.GetContractUsers`: %v\n", resp) 189 } 190 ``` 191 192 ### Path Parameters 193 194 195 Name | Type | Description | Notes 196 ------------- | ------------- | ------------- | ------------- 197 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 198 **contractId** | **string** | | 199 200 ### Other Parameters 201 202 Other parameters are passed through a pointer to a apiGetContractUsersRequest struct via the builder pattern 203 204 205 Name | Type | Description | Notes 206 ------------- | ------------- | ------------- | ------------- 207 208 209 ### Return type 210 211 [**MultipleContractUser**](MultipleContractUser.md) 212 213 ### Authorization 214 215 No authorization required 216 217 ### HTTP request headers 218 219 - **Content-Type**: Not defined 220 - **Accept**: application/json 221 222 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 223 [[Back to Model list]](../README.md#documentation-for-models) 224 [[Back to README]](../README.md) 225 226 227 ## GetContracts 228 229 > MultipleContract GetContracts(ctx).Page(page).Limit(limit).Offset(offset).Execute() 230 231 契約一覧情報を取得する 232 233 234 235 ### Example 236 237 ```go 238 package main 239 240 import ( 241 "context" 242 "fmt" 243 "os" 244 openapiclient "./openapi" 245 ) 246 247 func main() { 248 page := "page_example" // string | (optional) 249 limit := int64(789) // int64 | ページネーションのうち、上位何件取得するか (optional) 250 offset := int64(789) // int64 | ページネーションのうち、何件読み飛ばすか (optional) 251 252 configuration := openapiclient.NewConfiguration() 253 api_client := openapiclient.NewAPIClient(configuration) 254 resp, r, err := api_client.ContractApi.GetContracts(context.Background()).Page(page).Limit(limit).Offset(offset).Execute() 255 if err.Error() != "" { 256 fmt.Fprintf(os.Stderr, "Error when calling `ContractApi.GetContracts``: %v\n", err) 257 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 258 } 259 // response from `GetContracts`: MultipleContract 260 fmt.Fprintf(os.Stdout, "Response from `ContractApi.GetContracts`: %v\n", resp) 261 } 262 ``` 263 264 ### Path Parameters 265 266 267 268 ### Other Parameters 269 270 Other parameters are passed through a pointer to a apiGetContractsRequest struct via the builder pattern 271 272 273 Name | Type | Description | Notes 274 ------------- | ------------- | ------------- | ------------- 275 **page** | **string** | | 276 **limit** | **int64** | ページネーションのうち、上位何件取得するか | 277 **offset** | **int64** | ページネーションのうち、何件読み飛ばすか | 278 279 ### Return type 280 281 [**MultipleContract**](MultipleContract.md) 282 283 ### Authorization 284 285 No authorization required 286 287 ### HTTP request headers 288 289 - **Content-Type**: Not defined 290 - **Accept**: application/json 291 292 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 293 [[Back to Model list]](../README.md#documentation-for-models) 294 [[Back to README]](../README.md) 295