Class: FlexOps::Resources::DhlCarrier

Inherits:
Object
  • Object
show all
Defined in:
lib/flexops/resources/carriers.rb

Constant Summary collapse

PROXY =
"/api/ApiProxy"

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ DhlCarrier

Returns a new instance of DhlCarrier.



107
108
109
# File 'lib/flexops/resources/carriers.rb', line 107

def initialize(http)
  @http = http
end

Instance Method Details

#calculate_landed_cost(body) ⇒ Object



121
# File 'lib/flexops/resources/carriers.rb', line 121

def calculate_landed_cost(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postDhlCalculateLandedCost", body: body)

#cancel_pickupObject



120
# File 'lib/flexops/resources/carriers.rb', line 120

def cancel_pickup = @http.delete("#{PROXY}/api/v2/ShippingLabel/deleteDhlPickup")

#create_pickup(body) ⇒ Object



118
# File 'lib/flexops/resources/carriers.rb', line 118

def create_pickup(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postDhlCreatePickup", body: body)

#create_shipment(body) ⇒ Object



115
# File 'lib/flexops/resources/carriers.rb', line 115

def create_shipment(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postDhlCreateShipment", body: body)

#find_service_points(params) ⇒ Object



126
# File 'lib/flexops/resources/carriers.rb', line 126

def find_service_points(params) = @http.get("#{PROXY}/api/v2/ShippingLabel/getDhlServicePoints", query: params)

#get_multi_piece_rates(body) ⇒ Object



113
# File 'lib/flexops/resources/carriers.rb', line 113

def get_multi_piece_rates(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postDhlMultiPieceRates", body: body)

#get_products(params) ⇒ Object



114
# File 'lib/flexops/resources/carriers.rb', line 114

def get_products(params) = @http.get("#{PROXY}/api/v2/ShippingLabel/getDhlProducts", query: params)

#get_proof_of_delivery(params) ⇒ Object



124
# File 'lib/flexops/resources/carriers.rb', line 124

def get_proof_of_delivery(params) = @http.get("#{PROXY}/api/v2/ShippingLabel/getDhlElectronicProofOfDelivery", query: params)

#get_rates(params) ⇒ Object



112
# File 'lib/flexops/resources/carriers.rb', line 112

def get_rates(params) = @http.get("#{PROXY}/api/v2/ShippingLabel/getDhlRates", query: params)

#get_reference_data(params) ⇒ Object



125
# File 'lib/flexops/resources/carriers.rb', line 125

def get_reference_data(params) = @http.get("#{PROXY}/api/v2/ShippingLabel/getDhlReferenceData", query: params)

#screen_shipment(body) ⇒ Object



122
# File 'lib/flexops/resources/carriers.rb', line 122

def screen_shipment(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postDhlScreenShipment", body: body)

#track(params) ⇒ Object



116
# File 'lib/flexops/resources/carriers.rb', line 116

def track(params) = @http.get("#{PROXY}/api/v2/ShippingLabel/getDhlTrackSingleShipment", query: params)

#track_multiple(params) ⇒ Object



117
# File 'lib/flexops/resources/carriers.rb', line 117

def track_multiple(params) = @http.get("#{PROXY}/api/v2/ShippingLabel/getDhlTrackMultipleShipments", query: params)

#update_pickup(body) ⇒ Object



119
# File 'lib/flexops/resources/carriers.rb', line 119

def update_pickup(body) = @http.patch("#{PROXY}/api/v2/ShippingLabel/patchDhlUpdatePickup", body: body)

#upload_invoice(body) ⇒ Object



123
# File 'lib/flexops/resources/carriers.rb', line 123

def upload_invoice(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postDhlUploadInvoice", body: body)

#validate_address(params) ⇒ Object



111
# File 'lib/flexops/resources/carriers.rb', line 111

def validate_address(params) = @http.get("#{PROXY}/api/v2/ShippingLabel/getDhlValidateAddress", query: params)