Class: MerchantESolutions::Report

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Report

Returns a new instance of Report.



7
8
9
10
11
# File 'lib/merchant_e_solutions/report.rb', line 7

def initialize(params = {})
  self.options = parse_params(params)
  @request = Request.new(request_params)
  parse_records(request.body)
end

Instance Attribute Details

#recordsObject (readonly)

Returns the value of attribute records.



5
6
7
# File 'lib/merchant_e_solutions/report.rb', line 5

def records
  @records
end

#requestObject (readonly)

Returns the value of attribute request.



5
6
7
# File 'lib/merchant_e_solutions/report.rb', line 5

def request
  @request
end

Instance Method Details

#report_specific_paramsObject



23
24
25
# File 'lib/merchant_e_solutions/report.rb', line 23

def report_specific_params
  options
end

#request_paramsObject



13
14
15
16
17
18
19
20
21
# File 'lib/merchant_e_solutions/report.rb', line 13

def request_params
  {
    dsReportId: report_id,
    reportType: report_type,
    includeTridentTranId: true,
    includePurchaseId: true,
    includeClientRefNum: true
  }.merge(report_specific_params)
end