Class: MassPayRubySdk::AccountApi
- Inherits:
-
Object
- Object
- MassPayRubySdk::AccountApi
- Defined in:
- lib/masspay_ruby_sdk/api/account_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_account_balance(opts = {}) ⇒ Array<AvailableBalanceTxnResp>
Get current available balance This GET endpoint is used to retrieve the current available balance for the MassPay account.
-
#get_account_balance_with_http_info(opts = {}) ⇒ Array<(Array<AvailableBalanceTxnResp>, Integer, Hash)>
Get current available balance This GET endpoint is used to retrieve the current available balance for the MassPay account.
-
#get_account_statement(start_date, ending_date, opts = {}) ⇒ GetAccountStatement200Response
Get certified account statement This GET endpoint is used to retrieve a certified PDF ledger statement for a provided timeframe.
-
#get_account_statement_with_http_info(start_date, ending_date, opts = {}) ⇒ Array<(GetAccountStatement200Response, Integer, Hash)>
Get certified account statement This GET endpoint is used to retrieve a certified PDF ledger statement for a provided timeframe.
-
#initialize(api_client = ApiClient.default) ⇒ AccountApi
constructor
A new instance of AccountApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountApi
Returns a new instance of AccountApi.
18 19 20 |
# File 'lib/masspay_ruby_sdk/api/account_api.rb', line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/masspay_ruby_sdk/api/account_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#get_account_balance(opts = {}) ⇒ Array<AvailableBalanceTxnResp>
Get current available balance This GET endpoint is used to retrieve the current available balance for the MassPay account.
You can use this endpoint to obtain information about the current balance in your account.
There are no required parameters needed to access this endpoint.
The response will include a JSON objects containing details for the current available balance, including the token, balance and currency_code.
25 26 27 28 |
# File 'lib/masspay_ruby_sdk/api/account_api.rb', line 25 def get_account_balance(opts = {}) data, _status_code, _headers = get_account_balance_with_http_info(opts) data end |
#get_account_balance_with_http_info(opts = {}) ⇒ Array<(Array<AvailableBalanceTxnResp>, Integer, Hash)>
Get current available balance This GET endpoint is used to retrieve the current available balance for the MassPay account. <br> You can use this endpoint to obtain information about the current balance in your account. <br> There are no required parameters needed to access this endpoint. <br> The response will include a JSON objects containing details for the current available balance, including the token, balance and `currency_code`.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/masspay_ruby_sdk/api/account_api.rb', line 34 def get_account_balance_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.get_account_balance ...' end # resource path local_var_path = '/account/balance' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<AvailableBalanceTxnResp>' # auth_names auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME'] = opts.merge( :operation => :"AccountApi.get_account_balance", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#get_account_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_account_statement(start_date, ending_date, opts = {}) ⇒ GetAccountStatement200Response
Get certified account statement This GET endpoint is used to retrieve a certified PDF ledger statement for a provided timeframe.
You can use this endpoint to obtain a ledger statement for your MassPay account for a specific time period.
To use this endpoint, you need to provide the start_date and ending_date as required parameters in the Query string of the URL.
The response will include a certified PDF ledger statement containing transaction details for the specified timeframe.
84 85 86 87 |
# File 'lib/masspay_ruby_sdk/api/account_api.rb', line 84 def get_account_statement(start_date, ending_date, opts = {}) data, _status_code, _headers = get_account_statement_with_http_info(start_date, ending_date, opts) data end |
#get_account_statement_with_http_info(start_date, ending_date, opts = {}) ⇒ Array<(GetAccountStatement200Response, Integer, Hash)>
Get certified account statement This GET endpoint is used to retrieve a certified PDF ledger statement for a provided timeframe. <br> You can use this endpoint to obtain a ledger statement for your MassPay account for a specific time period. <br> To use this endpoint, you need to provide the `start_date` and `ending_date` as required parameters in the Query string of the URL. <br> The response will include a certified PDF ledger statement containing transaction details for the specified timeframe.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/masspay_ruby_sdk/api/account_api.rb', line 95 def get_account_statement_with_http_info(start_date, ending_date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.get_account_statement ...' end # verify the required parameter 'start_date' is set if @api_client.config.client_side_validation && start_date.nil? fail ArgumentError, "Missing the required parameter 'start_date' when calling AccountApi.get_account_statement" end # verify the required parameter 'ending_date' is set if @api_client.config.client_side_validation && ending_date.nil? fail ArgumentError, "Missing the required parameter 'ending_date' when calling AccountApi.get_account_statement" end # resource path local_var_path = '/account/statement' # query parameters query_params = opts[:query_params] || {} query_params[:'start_date'] = start_date query_params[:'ending_date'] = ending_date # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetAccountStatement200Response' # auth_names auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME'] = opts.merge( :operation => :"AccountApi.get_account_statement", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#get_account_statement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |