Class: Shipwire::Receivings

Inherits:
Api
  • Object
show all
Defined in:
lib/shipwire/receivings.rb

Instance Method Summary collapse

Methods inherited from Api

#request

Instance Method Details

#cancel(id) ⇒ Object



19
20
21
# File 'lib/shipwire/receivings.rb', line 19

def cancel(id)
  request(:post, "receivings/#{id}/cancel")
end

#create(body) ⇒ Object



7
8
9
# File 'lib/shipwire/receivings.rb', line 7

def create(body)
  request(:post, 'receivings', body: body)
end

#find(id, params = {}) ⇒ Object



11
12
13
# File 'lib/shipwire/receivings.rb', line 11

def find(id, params = {})
  request(:get, "receivings/#{id}", params: params)
end

#holds(id, params = {}) ⇒ Object



28
29
30
# File 'lib/shipwire/receivings.rb', line 28

def holds(id, params = {})
  request(:get, "receivings/#{id}/holds", params: params)
end

#instructions_recipients(id) ⇒ Object Also known as: instructions, recipients



32
33
34
# File 'lib/shipwire/receivings.rb', line 32

def instructions_recipients(id)
  request(:get, "receivings/#{id}/instructionsRecipients")
end

#items(id) ⇒ Object



38
39
40
# File 'lib/shipwire/receivings.rb', line 38

def items(id)
  request(:get, "receivings/#{id}/items")
end

#labels_cancel(id) ⇒ Object Also known as: label_cancel



23
24
25
# File 'lib/shipwire/receivings.rb', line 23

def labels_cancel(id)
  request(:post, "receivings/#{id}/labels/cancel")
end

#list(params = {}) ⇒ Object



3
4
5
# File 'lib/shipwire/receivings.rb', line 3

def list(params = {})
  request(:get, 'receivings', params: params)
end

#shipments(id) ⇒ Object



42
43
44
# File 'lib/shipwire/receivings.rb', line 42

def shipments(id)
  request(:get, "receivings/#{id}/shipments")
end

#trackings(id) ⇒ Object



46
47
48
# File 'lib/shipwire/receivings.rb', line 46

def trackings(id)
  request(:get, "receivings/#{id}/trackings")
end

#update(id, body, params = {}) ⇒ Object



15
16
17
# File 'lib/shipwire/receivings.rb', line 15

def update(id, body, params = {})
  request(:put, "receivings/#{id}", body: body, params: params)
end