Class: MxPlatformRuby::SpendingPlanApi
- Inherits:
-
Object
- Object
- MxPlatformRuby::SpendingPlanApi
- Defined in:
- lib/mx-platform-ruby/api/spending_plan_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_spending_plan(user_guid, opts = {}) ⇒ SpendingPlanResponse
Create spending plan This endpoint creates a new ‘spending_plan` for the user.
-
#create_spending_plan_iteration_item(spending_plan_guid, user_guid, spending_plan_iteration_item_create_request_body, opts = {}) ⇒ SpendingPlanIterationItemResponse
Create spending plan iteration item This endpoint creates a new ‘spending_plan_iteration_item`.
-
#create_spending_plan_iteration_item_with_http_info(spending_plan_guid, user_guid, spending_plan_iteration_item_create_request_body, opts = {}) ⇒ Array<(SpendingPlanIterationItemResponse, Integer, Hash)>
Create spending plan iteration item This endpoint creates a new `spending_plan_iteration_item`.
-
#create_spending_plan_with_http_info(user_guid, opts = {}) ⇒ Array<(SpendingPlanResponse, Integer, Hash)>
Create spending plan This endpoint creates a new `spending_plan` for the user.
-
#delete_spending_plan(user_guid, spending_plan_guid, opts = {}) ⇒ nil
Delete spending plan Use this endpoint to delete a user’s ‘spending_plan`.
-
#delete_spending_plan_account(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) ⇒ nil
Delete spending plan account Use this endpoint to delete a ‘spending_plan_account`.
-
#delete_spending_plan_account_with_http_info(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete spending plan account Use this endpoint to delete a `spending_plan_account`.
-
#delete_spending_plan_iteration_item(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) ⇒ nil
Delete spending plan iteration item Use this endpoint to delete a spending plan ‘iteration_item`.
-
#delete_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete spending plan iteration item Use this endpoint to delete a spending plan `iteration_item`.
-
#delete_spending_plan_with_http_info(user_guid, spending_plan_guid, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete spending plan Use this endpoint to delete a user's `spending_plan`.
-
#initialize(api_client = ApiClient.default) ⇒ SpendingPlanApi
constructor
A new instance of SpendingPlanApi.
-
#list_spending_plan_accounts(user_guid, spending_plan_guid, opts = {}) ⇒ SpendingPlanAccountsResponse
List spending plan accounts Use this endpoint to list all the spending plan accounts associated with the spending plan.
-
#list_spending_plan_accounts_with_http_info(user_guid, spending_plan_guid, opts = {}) ⇒ Array<(SpendingPlanAccountsResponse, Integer, Hash)>
List spending plan accounts Use this endpoint to list all the spending plan accounts associated with the spending plan.
-
#list_spending_plan_iteration_items(user_guid, spending_plan_guid, opts = {}) ⇒ SpendingPlanIterationItemsResponseBody
List spending plan iteration items Use this endpoint to list all the spending plan ‘iteration_items` associated with the `iteration`.
-
#list_spending_plan_iteration_items_with_http_info(user_guid, spending_plan_guid, opts = {}) ⇒ Array<(SpendingPlanIterationItemsResponseBody, Integer, Hash)>
List spending plan iteration items Use this endpoint to list all the spending plan `iteration_items` associated with the `iteration`.
-
#list_spending_plan_iterations(user_guid, spending_plan_guid, opts = {}) ⇒ SpendingPlanIterationsResponse
List spending plan iterations Use this endpoint to list all the spending plan ‘iterations` associated with the `spending_plan`.
-
#list_spending_plan_iterations_with_http_info(user_guid, spending_plan_guid, opts = {}) ⇒ Array<(SpendingPlanIterationsResponse, Integer, Hash)>
List spending plan iterations Use this endpoint to list all the spending plan `iterations` associated with the `spending_plan`.
-
#list_spending_plans(user_guid, opts = {}) ⇒ SpendingPlansResponseBody
List spending plans Use this endpoint to list all the spending plans associated with the user.
-
#list_spending_plans_with_http_info(user_guid, opts = {}) ⇒ Array<(SpendingPlansResponseBody, Integer, Hash)>
List spending plans Use this endpoint to list all the spending plans associated with the user.
-
#read_spending_plan_account(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) ⇒ SpendingPlanAccountResponse
Read spending plan account Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID.
-
#read_spending_plan_account_with_http_info(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) ⇒ Array<(SpendingPlanAccountResponse, Integer, Hash)>
Read spending plan account Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID.
-
#read_spending_plan_iteration(user_guid, spending_plan_guid, iteration_number, opts = {}) ⇒ SpendingPlanIterationResponse
Read a spending plan iteration Use this endpoint to read the attributes of a specific spending plan ‘iteration` according to its `iteration_number`.
-
#read_spending_plan_iteration_item(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) ⇒ SpendingPlanIterationItemResponse
Read a spending plan iteration item Use this endpoint to read the attributes of a specific spending plan ‘iteration_item` according to its unique GUID.
-
#read_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) ⇒ Array<(SpendingPlanIterationItemResponse, Integer, Hash)>
Read a spending plan iteration item Use this endpoint to read the attributes of a specific spending plan `iteration_item` according to its unique GUID.
-
#read_spending_plan_iteration_with_http_info(user_guid, spending_plan_guid, iteration_number, opts = {}) ⇒ Array<(SpendingPlanIterationResponse, Integer, Hash)>
Read a spending plan iteration Use this endpoint to read the attributes of a specific spending plan `iteration` according to its `iteration_number`.
-
#read_spending_plan_user(user_guid, spending_plan_guid, opts = {}) ⇒ SpendingPlanResponse
Read a spending plan for a user Use this endpoint to read the attributes of a specific spending plan according to its unique GUID.
-
#read_spending_plan_user_with_http_info(user_guid, spending_plan_guid, opts = {}) ⇒ Array<(SpendingPlanResponse, Integer, Hash)>
Read a spending plan for a user Use this endpoint to read the attributes of a specific spending plan according to its unique GUID.
-
#update_spending_plan_iteration_item(user_guid, spending_plan_guid, iteration_item_guid, spending_plan_iteration_item_create_request_body, opts = {}) ⇒ SpendingPlanIterationItemResponse
Update a spending plan iteration item Use this endpoint to update an existing ‘spending_plan_iteration_item`.
-
#update_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, spending_plan_iteration_item_create_request_body, opts = {}) ⇒ Array<(SpendingPlanIterationItemResponse, Integer, Hash)>
Update a spending plan iteration item Use this endpoint to update an existing `spending_plan_iteration_item`.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SpendingPlanApi
Returns a new instance of SpendingPlanApi.
19 20 21 |
# File 'lib/mx-platform-ruby/api/spending_plan_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/mx-platform-ruby/api/spending_plan_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_spending_plan(user_guid, opts = {}) ⇒ SpendingPlanResponse
Create spending plan This endpoint creates a new ‘spending_plan` for the user.
27 28 29 30 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 27 def create_spending_plan(user_guid, opts = {}) data, _status_code, _headers = create_spending_plan_with_http_info(user_guid, opts) data end |
#create_spending_plan_iteration_item(spending_plan_guid, user_guid, spending_plan_iteration_item_create_request_body, opts = {}) ⇒ SpendingPlanIterationItemResponse
Create spending plan iteration item This endpoint creates a new ‘spending_plan_iteration_item`.
92 93 94 95 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 92 def create_spending_plan_iteration_item(spending_plan_guid, user_guid, spending_plan_iteration_item_create_request_body, opts = {}) data, _status_code, _headers = create_spending_plan_iteration_item_with_http_info(spending_plan_guid, user_guid, spending_plan_iteration_item_create_request_body, opts) data end |
#create_spending_plan_iteration_item_with_http_info(spending_plan_guid, user_guid, spending_plan_iteration_item_create_request_body, opts = {}) ⇒ Array<(SpendingPlanIterationItemResponse, Integer, Hash)>
Create spending plan iteration item This endpoint creates a new `spending_plan_iteration_item`.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 104 def create_spending_plan_iteration_item_with_http_info(spending_plan_guid, user_guid, spending_plan_iteration_item_create_request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.create_spending_plan_iteration_item ...' end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.create_spending_plan_iteration_item" end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.create_spending_plan_iteration_item" end # verify the required parameter 'spending_plan_iteration_item_create_request_body' is set if @api_client.config.client_side_validation && spending_plan_iteration_item_create_request_body.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_iteration_item_create_request_body' when calling SpendingPlanApi.create_spending_plan_iteration_item" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items'.sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.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/vnd.mx.api.v1+json']) unless header_params['Accept'] # 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(spending_plan_iteration_item_create_request_body) # return_type return_type = opts[:debug_return_type] || 'SpendingPlanIterationItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.create_spending_plan_iteration_item", :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: SpendingPlanApi#create_spending_plan_iteration_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_spending_plan_with_http_info(user_guid, opts = {}) ⇒ Array<(SpendingPlanResponse, Integer, Hash)>
Create spending plan This endpoint creates a new `spending_plan` for the user.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 37 def create_spending_plan_with_http_info(user_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.create_spending_plan ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.create_spending_plan" end # resource path local_var_path = '/users/{user_guid}/spending_plans'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.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/vnd.mx.api.v1+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpendingPlanResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.create_spending_plan", :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: SpendingPlanApi#create_spending_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_spending_plan(user_guid, spending_plan_guid, opts = {}) ⇒ nil
Delete spending plan Use this endpoint to delete a user’s ‘spending_plan`.
171 172 173 174 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 171 def delete_spending_plan(user_guid, spending_plan_guid, opts = {}) delete_spending_plan_with_http_info(user_guid, spending_plan_guid, opts) nil end |
#delete_spending_plan_account(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) ⇒ nil
Delete spending plan account Use this endpoint to delete a ‘spending_plan_account`.
239 240 241 242 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 239 def delete_spending_plan_account(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) delete_spending_plan_account_with_http_info(user_guid, spending_plan_guid, spending_plan_account_guid, opts) nil end |
#delete_spending_plan_account_with_http_info(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete spending plan account Use this endpoint to delete a `spending_plan_account`.
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 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 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 251 def delete_spending_plan_account_with_http_info(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.delete_spending_plan_account ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.delete_spending_plan_account" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.delete_spending_plan_account" end # verify the required parameter 'spending_plan_account_guid' is set if @api_client.config.client_side_validation && spending_plan_account_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_account_guid' when calling SpendingPlanApi.delete_spending_plan_account" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts/{spending_plan_account_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)).sub('{' + 'spending_plan_account_guid' + '}', CGI.escape(spending_plan_account_guid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.delete_spending_plan_account", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpendingPlanApi#delete_spending_plan_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_spending_plan_iteration_item(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) ⇒ nil
Delete spending plan iteration item Use this endpoint to delete a spending plan ‘iteration_item`.
312 313 314 315 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 312 def delete_spending_plan_iteration_item(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) delete_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, opts) nil end |
#delete_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete spending plan iteration item Use this endpoint to delete a spending plan `iteration_item`.
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 324 def delete_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.delete_spending_plan_iteration_item ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.delete_spending_plan_iteration_item" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.delete_spending_plan_iteration_item" end # verify the required parameter 'iteration_item_guid' is set if @api_client.config.client_side_validation && iteration_item_guid.nil? fail ArgumentError, "Missing the required parameter 'iteration_item_guid' when calling SpendingPlanApi.delete_spending_plan_iteration_item" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)).sub('{' + 'iteration_item_guid' + '}', CGI.escape(iteration_item_guid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.delete_spending_plan_iteration_item", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpendingPlanApi#delete_spending_plan_iteration_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_spending_plan_with_http_info(user_guid, spending_plan_guid, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete spending plan Use this endpoint to delete a user's `spending_plan`.
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 229 230 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 182 def delete_spending_plan_with_http_info(user_guid, spending_plan_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.delete_spending_plan ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.delete_spending_plan" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.delete_spending_plan" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.delete_spending_plan", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpendingPlanApi#delete_spending_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_spending_plan_accounts(user_guid, spending_plan_guid, opts = {}) ⇒ SpendingPlanAccountsResponse
List spending plan accounts Use this endpoint to list all the spending plan accounts associated with the spending plan.
386 387 388 389 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 386 def list_spending_plan_accounts(user_guid, spending_plan_guid, opts = {}) data, _status_code, _headers = list_spending_plan_accounts_with_http_info(user_guid, spending_plan_guid, opts) data end |
#list_spending_plan_accounts_with_http_info(user_guid, spending_plan_guid, opts = {}) ⇒ Array<(SpendingPlanAccountsResponse, Integer, Hash)>
List spending plan accounts Use this endpoint to list all the spending plan accounts associated with the spending plan.
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 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 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 399 def list_spending_plan_accounts_with_http_info(user_guid, spending_plan_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.list_spending_plan_accounts ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.list_spending_plan_accounts" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.list_spending_plan_accounts" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpendingPlanAccountsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.list_spending_plan_accounts", :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: SpendingPlanApi#list_spending_plan_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_spending_plan_iteration_items(user_guid, spending_plan_guid, opts = {}) ⇒ SpendingPlanIterationItemsResponseBody
List spending plan iteration items Use this endpoint to list all the spending plan ‘iteration_items` associated with the `iteration`.
461 462 463 464 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 461 def list_spending_plan_iteration_items(user_guid, spending_plan_guid, opts = {}) data, _status_code, _headers = list_spending_plan_iteration_items_with_http_info(user_guid, spending_plan_guid, opts) data end |
#list_spending_plan_iteration_items_with_http_info(user_guid, spending_plan_guid, opts = {}) ⇒ Array<(SpendingPlanIterationItemsResponseBody, Integer, Hash)>
List spending plan iteration items Use this endpoint to list all the spending plan `iteration_items` associated with the `iteration`.
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 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 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 474 def list_spending_plan_iteration_items_with_http_info(user_guid, spending_plan_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.list_spending_plan_iteration_items ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.list_spending_plan_iteration_items" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.list_spending_plan_iteration_items" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpendingPlanIterationItemsResponseBody' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.list_spending_plan_iteration_items", :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: SpendingPlanApi#list_spending_plan_iteration_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_spending_plan_iterations(user_guid, spending_plan_guid, opts = {}) ⇒ SpendingPlanIterationsResponse
List spending plan iterations Use this endpoint to list all the spending plan ‘iterations` associated with the `spending_plan`.
536 537 538 539 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 536 def list_spending_plan_iterations(user_guid, spending_plan_guid, opts = {}) data, _status_code, _headers = list_spending_plan_iterations_with_http_info(user_guid, spending_plan_guid, opts) data end |
#list_spending_plan_iterations_with_http_info(user_guid, spending_plan_guid, opts = {}) ⇒ Array<(SpendingPlanIterationsResponse, Integer, Hash)>
List spending plan iterations Use this endpoint to list all the spending plan `iterations` associated with the `spending_plan`.
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 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 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 549 def list_spending_plan_iterations_with_http_info(user_guid, spending_plan_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.list_spending_plan_iterations ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.list_spending_plan_iterations" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.list_spending_plan_iterations" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpendingPlanIterationsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.list_spending_plan_iterations", :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: SpendingPlanApi#list_spending_plan_iterations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_spending_plans(user_guid, opts = {}) ⇒ SpendingPlansResponseBody
List spending plans Use this endpoint to list all the spending plans associated with the user.
610 611 612 613 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 610 def list_spending_plans(user_guid, opts = {}) data, _status_code, _headers = list_spending_plans_with_http_info(user_guid, opts) data end |
#list_spending_plans_with_http_info(user_guid, opts = {}) ⇒ Array<(SpendingPlansResponseBody, Integer, Hash)>
List spending plans Use this endpoint to list all the spending plans associated with the user.
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 622 def list_spending_plans_with_http_info(user_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.list_spending_plans ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.list_spending_plans" end # resource path local_var_path = '/users/{user_guid}/spending_plans'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpendingPlansResponseBody' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.list_spending_plans", :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: SpendingPlanApi#list_spending_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#read_spending_plan_account(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) ⇒ SpendingPlanAccountResponse
Read spending plan account Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID.
681 682 683 684 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 681 def read_spending_plan_account(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) data, _status_code, _headers = read_spending_plan_account_with_http_info(user_guid, spending_plan_guid, spending_plan_account_guid, opts) data end |
#read_spending_plan_account_with_http_info(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) ⇒ Array<(SpendingPlanAccountResponse, Integer, Hash)>
Read spending plan account Use this endpoint to read the attributes of a specific spending plan account according to its unique GUID.
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 695 def read_spending_plan_account_with_http_info(user_guid, spending_plan_guid, spending_plan_account_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.read_spending_plan_account ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.read_spending_plan_account" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.read_spending_plan_account" end # verify the required parameter 'spending_plan_account_guid' is set if @api_client.config.client_side_validation && spending_plan_account_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_account_guid' when calling SpendingPlanApi.read_spending_plan_account" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts/{spending_plan_account_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)).sub('{' + 'spending_plan_account_guid' + '}', CGI.escape(spending_plan_account_guid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpendingPlanAccountResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.read_spending_plan_account", :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: SpendingPlanApi#read_spending_plan_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#read_spending_plan_iteration(user_guid, spending_plan_guid, iteration_number, opts = {}) ⇒ SpendingPlanIterationResponse
Read a spending plan iteration Use this endpoint to read the attributes of a specific spending plan ‘iteration` according to its `iteration_number`.
762 763 764 765 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 762 def read_spending_plan_iteration(user_guid, spending_plan_guid, iteration_number, opts = {}) data, _status_code, _headers = read_spending_plan_iteration_with_http_info(user_guid, spending_plan_guid, iteration_number, opts) data end |
#read_spending_plan_iteration_item(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) ⇒ SpendingPlanIterationItemResponse
Read a spending plan iteration item Use this endpoint to read the attributes of a specific spending plan ‘iteration_item` according to its unique GUID.
843 844 845 846 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 843 def read_spending_plan_iteration_item(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) data, _status_code, _headers = read_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, opts) data end |
#read_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) ⇒ Array<(SpendingPlanIterationItemResponse, Integer, Hash)>
Read a spending plan iteration item Use this endpoint to read the attributes of a specific spending plan `iteration_item` according to its unique GUID.
857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 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 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 857 def read_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.read_spending_plan_iteration_item ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.read_spending_plan_iteration_item" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.read_spending_plan_iteration_item" end # verify the required parameter 'iteration_item_guid' is set if @api_client.config.client_side_validation && iteration_item_guid.nil? fail ArgumentError, "Missing the required parameter 'iteration_item_guid' when calling SpendingPlanApi.read_spending_plan_iteration_item" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)).sub('{' + 'iteration_item_guid' + '}', CGI.escape(iteration_item_guid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpendingPlanIterationItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.read_spending_plan_iteration_item", :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: SpendingPlanApi#read_spending_plan_iteration_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#read_spending_plan_iteration_with_http_info(user_guid, spending_plan_guid, iteration_number, opts = {}) ⇒ Array<(SpendingPlanIterationResponse, Integer, Hash)>
Read a spending plan iteration Use this endpoint to read the attributes of a specific spending plan `iteration` according to its `iteration_number`.
776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 776 def read_spending_plan_iteration_with_http_info(user_guid, spending_plan_guid, iteration_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.read_spending_plan_iteration ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.read_spending_plan_iteration" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.read_spending_plan_iteration" end # verify the required parameter 'iteration_number' is set if @api_client.config.client_side_validation && iteration_number.nil? fail ArgumentError, "Missing the required parameter 'iteration_number' when calling SpendingPlanApi.read_spending_plan_iteration" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/{iteration_number}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)).sub('{' + 'iteration_number' + '}', CGI.escape(iteration_number.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpendingPlanIterationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.read_spending_plan_iteration", :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: SpendingPlanApi#read_spending_plan_iteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#read_spending_plan_user(user_guid, spending_plan_guid, opts = {}) ⇒ SpendingPlanResponse
Read a spending plan for a user Use this endpoint to read the attributes of a specific spending plan according to its unique GUID.
923 924 925 926 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 923 def read_spending_plan_user(user_guid, spending_plan_guid, opts = {}) data, _status_code, _headers = read_spending_plan_user_with_http_info(user_guid, spending_plan_guid, opts) data end |
#read_spending_plan_user_with_http_info(user_guid, spending_plan_guid, opts = {}) ⇒ Array<(SpendingPlanResponse, Integer, Hash)>
Read a spending plan for a user Use this endpoint to read the attributes of a specific spending plan according to its unique GUID.
936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 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 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 936 def read_spending_plan_user_with_http_info(user_guid, spending_plan_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.read_spending_plan_user ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.read_spending_plan_user" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.read_spending_plan_user" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpendingPlanResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.read_spending_plan_user", :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: SpendingPlanApi#read_spending_plan_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_spending_plan_iteration_item(user_guid, spending_plan_guid, iteration_item_guid, spending_plan_iteration_item_create_request_body, opts = {}) ⇒ SpendingPlanIterationItemResponse
Update a spending plan iteration item Use this endpoint to update an existing ‘spending_plan_iteration_item`.
998 999 1000 1001 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 998 def update_spending_plan_iteration_item(user_guid, spending_plan_guid, iteration_item_guid, spending_plan_iteration_item_create_request_body, opts = {}) data, _status_code, _headers = update_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, spending_plan_iteration_item_create_request_body, opts) data end |
#update_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, spending_plan_iteration_item_create_request_body, opts = {}) ⇒ Array<(SpendingPlanIterationItemResponse, Integer, Hash)>
Update a spending plan iteration item Use this endpoint to update an existing `spending_plan_iteration_item`.
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 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 1068 1069 1070 1071 1072 1073 1074 |
# File 'lib/mx-platform-ruby/api/spending_plan_api.rb', line 1011 def update_spending_plan_iteration_item_with_http_info(user_guid, spending_plan_guid, iteration_item_guid, spending_plan_iteration_item_create_request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpendingPlanApi.update_spending_plan_iteration_item ...' end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? fail ArgumentError, "Missing the required parameter 'user_guid' when calling SpendingPlanApi.update_spending_plan_iteration_item" end # verify the required parameter 'spending_plan_guid' is set if @api_client.config.client_side_validation && spending_plan_guid.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_guid' when calling SpendingPlanApi.update_spending_plan_iteration_item" end # verify the required parameter 'iteration_item_guid' is set if @api_client.config.client_side_validation && iteration_item_guid.nil? fail ArgumentError, "Missing the required parameter 'iteration_item_guid' when calling SpendingPlanApi.update_spending_plan_iteration_item" end # verify the required parameter 'spending_plan_iteration_item_create_request_body' is set if @api_client.config.client_side_validation && spending_plan_iteration_item_create_request_body.nil? fail ArgumentError, "Missing the required parameter 'spending_plan_iteration_item_create_request_body' when calling SpendingPlanApi.update_spending_plan_iteration_item" end # resource path local_var_path = '/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'spending_plan_guid' + '}', CGI.escape(spending_plan_guid.to_s)).sub('{' + 'iteration_item_guid' + '}', CGI.escape(iteration_item_guid.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/vnd.mx.api.v1+json']) unless header_params['Accept'] # 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(spending_plan_iteration_item_create_request_body) # return_type return_type = opts[:debug_return_type] || 'SpendingPlanIterationItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"SpendingPlanApi.update_spending_plan_iteration_item", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpendingPlanApi#update_spending_plan_iteration_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |