class Trackerific::Builders::FedEx

Protected Instance Methods

build() click to toggle source

Builds the FedEx track request XML @api private

# File lib/trackerific/builders/fedex.rb, line 8
def build
  root_nodes.inject({}) { |r, k| r[k] = send(k); r }
end

Private Instance Methods

client_detail() click to toggle source

Descriptive data identifying the client submitting the transaction @api private

# File lib/trackerific/builders/fedex.rb, line 30
def client_detail
  { account_number: account_number, meter_number: meter_number }
end
package_identifier() click to toggle source

The type and value of the package identifier that is to be used to retrieve the tracking information for a package or group of packages @api private

# File lib/trackerific/builders/fedex.rb, line 59
def package_identifier
  { type: 'TRACKING_NUMBER_OR_DOORTAG', value: package_id }
end
processing_options() click to toggle source

Include detailed scan results @api private

# File lib/trackerific/builders/fedex.rb, line 65
def processing_options
  'INCLUDE_DETAILED_SCANS'
end
root_nodes() click to toggle source

Array of XML root nodes @api private

# File lib/trackerific/builders/fedex.rb, line 16
def root_nodes
  [ :web_authentication_detail, :client_detail, :transaction_detail,
    :version, :selection_details, :processing_options ]
end
selection_details() click to toggle source

Specifies the details needed to select the shipment being requested to be tracked @api private

# File lib/trackerific/builders/fedex.rb, line 52
def selection_details
  { carrier_code: 'FDXE', package_identifier: package_identifier }
end
transaction_detail() click to toggle source

Contains a free form field that is echoed back in the reply to match requests with replies and data that governs the data payload language/translations @api private

# File lib/trackerific/builders/fedex.rb, line 38
def transaction_detail
  { customer_transaction_id: "Trackerific" }
end
version() click to toggle source

The version of the FedEx API being used @api private

# File lib/trackerific/builders/fedex.rb, line 45
def version
  { service_id: 'trck', major: '12', intermediate: '0', minor: '0' }
end
web_authentication_detail() click to toggle source

Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services) @api private

# File lib/trackerific/builders/fedex.rb, line 24
def web_authentication_detail
  { user_credential: { key: key, password: password } }
end