class Bluedart::PincodeService
Public Class Methods
new(details)
click to toggle source
# File lib/bluedart/pincode_service.rb, line 3 def initialize(details) @pincode = details[:pincode] @profile = profile_hash({api_type: 'S', version: '1.3'}, details[:creds]) @mode = details[:mode] end
Public Instance Methods
request_url()
click to toggle source
# File lib/bluedart/pincode_service.rb, line 9 def request_url if @mode == 'prod' 'http://netconnect.bluedart.com/Ver1.8/ShippingAPI/Finder/ServiceFinderQuery.svc' else 'http://netconnect.bluedart.com/Ver1.8/Demo/ShippingAPI/Finder/ServiceFinderQuery.svc' end end
response()
click to toggle source
# File lib/bluedart/pincode_service.rb, line 17 def response wsa = 'http://tempuri.org/IServiceFinderQuery/GetServicesforPincode' opts = {message: 'GetServicesforPincode', wsa: wsa, params: {pinCode: @pincode}, extra: {'profile' => @profile}, url: request_url} make_request(opts) end