Class: PXMyPortal::PayslipList
- Inherits:
-
Object
- Object
- PXMyPortal::PayslipList
- Defined in:
- lib/pxmyportal/payslip_list.rb
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(path:, logger:, http:) ⇒ PayslipList
constructor
A new instance of PayslipList.
Constructor Details
#initialize(path:, logger:, http:) ⇒ PayslipList
Returns a new instance of PayslipList.
19 20 21 22 23 24 25 |
# File 'lib/pxmyportal/payslip_list.rb', line 19 def initialize(path:, logger:, http:) @path = path @logger = logger @http = http @request = Net::HTTP::Get.new(@path) end |
Instance Method Details
#get ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/pxmyportal/payslip_list.rb', line 27 def get @logger.debug("request") { @request } @http.(@request) response = @http.request(@request) @logger.debug("response") { response } response => Net::HTTPOK response.body end |