Sha256: 7ecbff52143129805f2f7973b791dafc8d163dee5b6f0dc72f645a938a3181cd

Contents?: true

Size: 1.09 KB

Versions: 49

Compression:

Stored size: 1.09 KB

Contents

<%

api_title = "Negative Case - 3 - should respond with proper errors if T&C is not accepted"

api_input = <<-eos
Example:

POST #{request.base_url}/api/v1/accept_tac

In the request body, pass the following as raw json:
{
  "terms_and_conditions": 0,
  "uuid": "<VERIFIED UUID>",
  "mobile_number": "<VERIFIED MOBILE NUMBER>",
  "dialing_prefix": "+91"
}
eos

api_output = <<-eos
{
  "success": false,
  "errors": {
      "heading": "You have not accepted the Terms & Conditions. Registration is complete only if you accept the T&C",
      "message": "Accept the T&C to finish the Registration. Pass true",
      "details": {
        "terms_and_conditions": "must be true"
      }
  }
}
eos

%>

<%= render partial: "kuppayam/api/docs/example", locals: {
                                        negative_case: true,
                                        example_id: "neg_case_3",
                                        api_title: api_title,
                                        api_input: api_input,
                                        api_output: api_output 
                                      } %>

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
usman-0.4.10.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.4.9.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.4.8.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.4.7.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.4.6.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.4.5.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.4.4.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.4.3.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.4.2.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.4.1.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.4.0.pre.materialize app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.3.38 app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.3.37 app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.3.36 app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.3.35 app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.3.34 app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.3.33 app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.3.32 app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.3.31 app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
usman-0.3.30 app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb