class ShipDelightApi::ShipDelight

Public Class Methods

create_ship_delight(url, cust_shipment_details) click to toggle source
# File lib/ship_delight_api.rb, line 7
def self.create_ship_delight(url, cust_shipment_details)
    response = HTTParty.post(url, body: cust_shipment_details)
    result = JSON.parse(response)
end
track_ship_delight(awb_number) click to toggle source
# File lib/ship_delight_api.rb, line 12
def self.track_ship_delight(awb_number)
    url = "http://crm.shipdelight.com/index.php/api/example/trackAwb?awb=#{awb_number}&btn1=&format=json"
    response = HTTParty.get(url)
    result = JSON.parse(response)
end