利用規約を更新

put
https://api.box.com/2.0
/terms_of_services/:terms_of_service_id/

特定の利用規約を更新します。

Request

Bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
324234

利用規約のID。

Request Body

stringin bodyrequired
enabled

この利用規約がアクティブであるかどうか。

Value is one of enabled,disabled

stringin bodyrequired
By collaborating on this file you are accepting...

ユーザーに対して表示される利用規約テキスト。

statusdisabledに設定されている場合は、テキストを空に設定できます。

Response

更新された利用規約オブジェクトを返します。

予期しないクライアントエラー。

put
利用規約を更新
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X PUT "https://api.box.com/2.0/terms_of_services/324234" \
     -H "Authorization: Bearer <ACCESS_TOKEN>" \
     -H "Content-Type: application/json" \
     -d '{
       "status": "enabled",
       "text": "By collaborating on this file you are accepting..."
     }'
.NET
var updates = new BoxTermsOfServicesRequest()
{
    Status = "disabled",
    Text = "Updated Text"
};
BoxTermsOfService updatedToS = client.TermsOfServiceManager
    .UpdateTermsOfServicesAsync("11111", updates);
Java
BoxTermsOfService termsOfService = new BoxTermsOfService(api, "tos-id");
BoxTermsOfService.Info termsOfServiceInfo = termsOfService.new Info();
termsOfServiceInfo.setStatus(BoxTermsOfService.TermsOfServiceStatus.DISABLED);
termsOfServiceInfo.setText("New Terms of Service Text");
termsOfService.updateInfo(termsOfService);
Python
update_object = {'text': 'New Text'}
updated_tos = client.terms_of_service(tos_id='12345').update_info(update_object)
print('The updated message for your custom terms of service is {0} with ID {1}'.format(updated_tos.text, updated_tos.id))
Node
client.termsOfService.update('12345', { status: 'disabled' })
	.then(tos => {
		/* tos -> {
			type: 'terms_of_service',
			id: '12345',
			status: 'disabled',
			enterprise: { type: 'enterprise', id: '55555' },
			tos_type: 'managed',
			text: 'By using this service, you agree to ...',
			created_at: '2018-04-19T13:55:09-07:00',
			modified_at: '2018-04-19T13:55:09-07:00' }
		*/
	});
iOS
client.termsOfService.update(
    tosId: "12345",
    text: "Updated Text String",
    status: TermsOfServiceStatus.enabled
) { (result: Result<TermsOfService, BoxSDKError>) in
    guard calse let .success(termsOfService) = result else {
        print("Error updating terms of service")
        return
    }
    print("Terms of Service with id: \(termsOfService.id) was updated with text: \(termsOfService.text)")
}

Response Example

{
  "type": "error",
  "code": "item_name_invalid",
  "help_url": "http://developers.box.com/docs/#errors",
  "message": "Method Not Allowed",
  "request_id": "abcdef123456",
  "status": 400
}