Class: ElephantDrive::BaseService

Inherits:
Object
  • Object
show all
Includes:
MessageBuilder, ResponseBuilder
Defined in:
lib/elephant-drive-service/base_service.rb

Direct Known Subclasses

ProvisioningService, ReportService

Instance Method Summary collapse

Methods included from ResponseBuilder

#generate_add_customer_response, #generate_average_usage_report_response, #generate_usage_statistics

Methods included from MessageBuilder

#add_customer_message, #base_user_message, #check_username_availability_message, #customer_list_message, #deactivate_customer_message, #get_customer_list_by_reg_date_message, #modify_subscription_message, #reactivate_customer_message, #reset_password_message, #search_customer_message

Constructor Details

#initialize(custom_config = nil) ⇒ BaseService

Returns a new instance of BaseService.



8
9
10
11
12
13
# File 'lib/elephant-drive-service/base_service.rb', line 8

def initialize custom_config=nil
  @config = custom_config ? custom_config : ElephantDrive::ServiceConfig.new(ElephantDriveService.ws_config)
  full_config = @config.to_hash
  full_config = full_config.merge(proxy: ENV['http_proxy']) if ENV && ENV['http_proxy']
  @client = Savon.client(full_config)
end