module CityboxApi
Constants
- INVALID_CREDENTIALS
Credentials for API
- VERSION
Attributes
configuration[RW]
Public Class Methods
catch_error(error)
click to toggle source
# File lib/citybox_api.rb, line 18 def self.catch_error error puts error json_response = Crack::XML.parse(error.response) fault_code = json_response["soap:Envelope"]["soap:Body"]["soap:Fault"]["faultcode"] fault_string = json_response["soap:Envelope"]["soap:Body"]["soap:Fault"]["faultstring"] fault = {faultCode: fault_code, fault_string: fault_string} puts fault return nil end
check_params(params, opts)
click to toggle source
# File lib/citybox_api.rb, line 28 def self.check_params params, opts params.each{|p| raise "#{p} can't be blank" unless opts[p]} end
configure() { |configuration| ... }
click to toggle source
# File lib/citybox_api/configuration.rb, line 15 def self.configure self.configuration ||= Configuration.new yield(configuration) if block_given? end