Class: MockServer::VerifyApi

Inherits:
Object
  • Object
show all
Defined in:
lib/mockserver-client/api/verify_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ VerifyApi

Returns a new instance of VerifyApi.



19
20
21
# File 'lib/mockserver-client/api/verify_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/mockserver-client/api/verify_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#verify_put(verification, opts = {}) ⇒ nil

verify a request has been received a specific number of times

Parameters:

  • verification

    request matcher and the number of times to match

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


26
27
28
29
# File 'lib/mockserver-client/api/verify_api.rb', line 26

def verify_put(verification, opts = {})
  verify_put_with_http_info(verification, opts)
  nil
end

#verify_put_with_http_info(verification, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

verify a request has been received a specific number of times

Parameters:

  • verification

    request matcher and the number of times to match

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/mockserver-client/api/verify_api.rb', line 35

def verify_put_with_http_info(verification, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VerifyApi.verify_put ...'
  end
  # verify the required parameter 'verification' is set
  if @api_client.config.client_side_validation && verification.nil?
    fail ArgumentError, "Missing the required parameter 'verification' when calling VerifyApi.verify_put"
  end
  # resource path
  local_var_path = 'mockserver/verify'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(verification)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VerifyApi#verify_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#verify_sequence_put(verification_sequence, opts = {}) ⇒ nil

verify a sequence of request has been received in the specific order

Parameters:

  • verification_sequence

    the sequence of requests matchers

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


78
79
80
81
# File 'lib/mockserver-client/api/verify_api.rb', line 78

def verify_sequence_put(verification_sequence, opts = {})
  verify_sequence_put_with_http_info(verification_sequence, opts)
  nil
end

#verify_sequence_put_with_http_info(verification_sequence, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

verify a sequence of request has been received in the specific order

Parameters:

  • verification_sequence

    the sequence of requests matchers

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/mockserver-client/api/verify_api.rb', line 87

def verify_sequence_put_with_http_info(verification_sequence, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VerifyApi.verify_sequence_put ...'
  end
  # verify the required parameter 'verification_sequence' is set
  if @api_client.config.client_side_validation && verification_sequence.nil?
    fail ArgumentError, "Missing the required parameter 'verification_sequence' when calling VerifyApi.verify_sequence_put"
  end
  # resource path
  local_var_path = 'mockserver/verifySequence'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(verification_sequence)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VerifyApi#verify_sequence_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end