Module: ClickAndSend::Request

Included in:
CheckServices, CreateItems, DeleteItems, ItemSummary, ManifestItems, PrintItem, PrintManifest
Defined in:
lib/click_and_send/request.rb,
lib/click_and_send/request/print_item.rb,
lib/click_and_send/request/create_items.rb,
lib/click_and_send/request/delete_items.rb,
lib/click_and_send/request/item_summary.rb,
lib/click_and_send/request/check_services.rb,
lib/click_and_send/request/manifest_items.rb,
lib/click_and_send/request/print_manifest.rb

Defined Under Namespace

Classes: CheckServices, CreateItems, DeleteItems, ItemSummary, ManifestItems, PrintItem, PrintManifest

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data.



6
7
8
# File 'lib/click_and_send/request.rb', line 6

def data
  @data
end

Instance Method Details

#initialize(data = {}) ⇒ Object



8
9
10
# File 'lib/click_and_send/request.rb', line 8

def initialize(data = {})
  self.data = data
end

#resultObject



12
13
14
15
16
17
18
19
# File 'lib/click_and_send/request.rb', line 12

def result
  raise_on_error
  if key(:result)
    response.fetch(key(:result))
  else
    response
  end
end