Class: Bambora::Bank::BatchReportResource
- Inherits:
-
Object
- Object
- Bambora::Bank::BatchReportResource
- Includes:
- BatchReportMessages
- Defined in:
- lib/bambora/bank/batch_report_resource.rb
Overview
For making requests to the /scripts/reporting/report.aspx endpoint
Constant Summary collapse
- DEFAULT_REQUEST_PARAMS =
{ rpt_format: 'JSON', rpt_version: '2.0', session_source: 'external', }.freeze
Constants included from BatchReportMessages
Bambora::Bank::BatchReportMessages::MESSAGES
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#sub_path ⇒ Object
readonly
Returns the value of attribute sub_path.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(client:, api_key:) ⇒ BatchReportResource
constructor
Instantiate an interface to make requests against Bambora’s Profiles API.
-
#show(report_data) ⇒ Object
Create a Bank Payment Profile.
Constructor Details
#initialize(client:, api_key:) ⇒ BatchReportResource
Instantiate an interface to make requests against Bambora’s Profiles API.
33 34 35 36 37 |
# File 'lib/bambora/bank/batch_report_resource.rb', line 33 def initialize(client:, api_key:) @client = client @api_key = api_key @sub_path = '/scripts/reporting/report.aspx' end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
18 19 20 |
# File 'lib/bambora/bank/batch_report_resource.rb', line 18 def api_key @api_key end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
18 19 20 |
# File 'lib/bambora/bank/batch_report_resource.rb', line 18 def client @client end |
#sub_path ⇒ Object (readonly)
Returns the value of attribute sub_path.
18 19 20 |
# File 'lib/bambora/bank/batch_report_resource.rb', line 18 def sub_path @sub_path end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
18 19 20 |
# File 'lib/bambora/bank/batch_report_resource.rb', line 18 def version @version end |
Instance Method Details
#show(report_data) ⇒ Object
Create a Bank Payment Profile
payment_profile_resource.show(data)
@params profile_data [Hash] with values as noted in the example.
55 56 57 58 59 60 |
# File 'lib/bambora/bank/batch_report_resource.rb', line 55 def show(report_data) response = client.post(path: sub_path, body: batch_report_body(report_data)) response = ensure_record_key_exists(response) (response) end |