Class: IletiMerkezi::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/ileti_merkezi/report.rb

Overview

Report

Constant Summary collapse

PATH =
'/get-report'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(order_id, page: 1, row_count: 1000) ⇒ Report

Returns a new instance of Report.



10
11
12
13
14
# File 'lib/ileti_merkezi/report.rb', line 10

def initialize(order_id, page: 1, row_count: 1000)
  @order_id  = order_id
  @page      = page
  @row_count = row_count
end

Instance Attribute Details

#order_idObject (readonly)

Returns the value of attribute order_id.



8
9
10
# File 'lib/ileti_merkezi/report.rb', line 8

def order_id
  @order_id
end

#pageObject (readonly)

Returns the value of attribute page.



8
9
10
# File 'lib/ileti_merkezi/report.rb', line 8

def page
  @page
end

#row_countObject (readonly)

Returns the value of attribute row_count.



8
9
10
# File 'lib/ileti_merkezi/report.rb', line 8

def row_count
  @row_count
end

Instance Method Details

#queryObject



16
17
18
19
# File 'lib/ileti_merkezi/report.rb', line 16

def query
  request = Request.new(content: content, path: PATH)
  request.call
end