class Tracksale::DummyClient
Attributes
response[RW]
Public Class Methods
new()
click to toggle source
# File lib/tracksale/dummy_client.rb, line 7 def initialize puts 'running tracksale dummy client, do not expect real responses.' if $DEBUG end
Public Instance Methods
default_response_object()
click to toggle source
# File lib/tracksale/dummy_client.rb, line 21 def default_response_object response = {} def response.success? true end response end
get(_endpoint_path, _extra_headers = {})
click to toggle source
maintaining the same method signature as the real client
# File lib/tracksale/dummy_client.rb, line 12 def get(_endpoint_path, _extra_headers = {}) response end
post(_endpoint_path, _body, _extra_headers = {})
click to toggle source
maintaining the same method signature as the real client
# File lib/tracksale/dummy_client.rb, line 17 def post(_endpoint_path, _body, _extra_headers = {}) response end
response()
click to toggle source
# File lib/tracksale/dummy_client.rb, line 31 def response # definies a default valid response unless explicity defined. self.class.response || default_response_object end