Class: PaymentHighway::BatchReport

Inherits:
Object
  • Object
show all
Defined in:
lib/payment_highway/batch_report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config:, date:) ⇒ BatchReport

Returns a new instance of BatchReport.



4
5
6
7
8
9
10
11
# File 'lib/payment_highway/batch_report.rb', line 4

def initialize(config:, date:)
  response, result = Api.new(config: config).get_batch(date: date)
  @settlements = result['settlements']
  @result = result['result']
  @url = response.env.url.to_s
  @request_id = response.env.response_headers['sph-request-id']
  @response_id = response.env.response_headers['sph-response-id']
end

Instance Attribute Details

#request_idObject (readonly)

Returns the value of attribute request_id.



3
4
5
# File 'lib/payment_highway/batch_report.rb', line 3

def request_id
  @request_id
end

#response_idObject (readonly)

Returns the value of attribute response_id.



3
4
5
# File 'lib/payment_highway/batch_report.rb', line 3

def response_id
  @response_id
end

#resultObject (readonly)

Returns the value of attribute result.



3
4
5
# File 'lib/payment_highway/batch_report.rb', line 3

def result
  @result
end

#settlementsObject (readonly)

Returns the value of attribute settlements.



3
4
5
# File 'lib/payment_highway/batch_report.rb', line 3

def settlements
  @settlements
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/payment_highway/batch_report.rb', line 3

def url
  @url
end