mx-platform-ruby 0.38.0 → 0.40.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/docs/AccountResponse.md +2 -0
  4. data/docs/BudgetCreateRequest.md +26 -0
  5. data/docs/BudgetCreateRequestBody.md +18 -0
  6. data/docs/BudgetResponse.md +48 -0
  7. data/docs/BudgetResponseBody.md +18 -0
  8. data/docs/BudgetUpdateRequest.md +22 -0
  9. data/docs/BudgetUpdateRequestBody.md +18 -0
  10. data/docs/BudgetsApi.md +444 -0
  11. data/docs/CreditCardProduct.md +8 -8
  12. data/docs/CreditCardProductResponse.md +2 -2
  13. data/docs/GoalRequest.md +38 -0
  14. data/docs/GoalRequestBody.md +18 -0
  15. data/docs/GoalResponse.md +48 -0
  16. data/docs/GoalResponseBody.md +18 -0
  17. data/docs/GoalsApi.md +450 -0
  18. data/docs/GoalsResponse.md +48 -0
  19. data/docs/GoalsResponseBody.md +20 -0
  20. data/docs/MonthlyCashFlowProfileRequest.md +20 -0
  21. data/docs/MonthlyCashFlowProfileRequestBody.md +18 -0
  22. data/docs/MonthlyCashFlowResponse.md +30 -0
  23. data/docs/MonthlyCashFlowResponseBody.md +18 -0
  24. data/docs/MxPlatformApi.md +291 -0
  25. data/docs/RepositionRequest.md +20 -0
  26. data/docs/RepositionRequestBody.md +18 -0
  27. data/docs/RepositionResponseBody.md +18 -0
  28. data/docs/RewardResponse.md +2 -0
  29. data/docs/RewardsResponse.md +2 -0
  30. data/docs/SplitTransactionRequest.md +24 -0
  31. data/docs/SplitTransactionRequestBody.md +18 -0
  32. data/docs/SplitTransactionsResponseBody.md +18 -0
  33. data/docs/UpdateGoalRequest.md +38 -0
  34. data/docs/UpdateGoalRequestBody.md +18 -0
  35. data/lib/mx-platform-ruby/api/budgets_api.rb +434 -0
  36. data/lib/mx-platform-ruby/api/goals_api.rb +455 -0
  37. data/lib/mx-platform-ruby/api/mx_platform_api.rb +278 -0
  38. data/lib/mx-platform-ruby/models/account_response.rb +11 -1
  39. data/lib/mx-platform-ruby/models/budget_create_request.rb +269 -0
  40. data/lib/mx-platform-ruby/models/budget_create_request_body.rb +214 -0
  41. data/lib/mx-platform-ruby/models/budget_response.rb +373 -0
  42. data/lib/mx-platform-ruby/models/budget_response_body.rb +214 -0
  43. data/lib/mx-platform-ruby/models/budget_update_request.rb +235 -0
  44. data/lib/mx-platform-ruby/models/budget_update_request_body.rb +214 -0
  45. data/lib/mx-platform-ruby/models/credit_card_product.rb +17 -21
  46. data/lib/mx-platform-ruby/models/credit_card_product_response.rb +7 -7
  47. data/lib/mx-platform-ruby/models/goal_request.rb +350 -0
  48. data/lib/mx-platform-ruby/models/goal_request_body.rb +214 -0
  49. data/lib/mx-platform-ruby/models/goal_response.rb +364 -0
  50. data/lib/mx-platform-ruby/models/goal_response_body.rb +214 -0
  51. data/lib/mx-platform-ruby/models/goals_response.rb +363 -0
  52. data/lib/mx-platform-ruby/models/goals_response_body.rb +225 -0
  53. data/lib/mx-platform-ruby/models/monthly_cash_flow_profile_request.rb +225 -0
  54. data/lib/mx-platform-ruby/models/monthly_cash_flow_profile_request_body.rb +214 -0
  55. data/lib/mx-platform-ruby/models/monthly_cash_flow_response.rb +274 -0
  56. data/lib/mx-platform-ruby/models/monthly_cash_flow_response_body.rb +214 -0
  57. data/lib/mx-platform-ruby/models/reposition_request.rb +239 -0
  58. data/lib/mx-platform-ruby/models/reposition_request_body.rb +216 -0
  59. data/lib/mx-platform-ruby/models/reposition_response_body.rb +216 -0
  60. data/lib/mx-platform-ruby/models/reward_response.rb +10 -1
  61. data/lib/mx-platform-ruby/models/rewards_response.rb +10 -1
  62. data/lib/mx-platform-ruby/models/split_transaction_request.rb +252 -0
  63. data/lib/mx-platform-ruby/models/split_transaction_request_body.rb +221 -0
  64. data/lib/mx-platform-ruby/models/split_transactions_response_body.rb +216 -0
  65. data/lib/mx-platform-ruby/models/update_goal_request.rb +315 -0
  66. data/lib/mx-platform-ruby/models/update_goal_request_body.rb +214 -0
  67. data/lib/mx-platform-ruby/version.rb +1 -1
  68. data/lib/mx-platform-ruby.rb +26 -0
  69. data/openapi/config.yml +1 -1
  70. data/spec/api/budgets_api_spec.rb +112 -0
  71. data/spec/api/goals_api_spec.rb +115 -0
  72. data/spec/api/mx_platform_api_spec.rb +51 -0
  73. data/spec/models/account_response_spec.rb +6 -0
  74. data/spec/models/budget_create_request_body_spec.rb +34 -0
  75. data/spec/models/budget_create_request_spec.rb +58 -0
  76. data/spec/models/budget_response_body_spec.rb +34 -0
  77. data/spec/models/budget_response_spec.rb +124 -0
  78. data/spec/models/budget_update_request_body_spec.rb +34 -0
  79. data/spec/models/budget_update_request_spec.rb +46 -0
  80. data/spec/models/credit_card_product_response_spec.rb +1 -1
  81. data/spec/models/credit_card_product_spec.rb +2 -2
  82. data/spec/models/goal_request_body_spec.rb +34 -0
  83. data/spec/models/goal_request_spec.rb +94 -0
  84. data/spec/models/goal_response_body_spec.rb +34 -0
  85. data/spec/models/goal_response_spec.rb +124 -0
  86. data/spec/models/goals_response_body_spec.rb +40 -0
  87. data/spec/models/goals_response_spec.rb +124 -0
  88. data/spec/models/monthly_cash_flow_profile_request_body_spec.rb +34 -0
  89. data/spec/models/monthly_cash_flow_profile_request_spec.rb +40 -0
  90. data/spec/models/monthly_cash_flow_response_body_spec.rb +34 -0
  91. data/spec/models/monthly_cash_flow_response_spec.rb +70 -0
  92. data/spec/models/reposition_request_body_spec.rb +34 -0
  93. data/spec/models/reposition_request_spec.rb +40 -0
  94. data/spec/models/reposition_response_body_spec.rb +34 -0
  95. data/spec/models/reward_response_spec.rb +6 -0
  96. data/spec/models/rewards_response_spec.rb +6 -0
  97. data/spec/models/split_transaction_request_body_spec.rb +34 -0
  98. data/spec/models/split_transaction_request_spec.rb +52 -0
  99. data/spec/models/split_transactions_response_body_spec.rb +34 -0
  100. data/spec/models/update_goal_request_body_spec.rb +34 -0
  101. data/spec/models/update_goal_request_spec.rb +94 -0
  102. metadata +106 -2
@@ -7439,6 +7439,284 @@ module MxPlatformRuby
7439
7439
  return data, status_code, headers
7440
7440
  end
7441
7441
 
7442
+ # Read monthly cash flow profile
7443
+ # @param user_guid [String] The unique identifier for the user.
7444
+ # @param [Hash] opts the optional parameters
7445
+ # @return [MonthlyCashFlowResponseBody]
7446
+ def users_user_guid_monthly_cash_flow_profile_get(user_guid, opts = {})
7447
+ data, _status_code, _headers = users_user_guid_monthly_cash_flow_profile_get_with_http_info(user_guid, opts)
7448
+ data
7449
+ end
7450
+
7451
+ # Read monthly cash flow profile
7452
+ # @param user_guid [String] The unique identifier for the user.
7453
+ # @param [Hash] opts the optional parameters
7454
+ # @return [Array<(MonthlyCashFlowResponseBody, Integer, Hash)>] MonthlyCashFlowResponseBody data, response status code and response headers
7455
+ def users_user_guid_monthly_cash_flow_profile_get_with_http_info(user_guid, opts = {})
7456
+ if @api_client.config.debugging
7457
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.users_user_guid_monthly_cash_flow_profile_get ...'
7458
+ end
7459
+ # verify the required parameter 'user_guid' is set
7460
+ if @api_client.config.client_side_validation && user_guid.nil?
7461
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.users_user_guid_monthly_cash_flow_profile_get"
7462
+ end
7463
+ # resource path
7464
+ local_var_path = '/users/{user_guid}/monthly_cash_flow_profile'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
7465
+
7466
+ # query parameters
7467
+ query_params = opts[:query_params] || {}
7468
+
7469
+ # header parameters
7470
+ header_params = opts[:header_params] || {}
7471
+ # HTTP header 'Accept' (if needed)
7472
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
7473
+
7474
+ # form parameters
7475
+ form_params = opts[:form_params] || {}
7476
+
7477
+ # http body (model)
7478
+ post_body = opts[:debug_body]
7479
+
7480
+ # return_type
7481
+ return_type = opts[:debug_return_type] || 'MonthlyCashFlowResponseBody'
7482
+
7483
+ # auth_names
7484
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
7485
+
7486
+ new_options = opts.merge(
7487
+ :operation => :"MxPlatformApi.users_user_guid_monthly_cash_flow_profile_get",
7488
+ :header_params => header_params,
7489
+ :query_params => query_params,
7490
+ :form_params => form_params,
7491
+ :body => post_body,
7492
+ :auth_names => auth_names,
7493
+ :return_type => return_type
7494
+ )
7495
+
7496
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
7497
+ if @api_client.config.debugging
7498
+ @api_client.config.logger.debug "API called: MxPlatformApi#users_user_guid_monthly_cash_flow_profile_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
7499
+ end
7500
+ return data, status_code, headers
7501
+ end
7502
+
7503
+ # Update monthly cash flow profile
7504
+ # Use this endpoint to update the attributes of a `monthly_cash_flow_profile`.
7505
+ # @param user_guid [String] The unique identifier for the user.
7506
+ # @param monthly_cash_flow_profile_request_body [MonthlyCashFlowProfileRequestBody]
7507
+ # @param [Hash] opts the optional parameters
7508
+ # @return [MonthlyCashFlowResponseBody]
7509
+ def users_user_guid_monthly_cash_flow_profile_put(user_guid, monthly_cash_flow_profile_request_body, opts = {})
7510
+ data, _status_code, _headers = users_user_guid_monthly_cash_flow_profile_put_with_http_info(user_guid, monthly_cash_flow_profile_request_body, opts)
7511
+ data
7512
+ end
7513
+
7514
+ # Update monthly cash flow profile
7515
+ # Use this endpoint to update the attributes of a &#x60;monthly_cash_flow_profile&#x60;.
7516
+ # @param user_guid [String] The unique identifier for the user.
7517
+ # @param monthly_cash_flow_profile_request_body [MonthlyCashFlowProfileRequestBody]
7518
+ # @param [Hash] opts the optional parameters
7519
+ # @return [Array<(MonthlyCashFlowResponseBody, Integer, Hash)>] MonthlyCashFlowResponseBody data, response status code and response headers
7520
+ def users_user_guid_monthly_cash_flow_profile_put_with_http_info(user_guid, monthly_cash_flow_profile_request_body, opts = {})
7521
+ if @api_client.config.debugging
7522
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.users_user_guid_monthly_cash_flow_profile_put ...'
7523
+ end
7524
+ # verify the required parameter 'user_guid' is set
7525
+ if @api_client.config.client_side_validation && user_guid.nil?
7526
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.users_user_guid_monthly_cash_flow_profile_put"
7527
+ end
7528
+ # verify the required parameter 'monthly_cash_flow_profile_request_body' is set
7529
+ if @api_client.config.client_side_validation && monthly_cash_flow_profile_request_body.nil?
7530
+ fail ArgumentError, "Missing the required parameter 'monthly_cash_flow_profile_request_body' when calling MxPlatformApi.users_user_guid_monthly_cash_flow_profile_put"
7531
+ end
7532
+ # resource path
7533
+ local_var_path = '/users/{user_guid}/monthly_cash_flow_profile'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
7534
+
7535
+ # query parameters
7536
+ query_params = opts[:query_params] || {}
7537
+
7538
+ # header parameters
7539
+ header_params = opts[:header_params] || {}
7540
+ # HTTP header 'Accept' (if needed)
7541
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
7542
+ # HTTP header 'Content-Type'
7543
+ content_type = @api_client.select_header_content_type(['application/json'])
7544
+ if !content_type.nil?
7545
+ header_params['Content-Type'] = content_type
7546
+ end
7547
+
7548
+ # form parameters
7549
+ form_params = opts[:form_params] || {}
7550
+
7551
+ # http body (model)
7552
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(monthly_cash_flow_profile_request_body)
7553
+
7554
+ # return_type
7555
+ return_type = opts[:debug_return_type] || 'MonthlyCashFlowResponseBody'
7556
+
7557
+ # auth_names
7558
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
7559
+
7560
+ new_options = opts.merge(
7561
+ :operation => :"MxPlatformApi.users_user_guid_monthly_cash_flow_profile_put",
7562
+ :header_params => header_params,
7563
+ :query_params => query_params,
7564
+ :form_params => form_params,
7565
+ :body => post_body,
7566
+ :auth_names => auth_names,
7567
+ :return_type => return_type
7568
+ )
7569
+
7570
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
7571
+ if @api_client.config.debugging
7572
+ @api_client.config.logger.debug "API called: MxPlatformApi#users_user_guid_monthly_cash_flow_profile_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
7573
+ end
7574
+ return data, status_code, headers
7575
+ end
7576
+
7577
+ # Delete split transactions
7578
+ # This endpoint deletes all split transactions linked to a parent transaction, but it leaves the parent transaction active. This request will also update the parent transaction's has_been_split field to false. This endpoint accepts the optional MX-Skip-Webhook header.
7579
+ # @param transaction_guid [String] The unique id for a &#x60;transaction&#x60;.
7580
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
7581
+ # @param [Hash] opts the optional parameters
7582
+ # @return [nil]
7583
+ def users_user_guid_transactions_transaction_guid_split_delete(transaction_guid, user_guid, opts = {})
7584
+ users_user_guid_transactions_transaction_guid_split_delete_with_http_info(transaction_guid, user_guid, opts)
7585
+ nil
7586
+ end
7587
+
7588
+ # Delete split transactions
7589
+ # This endpoint deletes all split transactions linked to a parent transaction, but it leaves the parent transaction active. This request will also update the parent transaction&#39;s has_been_split field to false. This endpoint accepts the optional MX-Skip-Webhook header.
7590
+ # @param transaction_guid [String] The unique id for a &#x60;transaction&#x60;.
7591
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
7592
+ # @param [Hash] opts the optional parameters
7593
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
7594
+ def users_user_guid_transactions_transaction_guid_split_delete_with_http_info(transaction_guid, user_guid, opts = {})
7595
+ if @api_client.config.debugging
7596
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.users_user_guid_transactions_transaction_guid_split_delete ...'
7597
+ end
7598
+ # verify the required parameter 'transaction_guid' is set
7599
+ if @api_client.config.client_side_validation && transaction_guid.nil?
7600
+ fail ArgumentError, "Missing the required parameter 'transaction_guid' when calling MxPlatformApi.users_user_guid_transactions_transaction_guid_split_delete"
7601
+ end
7602
+ # verify the required parameter 'user_guid' is set
7603
+ if @api_client.config.client_side_validation && user_guid.nil?
7604
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.users_user_guid_transactions_transaction_guid_split_delete"
7605
+ end
7606
+ # resource path
7607
+ local_var_path = '/users/{user_guid}/transactions/{transaction_guid}/split'.sub('{' + 'transaction_guid' + '}', CGI.escape(transaction_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
7608
+
7609
+ # query parameters
7610
+ query_params = opts[:query_params] || {}
7611
+
7612
+ # header parameters
7613
+ header_params = opts[:header_params] || {}
7614
+
7615
+ # form parameters
7616
+ form_params = opts[:form_params] || {}
7617
+
7618
+ # http body (model)
7619
+ post_body = opts[:debug_body]
7620
+
7621
+ # return_type
7622
+ return_type = opts[:debug_return_type]
7623
+
7624
+ # auth_names
7625
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
7626
+
7627
+ new_options = opts.merge(
7628
+ :operation => :"MxPlatformApi.users_user_guid_transactions_transaction_guid_split_delete",
7629
+ :header_params => header_params,
7630
+ :query_params => query_params,
7631
+ :form_params => form_params,
7632
+ :body => post_body,
7633
+ :auth_names => auth_names,
7634
+ :return_type => return_type
7635
+ )
7636
+
7637
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
7638
+ if @api_client.config.debugging
7639
+ @api_client.config.logger.debug "API called: MxPlatformApi#users_user_guid_transactions_transaction_guid_split_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
7640
+ end
7641
+ return data, status_code, headers
7642
+ end
7643
+
7644
+ # Create split transactions
7645
+ # This endpoint creates two or more child transactions that are branched from a previous transaction. This endpoint allows you to link multiple categories, descriptions, and amounts to a parent transaction. When a split transaction is created, the parent transaction's `has_been_split` field will automatically be updated to true and the child transactions' `parent_guid` will have the transaction guid of the parent. The total amount of the child transactions must equal the amount of the parent transaction. Once a transaction has been split it can't be split again. In order to re-split a transaction, it must first be un-split. This can be done by calling the Delete Split Transactions endpoint. Calling this endpoint will delete the existing child transactions and update the parent transaction's `has_been_split` field to false. You can then re-split the parent transaction by calling Create Split Transaction again.
7646
+ # @param user_guid [String] The unique identifier for the user. Defined by MX.
7647
+ # @param transaction_guid [String] The unique identifier for the transaction. Defined by MX.
7648
+ # @param [Hash] opts the optional parameters
7649
+ # @option opts [SplitTransactionRequestBody] :split_transaction_request_body
7650
+ # @return [SplitTransactionsResponseBody]
7651
+ def users_user_guid_transactions_transaction_guid_split_post(user_guid, transaction_guid, opts = {})
7652
+ data, _status_code, _headers = users_user_guid_transactions_transaction_guid_split_post_with_http_info(user_guid, transaction_guid, opts)
7653
+ data
7654
+ end
7655
+
7656
+ # Create split transactions
7657
+ # This endpoint creates two or more child transactions that are branched from a previous transaction. This endpoint allows you to link multiple categories, descriptions, and amounts to a parent transaction. When a split transaction is created, the parent transaction&#39;s &#x60;has_been_split&#x60; field will automatically be updated to true and the child transactions&#39; &#x60;parent_guid&#x60; will have the transaction guid of the parent. The total amount of the child transactions must equal the amount of the parent transaction. Once a transaction has been split it can&#39;t be split again. In order to re-split a transaction, it must first be un-split. This can be done by calling the Delete Split Transactions endpoint. Calling this endpoint will delete the existing child transactions and update the parent transaction&#39;s &#x60;has_been_split&#x60; field to false. You can then re-split the parent transaction by calling Create Split Transaction again.
7658
+ # @param user_guid [String] The unique identifier for the user. Defined by MX.
7659
+ # @param transaction_guid [String] The unique identifier for the transaction. Defined by MX.
7660
+ # @param [Hash] opts the optional parameters
7661
+ # @option opts [SplitTransactionRequestBody] :split_transaction_request_body
7662
+ # @return [Array<(SplitTransactionsResponseBody, Integer, Hash)>] SplitTransactionsResponseBody data, response status code and response headers
7663
+ def users_user_guid_transactions_transaction_guid_split_post_with_http_info(user_guid, transaction_guid, opts = {})
7664
+ if @api_client.config.debugging
7665
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.users_user_guid_transactions_transaction_guid_split_post ...'
7666
+ end
7667
+ # verify the required parameter 'user_guid' is set
7668
+ if @api_client.config.client_side_validation && user_guid.nil?
7669
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.users_user_guid_transactions_transaction_guid_split_post"
7670
+ end
7671
+ # verify the required parameter 'transaction_guid' is set
7672
+ if @api_client.config.client_side_validation && transaction_guid.nil?
7673
+ fail ArgumentError, "Missing the required parameter 'transaction_guid' when calling MxPlatformApi.users_user_guid_transactions_transaction_guid_split_post"
7674
+ end
7675
+ # resource path
7676
+ local_var_path = '/users/{user_guid}/transactions/{transaction_guid}/split'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'transaction_guid' + '}', CGI.escape(transaction_guid.to_s))
7677
+
7678
+ # query parameters
7679
+ query_params = opts[:query_params] || {}
7680
+
7681
+ # header parameters
7682
+ header_params = opts[:header_params] || {}
7683
+ # HTTP header 'Accept' (if needed)
7684
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
7685
+ # HTTP header 'Content-Type'
7686
+ content_type = @api_client.select_header_content_type(['application/json'])
7687
+ if !content_type.nil?
7688
+ header_params['Content-Type'] = content_type
7689
+ end
7690
+
7691
+ # form parameters
7692
+ form_params = opts[:form_params] || {}
7693
+
7694
+ # http body (model)
7695
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'split_transaction_request_body'])
7696
+
7697
+ # return_type
7698
+ return_type = opts[:debug_return_type] || 'SplitTransactionsResponseBody'
7699
+
7700
+ # auth_names
7701
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
7702
+
7703
+ new_options = opts.merge(
7704
+ :operation => :"MxPlatformApi.users_user_guid_transactions_transaction_guid_split_post",
7705
+ :header_params => header_params,
7706
+ :query_params => query_params,
7707
+ :form_params => form_params,
7708
+ :body => post_body,
7709
+ :auth_names => auth_names,
7710
+ :return_type => return_type
7711
+ )
7712
+
7713
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
7714
+ if @api_client.config.debugging
7715
+ @api_client.config.logger.debug "API called: MxPlatformApi#users_user_guid_transactions_transaction_guid_split_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
7716
+ end
7717
+ return data, status_code, headers
7718
+ end
7719
+
7442
7720
  # Verify member
7443
7721
  # The verify endpoint begins a verification process for a member.
7444
7722
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
@@ -111,6 +111,8 @@ module MxPlatformRuby
111
111
 
112
112
  attr_accessor :started_on
113
113
 
114
+ attr_accessor :statement_balance
115
+
114
116
  attr_accessor :subtype
115
117
 
116
118
  attr_accessor :today_ugl_amount
@@ -180,6 +182,7 @@ module MxPlatformRuby
180
182
  :'property_type' => :'property_type',
181
183
  :'routing_number' => :'routing_number',
182
184
  :'started_on' => :'started_on',
185
+ :'statement_balance' => :'statement_balance',
183
186
  :'subtype' => :'subtype',
184
187
  :'today_ugl_amount' => :'today_ugl_amount',
185
188
  :'today_ugl_percentage' => :'today_ugl_percentage',
@@ -248,6 +251,7 @@ module MxPlatformRuby
248
251
  :'property_type' => :'String',
249
252
  :'routing_number' => :'String',
250
253
  :'started_on' => :'String',
254
+ :'statement_balance' => :'Float',
251
255
  :'subtype' => :'String',
252
256
  :'today_ugl_amount' => :'Float',
253
257
  :'today_ugl_percentage' => :'Float',
@@ -310,6 +314,7 @@ module MxPlatformRuby
310
314
  :'property_type',
311
315
  :'routing_number',
312
316
  :'started_on',
317
+ :'statement_balance',
313
318
  :'subtype',
314
319
  :'today_ugl_amount',
315
320
  :'today_ugl_percentage',
@@ -529,6 +534,10 @@ module MxPlatformRuby
529
534
  self.started_on = attributes[:'started_on']
530
535
  end
531
536
 
537
+ if attributes.key?(:'statement_balance')
538
+ self.statement_balance = attributes[:'statement_balance']
539
+ end
540
+
532
541
  if attributes.key?(:'subtype')
533
542
  self.subtype = attributes[:'subtype']
534
543
  end
@@ -634,6 +643,7 @@ module MxPlatformRuby
634
643
  property_type == o.property_type &&
635
644
  routing_number == o.routing_number &&
636
645
  started_on == o.started_on &&
646
+ statement_balance == o.statement_balance &&
637
647
  subtype == o.subtype &&
638
648
  today_ugl_amount == o.today_ugl_amount &&
639
649
  today_ugl_percentage == o.today_ugl_percentage &&
@@ -654,7 +664,7 @@ module MxPlatformRuby
654
664
  # Calculates hash code according to all attributes.
655
665
  # @return [Integer] Hash code
656
666
  def hash
657
- [account_number, account_ownership, annuity_policy_to_date, annuity_provider, annuity_term_year, apr, apy, available_balance, available_credit, balance, cash_balance, cash_surrender_value, created_at, credit_limit, currency_code, day_payment_is_due, death_benefit, guid, holdings_value, id, imported_at, institution_code, insured_name, interest_rate, is_closed, is_hidden, is_manual, last_payment, last_payment_at, loan_amount, margin_balance, matures_on, member_guid, member_id, member_is_managed_by_user, metadata, minimum_balance, minimum_payment, name, nickname, original_balance, pay_out_amount, payment_due_at, payoff_balance, premium_amount, property_type, routing_number, started_on, subtype, today_ugl_amount, today_ugl_percentage, total_account_value, total_account_value_ugl, type, updated_at, user_guid, user_id].hash
667
+ [account_number, account_ownership, annuity_policy_to_date, annuity_provider, annuity_term_year, apr, apy, available_balance, available_credit, balance, cash_balance, cash_surrender_value, created_at, credit_limit, currency_code, day_payment_is_due, death_benefit, guid, holdings_value, id, imported_at, institution_code, insured_name, interest_rate, is_closed, is_hidden, is_manual, last_payment, last_payment_at, loan_amount, margin_balance, matures_on, member_guid, member_id, member_is_managed_by_user, metadata, minimum_balance, minimum_payment, name, nickname, original_balance, pay_out_amount, payment_due_at, payoff_balance, premium_amount, property_type, routing_number, started_on, statement_balance, subtype, today_ugl_amount, today_ugl_percentage, total_account_value, total_account_value_ugl, type, updated_at, user_guid, user_id].hash
658
668
  end
659
669
 
660
670
  # Builds the object from hash
@@ -0,0 +1,269 @@
1
+ =begin
2
+ #MX Platform API
3
+
4
+ #The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MxPlatformRuby
17
+ class BudgetCreateRequest
18
+ # Unique identifier of the category.
19
+ attr_accessor :category_guid
20
+
21
+ # Unique identifier of the parent budget. This is only required when creating a budget on a sub-category.
22
+ attr_accessor :parent_guid
23
+
24
+ # Amount of the budget.
25
+ attr_accessor :amount
26
+
27
+ # Additional information a partner can store on the budget.
28
+ attr_accessor :metadata
29
+
30
+ # When set to true, this parameter will prevent a webhook from being triggered by the request.
31
+ attr_accessor :skip_webhook
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'category_guid' => :'category_guid',
37
+ :'parent_guid' => :'parent_guid',
38
+ :'amount' => :'amount',
39
+ :'metadata' => :'metadata',
40
+ :'skip_webhook' => :'skip_webhook'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'category_guid' => :'String',
53
+ :'parent_guid' => :'String',
54
+ :'amount' => :'Integer',
55
+ :'metadata' => :'String',
56
+ :'skip_webhook' => :'Boolean'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::BudgetCreateRequest` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::BudgetCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'category_guid')
82
+ self.category_guid = attributes[:'category_guid']
83
+ else
84
+ self.category_guid = nil
85
+ end
86
+
87
+ if attributes.key?(:'parent_guid')
88
+ self.parent_guid = attributes[:'parent_guid']
89
+ else
90
+ self.parent_guid = nil
91
+ end
92
+
93
+ if attributes.key?(:'amount')
94
+ self.amount = attributes[:'amount']
95
+ end
96
+
97
+ if attributes.key?(:'metadata')
98
+ self.metadata = attributes[:'metadata']
99
+ end
100
+
101
+ if attributes.key?(:'skip_webhook')
102
+ self.skip_webhook = attributes[:'skip_webhook']
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
110
+ invalid_properties = Array.new
111
+ if @category_guid.nil?
112
+ invalid_properties.push('invalid value for "category_guid", category_guid cannot be nil.')
113
+ end
114
+
115
+ if @parent_guid.nil?
116
+ invalid_properties.push('invalid value for "parent_guid", parent_guid cannot be nil.')
117
+ end
118
+
119
+ invalid_properties
120
+ end
121
+
122
+ # Check to see if the all the properties in the model are valid
123
+ # @return true if the model is valid
124
+ def valid?
125
+ warn '[DEPRECATED] the `valid?` method is obsolete'
126
+ return false if @category_guid.nil?
127
+ return false if @parent_guid.nil?
128
+ true
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ category_guid == o.category_guid &&
137
+ parent_guid == o.parent_guid &&
138
+ amount == o.amount &&
139
+ metadata == o.metadata &&
140
+ skip_webhook == o.skip_webhook
141
+ end
142
+
143
+ # @see the `==` method
144
+ # @param [Object] Object to be compared
145
+ def eql?(o)
146
+ self == o
147
+ end
148
+
149
+ # Calculates hash code according to all attributes.
150
+ # @return [Integer] Hash code
151
+ def hash
152
+ [category_guid, parent_guid, amount, metadata, skip_webhook].hash
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def self.build_from_hash(attributes)
159
+ return nil unless attributes.is_a?(Hash)
160
+ attributes = attributes.transform_keys(&:to_sym)
161
+ transformed_hash = {}
162
+ openapi_types.each_pair do |key, type|
163
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
164
+ transformed_hash["#{key}"] = nil
165
+ elsif type =~ /\AArray<(.*)>/i
166
+ # check to ensure the input is an array given that the attribute
167
+ # is documented as an array but the input is not
168
+ if attributes[attribute_map[key]].is_a?(Array)
169
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
170
+ end
171
+ elsif !attributes[attribute_map[key]].nil?
172
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
173
+ end
174
+ end
175
+ new(transformed_hash)
176
+ end
177
+
178
+ # Deserializes the data based on type
179
+ # @param string type Data type
180
+ # @param string value Value to be deserialized
181
+ # @return [Object] Deserialized data
182
+ def self._deserialize(type, value)
183
+ case type.to_sym
184
+ when :Time
185
+ Time.parse(value)
186
+ when :Date
187
+ Date.parse(value)
188
+ when :String
189
+ value.to_s
190
+ when :Integer
191
+ value.to_i
192
+ when :Float
193
+ value.to_f
194
+ when :Boolean
195
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
196
+ true
197
+ else
198
+ false
199
+ end
200
+ when :Object
201
+ # generic object (usually a Hash), return directly
202
+ value
203
+ when /\AArray<(?<inner_type>.+)>\z/
204
+ inner_type = Regexp.last_match[:inner_type]
205
+ value.map { |v| _deserialize(inner_type, v) }
206
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
207
+ k_type = Regexp.last_match[:k_type]
208
+ v_type = Regexp.last_match[:v_type]
209
+ {}.tap do |hash|
210
+ value.each do |k, v|
211
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
212
+ end
213
+ end
214
+ else # model
215
+ # models (e.g. Pet) or oneOf
216
+ klass = MxPlatformRuby.const_get(type)
217
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
218
+ end
219
+ end
220
+
221
+ # Returns the string representation of the object
222
+ # @return [String] String presentation of the object
223
+ def to_s
224
+ to_hash.to_s
225
+ end
226
+
227
+ # to_body is an alias to to_hash (backward compatibility)
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_body
230
+ to_hash
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = self.send(attr)
239
+ if value.nil?
240
+ is_nullable = self.class.openapi_nullable.include?(attr)
241
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
+ end
243
+
244
+ hash[param] = _to_hash(value)
245
+ end
246
+ hash
247
+ end
248
+
249
+ # Outputs non-array value in the form of hash
250
+ # For object, use to_hash. Otherwise, just return the value
251
+ # @param [Object] value Any valid value
252
+ # @return [Hash] Returns the value in the form of hash
253
+ def _to_hash(value)
254
+ if value.is_a?(Array)
255
+ value.compact.map { |v| _to_hash(v) }
256
+ elsif value.is_a?(Hash)
257
+ {}.tap do |hash|
258
+ value.each { |k, v| hash[k] = _to_hash(v) }
259
+ end
260
+ elsif value.respond_to? :to_hash
261
+ value.to_hash
262
+ else
263
+ value
264
+ end
265
+ end
266
+
267
+ end
268
+
269
+ end