(self, args, **kwargs)
| 154 | |
| 155 | @resource.add_auth_token_to_kwargs_from_cli |
| 156 | def run(self, args, **kwargs): |
| 157 | instance = Inquiry() |
| 158 | instance.id = args.id |
| 159 | inquiry = self.get_resource_by_id(id=args.id, **kwargs) |
| 160 | if args.response: |
| 161 | instance.response = json.loads(args.response) |
| 162 | else: |
| 163 | response = InteractiveForm( |
| 164 | inquiry.schema.get("properties") |
| 165 | ).initiate_dialog() |
| 166 | instance.response = response |
| 167 | |
| 168 | return self.manager.respond( |
| 169 | inquiry_id=instance.id, inquiry_response=instance.response, **kwargs |
| 170 | ) |
| 171 | |
| 172 | def run_and_print(self, args, **kwargs): |
| 173 | instance = self.run(args, **kwargs) |
no test coverage detected