Class: PostNordAPI::ShipmentResource
Instance Attribute Summary
Attributes inherited from BaseResource
#client
Instance Method Summary
collapse
#initialize
Instance Method Details
#create_return_label(params) ⇒ Object
5
6
7
8
|
# File 'lib/post_nord_api/resources/shipment_resource.rb', line 5
def create_return_label(params)
response = post_request('shipment/v3/returns/edi/labels/pdf', body: parse_params(params))
Booking.new(response.body)
end
|
#track(tracking_number, locale: 'en') ⇒ Object
10
11
12
13
|
# File 'lib/post_nord_api/resources/shipment_resource.rb', line 10
def track(tracking_number, locale: 'en')
response = get_request("shipment/v5/trackandtrace/findByIdentifier.json?id=#{tracking_number}&locale=#{locale}")
Tracking.new(response.body)
end
|