Class: SyncteraRubySdk::InternalTransferApi
- Inherits:
-
Object
- Object
- SyncteraRubySdk::InternalTransferApi
- Defined in:
- lib/synctera_ruby_sdk/api/internal_transfer_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_internal_transfer(internal_transfer, opts = {}) ⇒ InternalTransferResponse
Create an internal transfer An internal transfer is an payment between two accounts within the same Fintech.
-
#create_internal_transfer_with_http_info(internal_transfer, opts = {}) ⇒ Array<(InternalTransferResponse, Integer, Hash)>
Create an internal transfer An internal transfer is an payment between two accounts within the same Fintech.
-
#get_internal_transfer_by_id(id, opts = {}) ⇒ InternalTransferResponse
Get an internal transfer Get an internal transfer auth by ID.
-
#get_internal_transfer_by_id_with_http_info(id, opts = {}) ⇒ Array<(InternalTransferResponse, Integer, Hash)>
Get an internal transfer Get an internal transfer auth by ID.
-
#initialize(api_client = ApiClient.default) ⇒ InternalTransferApi
constructor
A new instance of InternalTransferApi.
-
#update_internal_transfer_by_id(id, internal_transfer_patch, opts = {}) ⇒ InternalTransferResponse
Update an internal transfer Update an internal transfer.
-
#update_internal_transfer_by_id_with_http_info(id, internal_transfer_patch, opts = {}) ⇒ Array<(InternalTransferResponse, Integer, Hash)>
Update an internal transfer Update an internal transfer.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ InternalTransferApi
Returns a new instance of InternalTransferApi.
19 20 21 |
# File 'lib/synctera_ruby_sdk/api/internal_transfer_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/synctera_ruby_sdk/api/internal_transfer_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_internal_transfer(internal_transfer, opts = {}) ⇒ InternalTransferResponse
Create an internal transfer An internal transfer is an payment between two accounts within the same Fintech. By default, the payment is posted immediately. To indicate that you want to separate the authorization from the completion of the payment, use ‘capture_mode` = `MANUAL`. In that case, a separate call to update the status of the transfer will be required to complete the payment.
28 29 30 31 |
# File 'lib/synctera_ruby_sdk/api/internal_transfer_api.rb', line 28 def create_internal_transfer(internal_transfer, opts = {}) data, _status_code, _headers = create_internal_transfer_with_http_info(internal_transfer, opts) data end |
#create_internal_transfer_with_http_info(internal_transfer, opts = {}) ⇒ Array<(InternalTransferResponse, Integer, Hash)>
Create an internal transfer An internal transfer is an payment between two accounts within the same Fintech. By default, the payment is posted immediately. To indicate that you want to separate the authorization from the completion of the payment, use `capture_mode` = `MANUAL`. In that case, a separate call to update the status of the transfer will be required to complete the payment.
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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/synctera_ruby_sdk/api/internal_transfer_api.rb', line 39 def create_internal_transfer_with_http_info(internal_transfer, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InternalTransferApi.create_internal_transfer ...' end # verify the required parameter 'internal_transfer' is set if @api_client.config.client_side_validation && internal_transfer.nil? fail ArgumentError, "Missing the required parameter 'internal_transfer' when calling InternalTransferApi.create_internal_transfer" end # resource path local_var_path = '/transactions/internal_transfer' # 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', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(internal_transfer) # return_type return_type = opts[:debug_return_type] || 'InternalTransferResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InternalTransferApi.create_internal_transfer", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InternalTransferApi#create_internal_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_internal_transfer_by_id(id, opts = {}) ⇒ InternalTransferResponse
Get an internal transfer Get an internal transfer auth by ID
98 99 100 101 |
# File 'lib/synctera_ruby_sdk/api/internal_transfer_api.rb', line 98 def get_internal_transfer_by_id(id, opts = {}) data, _status_code, _headers = get_internal_transfer_by_id_with_http_info(id, opts) data end |
#get_internal_transfer_by_id_with_http_info(id, opts = {}) ⇒ Array<(InternalTransferResponse, Integer, Hash)>
Get an internal transfer Get an internal transfer auth by ID
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 148 149 150 151 152 153 154 |
# File 'lib/synctera_ruby_sdk/api/internal_transfer_api.rb', line 108 def get_internal_transfer_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InternalTransferApi.get_internal_transfer_by_id ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InternalTransferApi.get_internal_transfer_by_id" end # resource path local_var_path = '/transactions/internal_transfer/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # 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', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InternalTransferResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InternalTransferApi.get_internal_transfer_by_id", :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: InternalTransferApi#get_internal_transfer_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_internal_transfer_by_id(id, internal_transfer_patch, opts = {}) ⇒ InternalTransferResponse
Update an internal transfer Update an internal transfer. This is only relevant when committing or cancelling an internal transfer authorization (created with ‘capture_mode` = `MANUAL`) that hasn’t already been completed.
162 163 164 165 |
# File 'lib/synctera_ruby_sdk/api/internal_transfer_api.rb', line 162 def update_internal_transfer_by_id(id, internal_transfer_patch, opts = {}) data, _status_code, _headers = update_internal_transfer_by_id_with_http_info(id, internal_transfer_patch, opts) data end |
#update_internal_transfer_by_id_with_http_info(id, internal_transfer_patch, opts = {}) ⇒ Array<(InternalTransferResponse, Integer, Hash)>
Update an internal transfer Update an internal transfer. This is only relevant when committing or cancelling an internal transfer authorization (created with `capture_mode` = `MANUAL`) that hasn't already been completed.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/synctera_ruby_sdk/api/internal_transfer_api.rb', line 173 def update_internal_transfer_by_id_with_http_info(id, internal_transfer_patch, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InternalTransferApi.update_internal_transfer_by_id ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InternalTransferApi.update_internal_transfer_by_id" end # verify the required parameter 'internal_transfer_patch' is set if @api_client.config.client_side_validation && internal_transfer_patch.nil? fail ArgumentError, "Missing the required parameter 'internal_transfer_patch' when calling InternalTransferApi.update_internal_transfer_by_id" end # resource path local_var_path = '/transactions/internal_transfer/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # 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', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(internal_transfer_patch) # return_type return_type = opts[:debug_return_type] || 'InternalTransferResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InternalTransferApi.update_internal_transfer_by_id", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InternalTransferApi#update_internal_transfer_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |