Class: QwilAPI::AccountsApi
- Inherits:
-
Object
- Object
- QwilAPI::AccountsApi
- Defined in:
- lib/qwil_api/api/accounts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#account_destroy(pk, opts = {}) ⇒ AccountSerializer
The bank accounts for all Users The bank accounts for all Users.
-
#account_destroy_with_http_info(pk, opts = {}) ⇒ Array<(AccountSerializer, Fixnum, Hash)>
The bank accounts for all Users The bank accounts for all Users.
-
#account_partial_update(pk, opts = {}) ⇒ AccountSerializer
The bank accounts for all Users The bank accounts for all Users.
-
#account_partial_update_with_http_info(pk, opts = {}) ⇒ Array<(AccountSerializer, Fixnum, Hash)>
The bank accounts for all Users The bank accounts for all Users.
-
#account_retrieve(pk, opts = {}) ⇒ AccountSerializer
The bank accounts for all Users The bank accounts for all Users.
-
#account_retrieve_with_http_info(pk, opts = {}) ⇒ Array<(AccountSerializer, Fixnum, Hash)>
The bank accounts for all Users The bank accounts for all Users.
-
#account_update(pk, account_number, name, routing_number, opts = {}) ⇒ AccountSerializer
The bank accounts for all Users The bank accounts for all Users.
-
#account_update_with_http_info(pk, account_number, name, routing_number, opts = {}) ⇒ Array<(AccountSerializer, Fixnum, Hash)>
The bank accounts for all Users The bank accounts for all Users.
-
#initialize(api_client = ApiClient.default) ⇒ AccountsApi
constructor
A new instance of AccountsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountsApi
Returns a new instance of AccountsApi.
28 29 30 |
# File 'lib/qwil_api/api/accounts_api.rb', line 28 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
26 27 28 |
# File 'lib/qwil_api/api/accounts_api.rb', line 26 def api_client @api_client end |
Instance Method Details
#account_destroy(pk, opts = {}) ⇒ AccountSerializer
The bank accounts for all Users The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g.<br/>=> PATCH api.qwil.co/accounts/1/ …<br/><= 200 OK { "url": "api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
37 38 39 40 |
# File 'lib/qwil_api/api/accounts_api.rb', line 37 def account_destroy(pk, opts = {}) data, _status_code, _headers = account_destroy_with_http_info(pk, opts) return data end |
#account_destroy_with_http_info(pk, opts = {}) ⇒ Array<(AccountSerializer, Fixnum, Hash)>
The bank accounts for all Users The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g.<br/>=> PATCH api.qwil.co/accounts/1/ …<br/><= 200 OK { "url": "api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
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 |
# File 'lib/qwil_api/api/accounts_api.rb', line 47 def account_destroy_with_http_info(pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.account_destroy ..." end # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling AccountsApi.account_destroy" if pk.nil? # resource path local_var_path = "/accounts/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AccountSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#account_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#account_partial_update(pk, opts = {}) ⇒ AccountSerializer
The bank accounts for all Users The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g.<br/>=> PATCH api.qwil.co/accounts/1/ …<br/><= 200 OK { "url": "api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
103 104 105 106 |
# File 'lib/qwil_api/api/accounts_api.rb', line 103 def account_partial_update(pk, opts = {}) data, _status_code, _headers = account_partial_update_with_http_info(pk, opts) return data end |
#account_partial_update_with_http_info(pk, opts = {}) ⇒ Array<(AccountSerializer, Fixnum, Hash)>
The bank accounts for all Users The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g.<br/>=> PATCH api.qwil.co/accounts/1/ …<br/><= 200 OK { "url": "api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/qwil_api/api/accounts_api.rb', line 122 def account_partial_update_with_http_info(pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.account_partial_update ..." end # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling AccountsApi.account_partial_update" if pk.nil? # resource path local_var_path = "/accounts/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["account_number"] = opts[:'account_number'] if !opts[:'account_number'].nil? form_params["name"] = opts[:'name'] if !opts[:'name'].nil? form_params["routing_number"] = opts[:'routing_number'] if !opts[:'routing_number'].nil? form_params["is_tax_savings"] = opts[:'is_tax_savings'] if !opts[:'is_tax_savings'].nil? form_params["is_paypal"] = opts[:'is_paypal'] if !opts[:'is_paypal'].nil? form_params["is_mychoice"] = opts[:'is_mychoice'] if !opts[:'is_mychoice'].nil? form_params["mychoice_user_id"] = opts[:'mychoice_user_id'] if !opts[:'mychoice_user_id'].nil? form_params["mychoice_card_id"] = opts[:'mychoice_card_id'] if !opts[:'mychoice_card_id'].nil? form_params["user"] = opts[:'user'] if !opts[:'user'].nil? # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AccountSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#account_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#account_retrieve(pk, opts = {}) ⇒ AccountSerializer
The bank accounts for all Users The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g.<br/>=> PATCH api.qwil.co/accounts/1/ …<br/><= 200 OK { "url": "api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
178 179 180 181 |
# File 'lib/qwil_api/api/accounts_api.rb', line 178 def account_retrieve(pk, opts = {}) data, _status_code, _headers = account_retrieve_with_http_info(pk, opts) return data end |
#account_retrieve_with_http_info(pk, opts = {}) ⇒ Array<(AccountSerializer, Fixnum, Hash)>
The bank accounts for all Users The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g.<br/>=> PATCH api.qwil.co/accounts/1/ …<br/><= 200 OK { "url": "api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
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/qwil_api/api/accounts_api.rb', line 188 def account_retrieve_with_http_info(pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.account_retrieve ..." end # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling AccountsApi.account_retrieve" if pk.nil? # resource path local_var_path = "/accounts/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AccountSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#account_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#account_update(pk, account_number, name, routing_number, opts = {}) ⇒ AccountSerializer
The bank accounts for all Users The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g.<br/>=> PATCH api.qwil.co/accounts/1/ …<br/><= 200 OK { "url": "api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
244 245 246 247 |
# File 'lib/qwil_api/api/accounts_api.rb', line 244 def account_update(pk, account_number, name, routing_number, opts = {}) data, _status_code, _headers = account_update_with_http_info(pk, account_number, name, routing_number, opts) return data end |
#account_update_with_http_info(pk, account_number, name, routing_number, opts = {}) ⇒ Array<(AccountSerializer, Fixnum, Hash)>
The bank accounts for all Users The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g.<br/>=> PATCH api.qwil.co/accounts/1/ …<br/><= 200 OK { "url": "api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/qwil_api/api/accounts_api.rb', line 263 def account_update_with_http_info(pk, account_number, name, routing_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.account_update ..." end # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling AccountsApi.account_update" if pk.nil? # verify the required parameter 'account_number' is set fail ArgumentError, "Missing the required parameter 'account_number' when calling AccountsApi.account_update" if account_number.nil? # verify the required parameter 'name' is set fail ArgumentError, "Missing the required parameter 'name' when calling AccountsApi.account_update" if name.nil? # verify the required parameter 'routing_number' is set fail ArgumentError, "Missing the required parameter 'routing_number' when calling AccountsApi.account_update" if routing_number.nil? # resource path local_var_path = "/accounts/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["account_number"] = account_number form_params["name"] = name form_params["routing_number"] = routing_number form_params["is_tax_savings"] = opts[:'is_tax_savings'] if !opts[:'is_tax_savings'].nil? form_params["is_paypal"] = opts[:'is_paypal'] if !opts[:'is_paypal'].nil? form_params["is_mychoice"] = opts[:'is_mychoice'] if !opts[:'is_mychoice'].nil? form_params["mychoice_user_id"] = opts[:'mychoice_user_id'] if !opts[:'mychoice_user_id'].nil? form_params["mychoice_card_id"] = opts[:'mychoice_card_id'] if !opts[:'mychoice_card_id'].nil? form_params["user"] = opts[:'user'] if !opts[:'user'].nil? # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AccountSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#account_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |