Class: PaymentHighway::BatchReport
- Inherits:
-
Object
- Object
- PaymentHighway::BatchReport
- Defined in:
- lib/payment_highway/batch_report.rb
Instance Attribute Summary collapse
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#response_id ⇒ Object
readonly
Returns the value of attribute response_id.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#settlements ⇒ Object
readonly
Returns the value of attribute settlements.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(config:, date:) ⇒ BatchReport
constructor
A new instance of BatchReport.
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_id ⇒ Object (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_id ⇒ Object (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 |
#result ⇒ Object (readonly)
Returns the value of attribute result.
3 4 5 |
# File 'lib/payment_highway/batch_report.rb', line 3 def result @result end |
#settlements ⇒ Object (readonly)
Returns the value of attribute settlements.
3 4 5 |
# File 'lib/payment_highway/batch_report.rb', line 3 def settlements @settlements end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/payment_highway/batch_report.rb', line 3 def url @url end |