Class: BillForward::AccountsApi
- Inherits:
-
Object
- Object
- BillForward::AccountsApi
- Defined in:
- lib/bf_ruby2/api/accounts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_charge_to_account(account_id, request, opts = {}) ⇒ AddChargeToAccountResponsePagedMetadata
Create a manual invoice.
-
#add_charge_to_account_with_http_info(account_id, request, opts = {}) ⇒ Array<(AddChargeToAccountResponsePagedMetadata, Fixnum, Hash)>
Create a manual invoice.
-
#add_credit_note_to_account(account_id, credit_note, opts = {}) ⇒ CreditNotePagedMetadata
Creates a credit-note which may be used by any subscription of this account.
-
#add_credit_note_to_account_with_http_info(account_id, credit_note, opts = {}) ⇒ Array<(CreditNotePagedMetadata, Fixnum, Hash)>
Creates a credit-note which may be used by any subscription of this account.
-
#add_permission_to_account(account_id, role, opts = {}) ⇒ RolePagedMetadata
Add a role to the account Role","response":"addRoleToAccountResponse.html","request":"addRoleToAccountRequest.html".
-
#add_permission_to_account_with_http_info(account_id, role, opts = {}) ⇒ Array<(RolePagedMetadata, Fixnum, Hash)>
Add a role to the account Role","response":"addRoleToAccountResponse.html","request":"addRoleToAccountRequest.html".
-
#create_account(request, opts = {}) ⇒ AccountPagedMetadata
Create an Account.
-
#create_account_with_http_info(request, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Create an Account.
-
#delete_account(account_id, delete_gateway_data, organizations, opts = {}) ⇒ AccountPagedMetadata
Delete the account specified by the account-ID parameter.
-
#delete_account_with_http_info(account_id, delete_gateway_data, organizations, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Delete the account specified by the account-ID parameter.
-
#delete_metadata_for_account(account_id, opts = {}) ⇒ DynamicMetadata
Remove any associated metadata.
-
#delete_metadata_for_account_with_http_info(account_id, opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>
Remove any associated metadata.
-
#get_account_by_id(account_id, opts = {}) ⇒ AccountPagedMetadata
Returns a single account, specified by the account-ID parameter.
-
#get_account_by_id_with_http_info(account_id, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Returns a single account, specified by the account-ID parameter.
-
#get_accounts_by_created(lower_threshold, upper_threshold, opts = {}) ⇒ AccountPagedMetadata
Returns a collection of account objects with created times within the period specified by the lower-threshold and upper-threshold parameters.
-
#get_accounts_by_created_with_http_info(lower_threshold, upper_threshold, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Returns a collection of account objects with created times within the period specified by the lower-threshold and upper-threshold parameters.
-
#get_accounts_by_updated(lower_threshold, upper_threshold, opts = {}) ⇒ AccountPagedMetadata
Returns a collection of account objects with updated times within the period specified by the lower-threshold and upper-threshold parameters.
-
#get_accounts_by_updated_with_http_info(lower_threshold, upper_threshold, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Returns a collection of account objects with updated times within the period specified by the lower-threshold and upper-threshold parameters.
-
#get_accounts_by_user_id(user_id, opts = {}) ⇒ AccountPagedMetadata
Returns a collection of accounts, specified by the user-ID parameter.
-
#get_accounts_by_user_id_with_http_info(user_id, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Returns a collection of accounts, specified by the user-ID parameter.
-
#get_all_accounts(opts = {}) ⇒ AccountPagedMetadata
Returns a collection of all account objects.
-
#get_all_accounts_with_http_info(opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Returns a collection of all account objects.
-
#get_available_credit_on_account(account_id, opts = {}) ⇒ CreditNotePagedMetadata
Returns all available credit-notes for the specified account.
-
#get_available_credit_on_account_with_http_info(account_id, opts = {}) ⇒ Array<(CreditNotePagedMetadata, Fixnum, Hash)>
Returns all available credit-notes for the specified account.
-
#get_metadata_for_account(account_id, opts = {}) ⇒ DynamicMetadata
Retrieve any associated metadata.
-
#get_metadata_for_account_with_http_info(account_id, opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>
Retrieve any associated metadata.
-
#get_permissions_on_account(account_id, opts = {}) ⇒ RolePagedMetadata
Retrieves a collection of roles, specified by the account-ID parameter.
-
#get_permissions_on_account_with_http_info(account_id, opts = {}) ⇒ Array<(RolePagedMetadata, Fixnum, Hash)>
Retrieves a collection of roles, specified by the account-ID parameter.
-
#initialize(api_client = ApiClient.default) ⇒ AccountsApi
constructor
A new instance of AccountsApi.
-
#remove_credit_from_account(account_id, value, opts = {}) ⇒ CreditNotePagedMetadata
Decrease the amount of credit by the value specified or entirely if no value provided.
-
#remove_credit_from_account_with_http_info(account_id, value, opts = {}) ⇒ Array<(CreditNotePagedMetadata, Fixnum, Hash)>
Decrease the amount of credit by the value specified or entirely if no value provided.
-
#remove_permission_from_account(account_id, role, opts = {}) ⇒ RolePagedMetadata
Revoke the specified role.
-
#remove_permission_from_account_with_http_info(account_id, role, opts = {}) ⇒ Array<(RolePagedMetadata, Fixnum, Hash)>
Revoke the specified role.
-
#set_metadata_for_account(metadata, account_id, opts = {}) ⇒ DynamicMetadata
Remove any existing metadata keys and create the provided data.
-
#set_metadata_for_account_with_http_info(metadata, account_id, opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>
Remove any existing metadata keys and create the provided data.
-
#update_account(account, opts = {}) ⇒ AccountPagedMetadata
Update an Account.
-
#update_account_with_http_info(account, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Update an Account.
-
#upsert_metadata_for_account(metadata, account_id, opts = {}) ⇒ DynamicMetadata
Update any existing metadata key-values and insert any new key-values, no keys will be removed.
-
#upsert_metadata_for_account_with_http_info(metadata, account_id, opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>
Update any existing metadata key-values and insert any new key-values, no keys will be removed.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountsApi
Returns a new instance of AccountsApi.
30 31 32 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
28 29 30 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 28 def api_client @api_client end |
Instance Method Details
#add_charge_to_account(account_id, request, opts = {}) ⇒ AddChargeToAccountResponsePagedMetadata
Create a manual invoice. a manual invoice","request":"addChargeToAccountRequest.html","response":"addChargeToAccountResponse.html"
40 41 42 43 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 40 def add_charge_to_account(account_id, request, opts = {}) data, _status_code, _headers = add_charge_to_account_with_http_info(account_id, request, opts) return data end |
#add_charge_to_account_with_http_info(account_id, request, opts = {}) ⇒ Array<(AddChargeToAccountResponsePagedMetadata, Fixnum, Hash)>
Create a manual invoice. a manual invoice","request":"addChargeToAccountRequest.html","response":"addChargeToAccountResponse.html"
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 92 93 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 51 def add_charge_to_account_with_http_info(account_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.add_charge_to_account ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.add_charge_to_account" if account_id.nil? # verify the required parameter 'request' is set fail ArgumentError, "Missing the required parameter 'request' when calling AccountsApi.add_charge_to_account" if request.nil? # resource path local_var_path = "/accounts/{account-ID}/invoice".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AddChargeToAccountResponsePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#add_charge_to_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#add_credit_note_to_account(account_id, credit_note, opts = {}) ⇒ CreditNotePagedMetadata
Creates a credit-note which may be used by any subscription of this account. Credit","request":"addCreditNoteToAccountRequest.html", "response":"addCreditNoteToAccount.html"
101 102 103 104 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 101 def add_credit_note_to_account(account_id, credit_note, opts = {}) data, _status_code, _headers = add_credit_note_to_account_with_http_info(account_id, credit_note, opts) return data end |
#add_credit_note_to_account_with_http_info(account_id, credit_note, opts = {}) ⇒ Array<(CreditNotePagedMetadata, Fixnum, Hash)>
Creates a credit-note which may be used by any subscription of this account. Credit","request":"addCreditNoteToAccountRequest.html", "response":"addCreditNoteToAccount.html"
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/bf_ruby2/api/accounts_api.rb', line 112 def add_credit_note_to_account_with_http_info(account_id, credit_note, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.add_credit_note_to_account ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.add_credit_note_to_account" if account_id.nil? # verify the required parameter 'credit_note' is set fail ArgumentError, "Missing the required parameter 'credit_note' when calling AccountsApi.add_credit_note_to_account" if credit_note.nil? # resource path local_var_path = "/accounts/{account-ID}/credit".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(credit_note) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CreditNotePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#add_credit_note_to_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#add_permission_to_account(account_id, role, opts = {}) ⇒ RolePagedMetadata
Add a role to the account Role","response":"addRoleToAccountResponse.html","request":"addRoleToAccountRequest.html"
163 164 165 166 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 163 def (account_id, role, opts = {}) data, _status_code, _headers = (account_id, role, opts) return data end |
#add_permission_to_account_with_http_info(account_id, role, opts = {}) ⇒ Array<(RolePagedMetadata, Fixnum, Hash)>
Add a role to the account Role","response":"addRoleToAccountResponse.html","request":"addRoleToAccountRequest.html"
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 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 175 def (account_id, role, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.add_permission_to_account ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.add_permission_to_account" if account_id.nil? # verify the required parameter 'role' is set fail ArgumentError, "Missing the required parameter 'role' when calling AccountsApi.add_permission_to_account" if role.nil? # resource path local_var_path = "/accounts/{account-ID}/roles/{role}".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s).sub('{' + 'role' + '}', role.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['application/json; charset=utf-8'] 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(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RolePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#add_permission_to_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_account(request, opts = {}) ⇒ AccountPagedMetadata
Create an Account. a new account","response":"createAccountResponse.html","request":"createAccountRequest.html"
225 226 227 228 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 225 def create_account(request, opts = {}) data, _status_code, _headers = create_account_with_http_info(request, opts) return data end |
#create_account_with_http_info(request, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Create an Account. a new account","response":"createAccountResponse.html","request":"createAccountRequest.html"
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 235 def create_account_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.create_account ..." end # verify the required parameter 'request' is set fail ArgumentError, "Missing the required parameter 'request' when calling AccountsApi.create_account" if request.nil? # resource path local_var_path = "/accounts".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['text/xml', 'application/xml', 'application/json; charset=utf-8'] 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 = ['application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AccountPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#create_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_account(account_id, delete_gateway_data, organizations, opts = {}) ⇒ AccountPagedMetadata
Delete the account specified by the account-ID parameter. BillForward::AccountsApi."nickname":"Retire","response":"deleteAccount"nickname":"Retire","response":"deleteAccount.html"
284 285 286 287 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 284 def delete_account(account_id, delete_gateway_data, organizations, opts = {}) data, _status_code, _headers = delete_account_with_http_info(account_id, delete_gateway_data, organizations, opts) return data end |
#delete_account_with_http_info(account_id, delete_gateway_data, organizations, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Delete the account specified by the account-ID parameter. BillForward::AccountsApi."nickname":"Retire","response":"deleteAccount"nickname":"Retire","response":"deleteAccount.html"
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 296 def delete_account_with_http_info(account_id, delete_gateway_data, organizations, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.delete_account ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_account" if account_id.nil? # verify the required parameter 'delete_gateway_data' is set fail ArgumentError, "Missing the required parameter 'delete_gateway_data' when calling AccountsApi.delete_account" if delete_gateway_data.nil? # verify the required parameter 'organizations' is set fail ArgumentError, "Missing the required parameter 'organizations' when calling AccountsApi.delete_account" if organizations.nil? # resource path local_var_path = "/accounts/{account-ID}".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'delete_gateway_data'] = delete_gateway_data query_params[:'organizations'] = @api_client.build_collection_param(organizations, :multi) # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['text/plain', 'application/json; charset=utf-8'] 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 => 'AccountPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#delete_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_metadata_for_account(account_id, opts = {}) ⇒ DynamicMetadata
Remove any associated metadata. metadata from account","request" :"deleteAccountMetadataRequest.html","response":"deleteAccountMetadataResponse.html"
350 351 352 353 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 350 def (account_id, opts = {}) data, _status_code, _headers = (account_id, opts) return data end |
#delete_metadata_for_account_with_http_info(account_id, opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>
Remove any associated metadata. metadata from account","request" :"deleteAccountMetadataRequest.html","response":"deleteAccountMetadataResponse.html"
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 361 def (account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.delete_metadata_for_account ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_metadata_for_account" if account_id.nil? # resource path local_var_path = "/accounts/{account-ID}/metadata".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['text/plain', 'application/json; charset=utf-8'] 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 => 'DynamicMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#delete_metadata_for_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_account_by_id(account_id, opts = {}) ⇒ AccountPagedMetadata
Returns a single account, specified by the account-ID parameter. an existing account","response":"getAccountByID.html"
410 411 412 413 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 410 def get_account_by_id(account_id, opts = {}) data, _status_code, _headers = get_account_by_id_with_http_info(account_id, opts) return data end |
#get_account_by_id_with_http_info(account_id, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Returns a single account, specified by the account-ID parameter. an existing account","response":"getAccountByID.html"
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 421 def get_account_by_id_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_account_by_id ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_account_by_id" if account_id.nil? # resource path local_var_path = "/accounts/{account-ID}".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['text/plain', 'application/json; charset=utf-8'] 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 => 'AccountPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_account_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_accounts_by_created(lower_threshold, upper_threshold, opts = {}) ⇒ AccountPagedMetadata
Returns a collection of account objects with created times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by creation","response":"getAccountByCreated.html"
476 477 478 479 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 476 def get_accounts_by_created(lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_accounts_by_created_with_http_info(lower_threshold, upper_threshold, opts) return data end |
#get_accounts_by_created_with_http_info(lower_threshold, upper_threshold, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Returns a collection of account objects with created times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by creation","response":"getAccountByCreated.html"
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 493 def get_accounts_by_created_with_http_info(lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_accounts_by_created ..." end # verify the required parameter 'lower_threshold' is set fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling AccountsApi.get_accounts_by_created" if lower_threshold.nil? # verify the required parameter 'upper_threshold' is set fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling AccountsApi.get_accounts_by_created" if upper_threshold.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/accounts/created/{lower-threshold}/{upper-threshold}".sub('{format}','json').sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['text/plain', 'application/json; charset=utf-8'] 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 => 'AccountPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_accounts_by_created\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_accounts_by_updated(lower_threshold, upper_threshold, opts = {}) ⇒ AccountPagedMetadata
Returns a collection of account objects with updated times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by updated","response":"getAccountByUpdated.html"
558 559 560 561 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 558 def get_accounts_by_updated(lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_accounts_by_updated_with_http_info(lower_threshold, upper_threshold, opts) return data end |
#get_accounts_by_updated_with_http_info(lower_threshold, upper_threshold, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Returns a collection of account objects with updated times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by updated","response":"getAccountByUpdated.html"
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 575 def get_accounts_by_updated_with_http_info(lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_accounts_by_updated ..." end # verify the required parameter 'lower_threshold' is set fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling AccountsApi.get_accounts_by_updated" if lower_threshold.nil? # verify the required parameter 'upper_threshold' is set fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling AccountsApi.get_accounts_by_updated" if upper_threshold.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/accounts/updated/{lower-threshold}/{upper-threshold}".sub('{format}','json').sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['text/plain', 'application/json; charset=utf-8'] 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 => 'AccountPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_accounts_by_updated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_accounts_by_user_id(user_id, opts = {}) ⇒ AccountPagedMetadata
Returns a collection of accounts, specified by the user-ID parameter. By default 10 values are returned. Records are returned in natural order. by user","response":"getAccountByUserID.html"
639 640 641 642 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 639 def get_accounts_by_user_id(user_id, opts = {}) data, _status_code, _headers = get_accounts_by_user_id_with_http_info(user_id, opts) return data end |
#get_accounts_by_user_id_with_http_info(user_id, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Returns a collection of accounts, specified by the user-ID parameter. By default 10 values are returned. Records are returned in natural order. by user","response":"getAccountByUserID.html"
655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 655 def get_accounts_by_user_id_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_accounts_by_user_id ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling AccountsApi.get_accounts_by_user_id" if user_id.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/accounts/user/{user-ID}".sub('{format}','json').sub('{' + 'user-ID' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['text/plain', 'application/json; charset=utf-8'] 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 => 'AccountPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_accounts_by_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_all_accounts(opts = {}) ⇒ AccountPagedMetadata
Returns a collection of all account objects. By default 10 values are returned. Records are returned in natural order. all accounts","response":"getAccountAll.html"
719 720 721 722 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 719 def get_all_accounts(opts = {}) data, _status_code, _headers = get_all_accounts_with_http_info(opts) return data end |
#get_all_accounts_with_http_info(opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Returns a collection of all account objects. By default 10 values are returned. Records are returned in natural order. all accounts","response":"getAccountAll.html"
737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 737 def get_all_accounts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_all_accounts ..." end if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/accounts".sub('{format}','json') # query parameters query_params = {} query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if !opts[:'id'].nil? query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? query_params[:'users_only'] = opts[:'users_only'] if !opts[:'users_only'].nil? query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['text/plain', 'application/json; charset=utf-8'] 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 => 'AccountPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_all_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_available_credit_on_account(account_id, opts = {}) ⇒ CreditNotePagedMetadata
Returns all available credit-notes for the specified account. By default 10 values are returned. Records are returned in natural order. available credit","response":"getAvailableCreditAccount.html"
800 801 802 803 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 800 def get_available_credit_on_account(account_id, opts = {}) data, _status_code, _headers = get_available_credit_on_account_with_http_info(account_id, opts) return data end |
#get_available_credit_on_account_with_http_info(account_id, opts = {}) ⇒ Array<(CreditNotePagedMetadata, Fixnum, Hash)>
Returns all available credit-notes for the specified account. By default 10 values are returned. Records are returned in natural order. available credit","response":"getAvailableCreditAccount.html"
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 816 def get_available_credit_on_account_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_available_credit_on_account ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_available_credit_on_account" if account_id.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/accounts/{account-ID}/credit".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['text/plain', 'application/json; charset=utf-8'] 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 => 'CreditNotePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_available_credit_on_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_metadata_for_account(account_id, opts = {}) ⇒ DynamicMetadata
Retrieve any associated metadata. metadata on account","request":"getAccountMetadataRequest.html","response":"getAccountMetadataResponse.html"
873 874 875 876 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 873 def (account_id, opts = {}) data, _status_code, _headers = (account_id, opts) return data end |
#get_metadata_for_account_with_http_info(account_id, opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>
Retrieve any associated metadata. metadata on account","request":"getAccountMetadataRequest.html","response":"getAccountMetadataResponse.html"
884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 884 def (account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_metadata_for_account ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_metadata_for_account" if account_id.nil? # resource path local_var_path = "/accounts/{account-ID}/metadata".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['text/plain', 'application/json; charset=utf-8'] 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 => 'DynamicMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_metadata_for_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_permissions_on_account(account_id, opts = {}) ⇒ RolePagedMetadata
Retrieves a collection of roles, specified by the account-ID parameter. By default 10 values are returned. Records are returned in natural order. roles on account","response":"getRoleByAccount.html"
938 939 940 941 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 938 def (account_id, opts = {}) data, _status_code, _headers = (account_id, opts) return data end |
#get_permissions_on_account_with_http_info(account_id, opts = {}) ⇒ Array<(RolePagedMetadata, Fixnum, Hash)>
Retrieves a collection of roles, specified by the account-ID parameter. By default 10 values are returned. Records are returned in natural order. roles on account","response":"getRoleByAccount.html"
954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 954 def (account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_permissions_on_account ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_permissions_on_account" if account_id.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/accounts/{account-ID}/roles".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['text/plain'] 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 => 'RolePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_permissions_on_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#remove_credit_from_account(account_id, value, opts = {}) ⇒ CreditNotePagedMetadata
Decrease the amount of credit by the value specified or entirely if no value provided. Credit","response":"removeCreditForAccount.html"
1012 1013 1014 1015 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 1012 def remove_credit_from_account(account_id, value, opts = {}) data, _status_code, _headers = remove_credit_from_account_with_http_info(account_id, value, opts) return data end |
#remove_credit_from_account_with_http_info(account_id, value, opts = {}) ⇒ Array<(CreditNotePagedMetadata, Fixnum, Hash)>
Decrease the amount of credit by the value specified or entirely if no value provided. Credit","response":"removeCreditForAccount.html"
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 1024 def remove_credit_from_account_with_http_info(account_id, value, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.remove_credit_from_account ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.remove_credit_from_account" if account_id.nil? # verify the required parameter 'value' is set fail ArgumentError, "Missing the required parameter 'value' when calling AccountsApi.remove_credit_from_account" if value.nil? # resource path local_var_path = "/accounts/{account-ID}/credit/{value}".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s).sub('{' + 'value' + '}', value.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['text/plain', 'application/json; charset=utf-8'] 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 => 'CreditNotePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#remove_credit_from_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#remove_permission_from_account(account_id, role, opts = {}) ⇒ RolePagedMetadata
Revoke the specified role. Role","response":"removeRoleFromAccount.html"
1076 1077 1078 1079 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 1076 def (account_id, role, opts = {}) data, _status_code, _headers = (account_id, role, opts) return data end |
#remove_permission_from_account_with_http_info(account_id, role, opts = {}) ⇒ Array<(RolePagedMetadata, Fixnum, Hash)>
Revoke the specified role. Role","response":"removeRoleFromAccount.html"
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 1088 def (account_id, role, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.remove_permission_from_account ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.remove_permission_from_account" if account_id.nil? # verify the required parameter 'role' is set fail ArgumentError, "Missing the required parameter 'role' when calling AccountsApi.remove_permission_from_account" if role.nil? # resource path local_var_path = "/accounts/{account-ID}/roles/{role}".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s).sub('{' + 'role' + '}', role.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['text/plain'] 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 => 'RolePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#remove_permission_from_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_metadata_for_account(metadata, account_id, opts = {}) ⇒ DynamicMetadata
Remove any existing metadata keys and create the provided data. metadata on account","request":"setAccountMetadataRequest.html","response":"setAccountMetadataResponse.html"
1140 1141 1142 1143 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 1140 def (, account_id, opts = {}) data, _status_code, _headers = (, account_id, opts) return data end |
#set_metadata_for_account_with_http_info(metadata, account_id, opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>
Remove any existing metadata keys and create the provided data. metadata on account","request":"setAccountMetadataRequest.html","response":"setAccountMetadataResponse.html"
1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 1152 def (, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.set_metadata_for_account ..." end # verify the required parameter 'metadata' is set fail ArgumentError, "Missing the required parameter 'metadata' when calling AccountsApi.set_metadata_for_account" if .nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.set_metadata_for_account" if account_id.nil? # resource path local_var_path = "/accounts/{account-ID}/metadata".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DynamicMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#set_metadata_for_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_account(account, opts = {}) ⇒ AccountPagedMetadata
Update an Account. an account","response":"updateAccountResponse.html","request":"updateAccountRequest.html"
1202 1203 1204 1205 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 1202 def update_account(account, opts = {}) data, _status_code, _headers = update_account_with_http_info(account, opts) return data end |
#update_account_with_http_info(account, opts = {}) ⇒ Array<(AccountPagedMetadata, Fixnum, Hash)>
Update an Account. an account","response":"updateAccountResponse.html","request":"updateAccountRequest.html"
1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 1212 def update_account_with_http_info(account, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.update_account ..." end # verify the required parameter 'account' is set fail ArgumentError, "Missing the required parameter 'account' when calling AccountsApi.update_account" if account.nil? # resource path local_var_path = "/accounts".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['text/xml', 'application/xml', 'application/json; charset=utf-8'] 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 = ['application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(account) 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 => 'AccountPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upsert_metadata_for_account(metadata, account_id, opts = {}) ⇒ DynamicMetadata
Update any existing metadata key-values and insert any new key-values, no keys will be removed. metadata on account","request":"upsertAccountMetadataRequest.html","response":"upsertAccountMetadataResponse.html"
1261 1262 1263 1264 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 1261 def (, account_id, opts = {}) data, _status_code, _headers = (, account_id, opts) return data end |
#upsert_metadata_for_account_with_http_info(metadata, account_id, opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>
Update any existing metadata key-values and insert any new key-values, no keys will be removed. metadata on account","request":"upsertAccountMetadataRequest.html","response":"upsertAccountMetadataResponse.html"
1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 |
# File 'lib/bf_ruby2/api/accounts_api.rb', line 1273 def (, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.upsert_metadata_for_account ..." end # verify the required parameter 'metadata' is set fail ArgumentError, "Missing the required parameter 'metadata' when calling AccountsApi.upsert_metadata_for_account" if .nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.upsert_metadata_for_account" if account_id.nil? # resource path local_var_path = "/accounts/{account-ID}/metadata".sub('{format}','json').sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] 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 = ['application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() 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 => 'DynamicMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#upsert_metadata_for_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |