Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.21 KB

README.md

File metadata and controls

40 lines (26 loc) · 1.21 KB

Pickpoint API

Build Status Gem Version Coverage Status Code Climate

Description

This gem provides a basic Ruby wrapper over Pickpoint API.

Usage

require('pickpoint_api')

PickpointApi.session('login', 'password', test: true) do |s|
  postamats = s.postamat_list

  s.create_sending(@my_sending_hash)

  tracking_response = s.track_sending(@invoice_id_1)

  labels_response_pdf = s.make_label([@invoice_id_1, @invoice_id_2])

  reestr_response_pdf = s.make_reestr([@invoice_id_1, @invoice_id_2])

end

Alternatively, you can create a Session object explicitly:

require ('pickpoint_api')

session = PickpointApi::Session.new(test: true)
session.login('login', 'password')
tracking_response = session.track_sending(@invoice_id_1)
session.logout