apimatic-mx-apis-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +207 -0
- data/bin/console +15 -0
- data/lib/mx_platform_api/api_helper.rb +10 -0
- data/lib/mx_platform_api/apis/accounts_api.rb +619 -0
- data/lib/mx_platform_api/apis/ach_return_api.rb +115 -0
- data/lib/mx_platform_api/apis/base_api.rb +67 -0
- data/lib/mx_platform_api/apis/budgets_api.rb +212 -0
- data/lib/mx_platform_api/apis/categories_api.rb +377 -0
- data/lib/mx_platform_api/apis/goals_api.rb +223 -0
- data/lib/mx_platform_api/apis/insights_api.rb +415 -0
- data/lib/mx_platform_api/apis/institutions_api.rb +159 -0
- data/lib/mx_platform_api/apis/investment_holdings_api.rb +191 -0
- data/lib/mx_platform_api/apis/jobs_api.rb +48 -0
- data/lib/mx_platform_api/apis/managed_data_deprecated_api.rb +773 -0
- data/lib/mx_platform_api/apis/members_api.rb +639 -0
- data/lib/mx_platform_api/apis/merchants_api.rb +98 -0
- data/lib/mx_platform_api/apis/microdeposits_api.rb +219 -0
- data/lib/mx_platform_api/apis/monthly_cash_flow_profile_api.rb +75 -0
- data/lib/mx_platform_api/apis/notifications_api.rb +115 -0
- data/lib/mx_platform_api/apis/processor_token_api.rb +141 -0
- data/lib/mx_platform_api/apis/rewards_api.rb +149 -0
- data/lib/mx_platform_api/apis/spending_plan_api.rb +621 -0
- data/lib/mx_platform_api/apis/statements_api.rb +165 -0
- data/lib/mx_platform_api/apis/taggings_api.rb +184 -0
- data/lib/mx_platform_api/apis/tags_api.rb +185 -0
- data/lib/mx_platform_api/apis/transaction_rules_api.rb +163 -0
- data/lib/mx_platform_api/apis/transactions_api.rb +1223 -0
- data/lib/mx_platform_api/apis/users_api.rb +188 -0
- data/lib/mx_platform_api/apis/verifiable_credentials_api.rb +114 -0
- data/lib/mx_platform_api/apis/widgets_api.rb +135 -0
- data/lib/mx_platform_api/client.rb +225 -0
- data/lib/mx_platform_api/configuration.rb +182 -0
- data/lib/mx_platform_api/exceptions/api_exception.rb +21 -0
- data/lib/mx_platform_api/http/api_response.rb +19 -0
- data/lib/mx_platform_api/http/auth/basic_auth.rb +62 -0
- data/lib/mx_platform_api/http/auth/bearer_auth.rb +53 -0
- data/lib/mx_platform_api/http/http_call_back.rb +10 -0
- data/lib/mx_platform_api/http/http_method_enum.rb +10 -0
- data/lib/mx_platform_api/http/http_request.rb +10 -0
- data/lib/mx_platform_api/http/http_response.rb +10 -0
- data/lib/mx_platform_api/http/proxy_settings.rb +22 -0
- data/lib/mx_platform_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/mx_platform_api/logging/sdk_logger.rb +17 -0
- data/lib/mx_platform_api/models/account_create_request.rb +309 -0
- data/lib/mx_platform_api/models/account_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/account_number.rb +199 -0
- data/lib/mx_platform_api/models/account_number_response.rb +215 -0
- data/lib/mx_platform_api/models/account_numbers_response_body.rb +95 -0
- data/lib/mx_platform_api/models/account_owner.rb +186 -0
- data/lib/mx_platform_api/models/account_owner_response.rb +219 -0
- data/lib/mx_platform_api/models/account_owners_response_body.rb +95 -0
- data/lib/mx_platform_api/models/account_ownership.rb +45 -0
- data/lib/mx_platform_api/models/account_response.rb +814 -0
- data/lib/mx_platform_api/models/account_response_body.rb +75 -0
- data/lib/mx_platform_api/models/account_type.rb +80 -0
- data/lib/mx_platform_api/models/account_type1.rb +80 -0
- data/lib/mx_platform_api/models/account_update_request.rb +301 -0
- data/lib/mx_platform_api/models/account_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/accounts_merge_request.rb +75 -0
- data/lib/mx_platform_api/models/accounts_merge_request_body.rb +75 -0
- data/lib/mx_platform_api/models/accounts_response_body.rb +94 -0
- data/lib/mx_platform_api/models/ach_response.rb +424 -0
- data/lib/mx_platform_api/models/ach_return_create_request.rb +256 -0
- data/lib/mx_platform_api/models/ach_return_create_request_body.rb +76 -0
- data/lib/mx_platform_api/models/ach_return_response_body.rb +76 -0
- data/lib/mx_platform_api/models/ach_returns_response_body.rb +95 -0
- data/lib/mx_platform_api/models/authorization_code_request.rb +77 -0
- data/lib/mx_platform_api/models/authorization_code_request_body.rb +77 -0
- data/lib/mx_platform_api/models/authorization_code_response.rb +76 -0
- data/lib/mx_platform_api/models/authorization_code_response_body.rb +77 -0
- data/lib/mx_platform_api/models/base_model.rb +110 -0
- data/lib/mx_platform_api/models/budget_create_request.rb +115 -0
- data/lib/mx_platform_api/models/budget_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/budget_response.rb +246 -0
- data/lib/mx_platform_api/models/budget_response_body.rb +75 -0
- data/lib/mx_platform_api/models/budget_update_request.rb +96 -0
- data/lib/mx_platform_api/models/budget_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/categories_response_body.rb +95 -0
- data/lib/mx_platform_api/models/category_create_request.rb +93 -0
- data/lib/mx_platform_api/models/category_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/category_response.rb +160 -0
- data/lib/mx_platform_api/models/category_response_body.rb +75 -0
- data/lib/mx_platform_api/models/category_update_request.rb +85 -0
- data/lib/mx_platform_api/models/category_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/challenge_response.rb +159 -0
- data/lib/mx_platform_api/models/challenges_response_body.rb +95 -0
- data/lib/mx_platform_api/models/channel.rb +47 -0
- data/lib/mx_platform_api/models/classification.rb +85 -0
- data/lib/mx_platform_api/models/color_scheme.rb +43 -0
- data/lib/mx_platform_api/models/connection_status.rb +118 -0
- data/lib/mx_platform_api/models/credential_request.rb +85 -0
- data/lib/mx_platform_api/models/credential_response.rb +133 -0
- data/lib/mx_platform_api/models/credentials_response_body.rb +95 -0
- data/lib/mx_platform_api/models/credit_card_product.rb +276 -0
- data/lib/mx_platform_api/models/credit_card_product_response.rb +77 -0
- data/lib/mx_platform_api/models/data_request.rb +76 -0
- data/lib/mx_platform_api/models/date_range.rb +87 -0
- data/lib/mx_platform_api/models/date_range_category_totals_response.rb +115 -0
- data/lib/mx_platform_api/models/date_range_category_totals_response_body.rb +88 -0
- data/lib/mx_platform_api/models/deep_link_params.rb +131 -0
- data/lib/mx_platform_api/models/enhance_transaction_response.rb +371 -0
- data/lib/mx_platform_api/models/enhance_transactions_request.rb +143 -0
- data/lib/mx_platform_api/models/enhance_transactions_request_body.rb +85 -0
- data/lib/mx_platform_api/models/enhance_transactions_response_body.rb +85 -0
- data/lib/mx_platform_api/models/error.rb +106 -0
- data/lib/mx_platform_api/models/federal_insurance_status.rb +42 -0
- data/lib/mx_platform_api/models/geolocation.rb +108 -0
- data/lib/mx_platform_api/models/goal_request.rb +179 -0
- data/lib/mx_platform_api/models/goal_request_body.rb +74 -0
- data/lib/mx_platform_api/models/goal_response.rb +241 -0
- data/lib/mx_platform_api/models/goal_response_body.rb +74 -0
- data/lib/mx_platform_api/models/goal_type_name.rb +36 -0
- data/lib/mx_platform_api/models/goals_response.rb +241 -0
- data/lib/mx_platform_api/models/goals_response_body.rb +94 -0
- data/lib/mx_platform_api/models/image_option_response.rb +110 -0
- data/lib/mx_platform_api/models/insight_response.rb +338 -0
- data/lib/mx_platform_api/models/insight_response_body.rb +75 -0
- data/lib/mx_platform_api/models/insight_update_request.rb +87 -0
- data/lib/mx_platform_api/models/insight_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/insights_response_body.rb +94 -0
- data/lib/mx_platform_api/models/institution_response.rb +290 -0
- data/lib/mx_platform_api/models/institution_response_body.rb +76 -0
- data/lib/mx_platform_api/models/institutions_response_body.rb +95 -0
- data/lib/mx_platform_api/models/investment_holding_response.rb +513 -0
- data/lib/mx_platform_api/models/investment_holding_response_body.rb +77 -0
- data/lib/mx_platform_api/models/investment_holdings_deactivation.rb +85 -0
- data/lib/mx_platform_api/models/investment_holdings_response_body.rb +95 -0
- data/lib/mx_platform_api/models/iso_country_code.rb +36 -0
- data/lib/mx_platform_api/models/item_type.rb +52 -0
- data/lib/mx_platform_api/models/job_response.rb +203 -0
- data/lib/mx_platform_api/models/job_response_body.rb +74 -0
- data/lib/mx_platform_api/models/managed_account_create_request.rb +422 -0
- data/lib/mx_platform_api/models/managed_account_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/managed_account_update_request.rb +428 -0
- data/lib/mx_platform_api/models/managed_account_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/managed_member_create_request.rb +105 -0
- data/lib/mx_platform_api/models/managed_member_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/managed_member_update_request.rb +95 -0
- data/lib/mx_platform_api/models/managed_member_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/managed_transaction_create_request.rb +282 -0
- data/lib/mx_platform_api/models/managed_transaction_create_request_body.rb +77 -0
- data/lib/mx_platform_api/models/managed_transaction_update_request.rb +289 -0
- data/lib/mx_platform_api/models/managed_transaction_update_request_body.rb +77 -0
- data/lib/mx_platform_api/models/member_create_request.rb +154 -0
- data/lib/mx_platform_api/models/member_create_request_body.rb +152 -0
- data/lib/mx_platform_api/models/member_elements.rb +96 -0
- data/lib/mx_platform_api/models/member_response.rb +406 -0
- data/lib/mx_platform_api/models/member_response_body.rb +75 -0
- data/lib/mx_platform_api/models/member_response_with_job_error.rb +406 -0
- data/lib/mx_platform_api/models/member_response_with_job_error_body.rb +75 -0
- data/lib/mx_platform_api/models/member_resume_request.rb +85 -0
- data/lib/mx_platform_api/models/member_resume_request_body.rb +75 -0
- data/lib/mx_platform_api/models/member_status_response.rb +236 -0
- data/lib/mx_platform_api/models/member_status_response_body.rb +75 -0
- data/lib/mx_platform_api/models/member_update_request.rb +133 -0
- data/lib/mx_platform_api/models/member_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/members_response_body.rb +94 -0
- data/lib/mx_platform_api/models/merchant.rb +105 -0
- data/lib/mx_platform_api/models/merchant_location_response.rb +208 -0
- data/lib/mx_platform_api/models/merchant_location_response_body.rb +77 -0
- data/lib/mx_platform_api/models/merchant_response.rb +136 -0
- data/lib/mx_platform_api/models/merchant_response_body.rb +75 -0
- data/lib/mx_platform_api/models/merchants_response_body.rb +95 -0
- data/lib/mx_platform_api/models/micro_deposit.rb +223 -0
- data/lib/mx_platform_api/models/microdeposit_elements.rb +141 -0
- data/lib/mx_platform_api/models/microdeposit_request_body.rb +77 -0
- data/lib/mx_platform_api/models/microdeposit_response.rb +149 -0
- data/lib/mx_platform_api/models/microdeposit_response_body.rb +85 -0
- data/lib/mx_platform_api/models/microdeposit_verify_request.rb +88 -0
- data/lib/mx_platform_api/models/microdeposit_verify_request_body.rb +77 -0
- data/lib/mx_platform_api/models/microdeposits_response_body.rb +95 -0
- data/lib/mx_platform_api/models/monthly_account_balance.rb +123 -0
- data/lib/mx_platform_api/models/monthly_account_balances_response_body.rb +85 -0
- data/lib/mx_platform_api/models/monthly_cash_flow_profile_request.rb +95 -0
- data/lib/mx_platform_api/models/monthly_cash_flow_profile_request_body.rb +81 -0
- data/lib/mx_platform_api/models/monthly_cash_flow_response.rb +157 -0
- data/lib/mx_platform_api/models/monthly_cash_flow_response_body.rb +81 -0
- data/lib/mx_platform_api/models/notification_request.rb +83 -0
- data/lib/mx_platform_api/models/notification_request_body.rb +76 -0
- data/lib/mx_platform_api/models/notification_response.rb +204 -0
- data/lib/mx_platform_api/models/notification_response_body.rb +76 -0
- data/lib/mx_platform_api/models/notifications_response_body.rb +85 -0
- data/lib/mx_platform_api/models/oauth_window_response.rb +91 -0
- data/lib/mx_platform_api/models/oauth_window_response_body.rb +75 -0
- data/lib/mx_platform_api/models/option_response.rb +99 -0
- data/lib/mx_platform_api/models/pagination_response.rb +106 -0
- data/lib/mx_platform_api/models/parent_class.rb +84 -0
- data/lib/mx_platform_api/models/payment_account.rb +183 -0
- data/lib/mx_platform_api/models/payment_account1.rb +213 -0
- data/lib/mx_platform_api/models/payment_account_body.rb +77 -0
- data/lib/mx_platform_api/models/processor_account_number.rb +168 -0
- data/lib/mx_platform_api/models/processor_account_number_body.rb +85 -0
- data/lib/mx_platform_api/models/processor_owner.rb +155 -0
- data/lib/mx_platform_api/models/processor_owner_body.rb +95 -0
- data/lib/mx_platform_api/models/property_type.rb +69 -0
- data/lib/mx_platform_api/models/recurrence_type.rb +26 -0
- data/lib/mx_platform_api/models/repeating_transaction.rb +102 -0
- data/lib/mx_platform_api/models/repeating_transaction_response.rb +203 -0
- data/lib/mx_platform_api/models/repeating_transaction_type.rb +44 -0
- data/lib/mx_platform_api/models/repeating_transactions_response_body.rb +85 -0
- data/lib/mx_platform_api/models/reposition_request.rb +82 -0
- data/lib/mx_platform_api/models/reposition_request_body.rb +84 -0
- data/lib/mx_platform_api/models/reposition_response_body.rb +84 -0
- data/lib/mx_platform_api/models/reward.rb +187 -0
- data/lib/mx_platform_api/models/reward_elements.rb +156 -0
- data/lib/mx_platform_api/models/reward_response_body.rb +75 -0
- data/lib/mx_platform_api/models/rewards_response_body.rb +94 -0
- data/lib/mx_platform_api/models/scheduled_payment_response.rb +208 -0
- data/lib/mx_platform_api/models/scheduled_payments_response_body.rb +95 -0
- data/lib/mx_platform_api/models/spending_plan_account_response.rb +142 -0
- data/lib/mx_platform_api/models/spending_plan_accounts_response.rb +95 -0
- data/lib/mx_platform_api/models/spending_plan_iteration_item_create_request_body.rb +124 -0
- data/lib/mx_platform_api/models/spending_plan_iteration_item_response.rb +224 -0
- data/lib/mx_platform_api/models/spending_plan_iteration_items_response_body.rb +95 -0
- data/lib/mx_platform_api/models/spending_plan_iteration_response.rb +162 -0
- data/lib/mx_platform_api/models/spending_plan_iterations_response.rb +95 -0
- data/lib/mx_platform_api/models/spending_plan_response.rb +129 -0
- data/lib/mx_platform_api/models/spending_plans_response_body.rb +95 -0
- data/lib/mx_platform_api/models/split_transaction_request.rb +106 -0
- data/lib/mx_platform_api/models/split_transaction_request_body.rb +75 -0
- data/lib/mx_platform_api/models/split_transactions_response_body.rb +85 -0
- data/lib/mx_platform_api/models/statement_response.rb +157 -0
- data/lib/mx_platform_api/models/statement_response_body.rb +76 -0
- data/lib/mx_platform_api/models/statements_response_body.rb +95 -0
- data/lib/mx_platform_api/models/status.rb +36 -0
- data/lib/mx_platform_api/models/style.rb +74 -0
- data/lib/mx_platform_api/models/supported_product.rb +56 -0
- data/lib/mx_platform_api/models/supported_product1.rb +52 -0
- data/lib/mx_platform_api/models/tag_create_request.rb +72 -0
- data/lib/mx_platform_api/models/tag_create_request_body.rb +74 -0
- data/lib/mx_platform_api/models/tag_response.rb +99 -0
- data/lib/mx_platform_api/models/tag_response_body.rb +74 -0
- data/lib/mx_platform_api/models/tag_update_request.rb +72 -0
- data/lib/mx_platform_api/models/tag_update_request_body.rb +74 -0
- data/lib/mx_platform_api/models/tagging_create_request.rb +83 -0
- data/lib/mx_platform_api/models/tagging_create_request_body.rb +75 -0
- data/lib/mx_platform_api/models/tagging_response.rb +130 -0
- data/lib/mx_platform_api/models/tagging_response_body.rb +75 -0
- data/lib/mx_platform_api/models/tagging_update_request.rb +73 -0
- data/lib/mx_platform_api/models/tagging_update_request_body.rb +75 -0
- data/lib/mx_platform_api/models/taggings_response_body.rb +94 -0
- data/lib/mx_platform_api/models/tags_response_body.rb +94 -0
- data/lib/mx_platform_api/models/token_request_body.rb +75 -0
- data/lib/mx_platform_api/models/token_response.rb +114 -0
- data/lib/mx_platform_api/models/token_response_body.rb +84 -0
- data/lib/mx_platform_api/models/track_type_name.rb +44 -0
- data/lib/mx_platform_api/models/transaction_create_request.rb +192 -0
- data/lib/mx_platform_api/models/transaction_create_request_body.rb +76 -0
- data/lib/mx_platform_api/models/transaction_create_response_body.rb +595 -0
- data/lib/mx_platform_api/models/transaction_includes_response.rb +643 -0
- data/lib/mx_platform_api/models/transaction_response.rb +597 -0
- data/lib/mx_platform_api/models/transaction_response_body.rb +76 -0
- data/lib/mx_platform_api/models/transaction_rule_create_request.rb +98 -0
- data/lib/mx_platform_api/models/transaction_rule_create_request_body.rb +77 -0
- data/lib/mx_platform_api/models/transaction_rule_response.rb +152 -0
- data/lib/mx_platform_api/models/transaction_rule_response_body.rb +77 -0
- data/lib/mx_platform_api/models/transaction_rule_update_request.rb +103 -0
- data/lib/mx_platform_api/models/transaction_rule_update_request_body.rb +77 -0
- data/lib/mx_platform_api/models/transaction_rules_response_body.rb +95 -0
- data/lib/mx_platform_api/models/transaction_type.rb +36 -0
- data/lib/mx_platform_api/models/transaction_update_request.rb +74 -0
- data/lib/mx_platform_api/models/transaction_update_request_body.rb +76 -0
- data/lib/mx_platform_api/models/transactions_response_body.rb +95 -0
- data/lib/mx_platform_api/models/transactions_response_body_includes.rb +95 -0
- data/lib/mx_platform_api/models/type.rb +36 -0
- data/lib/mx_platform_api/models/update_goal_request.rb +185 -0
- data/lib/mx_platform_api/models/update_goal_request_body.rb +74 -0
- data/lib/mx_platform_api/models/use_case.rb +36 -0
- data/lib/mx_platform_api/models/user_create_request.rb +105 -0
- data/lib/mx_platform_api/models/user_create_request_body.rb +74 -0
- data/lib/mx_platform_api/models/user_response.rb +119 -0
- data/lib/mx_platform_api/models/user_response_body.rb +74 -0
- data/lib/mx_platform_api/models/user_update_request.rb +105 -0
- data/lib/mx_platform_api/models/user_update_request_body.rb +74 -0
- data/lib/mx_platform_api/models/users_response_body.rb +94 -0
- data/lib/mx_platform_api/models/users_widget_urls_request.rb +76 -0
- data/lib/mx_platform_api/models/vc_response.rb +77 -0
- data/lib/mx_platform_api/models/widget_request.rb +466 -0
- data/lib/mx_platform_api/models/widget_response.rb +100 -0
- data/lib/mx_platform_api/models/widget_response_body.rb +76 -0
- data/lib/mx_platform_api/models/widget_type.rb +149 -0
- data/lib/mx_platform_api/utilities/date_time_helper.rb +11 -0
- data/lib/mx_platform_api/utilities/file_wrapper.rb +28 -0
- data/lib/mx_platform_api.rb +313 -0
- metadata +370 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
# mx_platform_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module MxPlatformApi
|
|
7
|
+
# SpendingPlanApi
|
|
8
|
+
class SpendingPlanApi < BaseApi
|
|
9
|
+
# This endpoint creates a new `spending_plan_iteration_item`.
|
|
10
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
11
|
+
# version.
|
|
12
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
13
|
+
# the `spending_plan`.
|
|
14
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
15
|
+
# `user`, beginning with the prefix `USR-`.
|
|
16
|
+
# @param [SpendingPlanIterationItemCreateRequestBody] body Required
|
|
17
|
+
# parameter: Iteration item to be created with required parameter
|
|
18
|
+
# (planned_amount)
|
|
19
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
20
|
+
def create_spending_plan_iteration_item(accept_version,
|
|
21
|
+
spending_plan_guid,
|
|
22
|
+
user_guid,
|
|
23
|
+
body)
|
|
24
|
+
@api_call
|
|
25
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
26
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items',
|
|
27
|
+
Server::DEFAULT)
|
|
28
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
29
|
+
.is_required(true))
|
|
30
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
31
|
+
.is_required(true)
|
|
32
|
+
.should_encode(true))
|
|
33
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
34
|
+
.is_required(true)
|
|
35
|
+
.should_encode(true))
|
|
36
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
37
|
+
.body_param(new_parameter(body)
|
|
38
|
+
.is_required(true))
|
|
39
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
40
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
41
|
+
.auth(Single.new('basicAuth')))
|
|
42
|
+
.response(new_response_handler
|
|
43
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
44
|
+
.deserialize_into(SpendingPlanIterationItemResponse.method(:from_hash))
|
|
45
|
+
.is_api_response(true))
|
|
46
|
+
.execute
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Use this endpoint to list all the spending plan `iteration_items`
|
|
50
|
+
# associated with the `iteration`.
|
|
51
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
52
|
+
# version.
|
|
53
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
54
|
+
# `user`, beginning with the prefix `USR-`.
|
|
55
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
56
|
+
# the `spending_plan`.
|
|
57
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
58
|
+
# current page.
|
|
59
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
60
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
61
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
62
|
+
# value of `25` will be used instead.
|
|
63
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
64
|
+
def list_spending_plan_iteration_items(accept_version,
|
|
65
|
+
user_guid,
|
|
66
|
+
spending_plan_guid,
|
|
67
|
+
page: nil,
|
|
68
|
+
records_per_page: nil)
|
|
69
|
+
@api_call
|
|
70
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
71
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items',
|
|
72
|
+
Server::DEFAULT)
|
|
73
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
74
|
+
.is_required(true))
|
|
75
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
76
|
+
.is_required(true)
|
|
77
|
+
.should_encode(true))
|
|
78
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
79
|
+
.is_required(true)
|
|
80
|
+
.should_encode(true))
|
|
81
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
82
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
83
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
84
|
+
.auth(Single.new('basicAuth')))
|
|
85
|
+
.response(new_response_handler
|
|
86
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
87
|
+
.deserialize_into(SpendingPlanIterationItemsResponseBody.method(:from_hash))
|
|
88
|
+
.is_api_response(true))
|
|
89
|
+
.execute
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# This endpoint creates a new `spending_plan` for the user.
|
|
93
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
94
|
+
# version.
|
|
95
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
96
|
+
# `user`, beginning with the prefix `USR-`.
|
|
97
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
98
|
+
def create_spending_plan(accept_version,
|
|
99
|
+
user_guid)
|
|
100
|
+
@api_call
|
|
101
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
102
|
+
'/users/{user_guid}/spending_plans',
|
|
103
|
+
Server::DEFAULT)
|
|
104
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
105
|
+
.is_required(true))
|
|
106
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
107
|
+
.is_required(true)
|
|
108
|
+
.should_encode(true))
|
|
109
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
110
|
+
.auth(Single.new('basicAuth')))
|
|
111
|
+
.response(new_response_handler
|
|
112
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
113
|
+
.deserialize_into(SpendingPlanResponse.method(:from_hash))
|
|
114
|
+
.is_api_response(true))
|
|
115
|
+
.execute
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Use this endpoint to list all the spending plans associated with the user.
|
|
119
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
120
|
+
# version.
|
|
121
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
122
|
+
# `user`, beginning with the prefix `USR-`.
|
|
123
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
124
|
+
# current page.
|
|
125
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
126
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
127
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
128
|
+
# value of `25` will be used instead.
|
|
129
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
130
|
+
def list_spending_plans(accept_version,
|
|
131
|
+
user_guid,
|
|
132
|
+
page: nil,
|
|
133
|
+
records_per_page: nil)
|
|
134
|
+
@api_call
|
|
135
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
136
|
+
'/users/{user_guid}/spending_plans',
|
|
137
|
+
Server::DEFAULT)
|
|
138
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
139
|
+
.is_required(true))
|
|
140
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
141
|
+
.is_required(true)
|
|
142
|
+
.should_encode(true))
|
|
143
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
144
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
145
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
146
|
+
.auth(Single.new('basicAuth')))
|
|
147
|
+
.response(new_response_handler
|
|
148
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
149
|
+
.deserialize_into(SpendingPlansResponseBody.method(:from_hash))
|
|
150
|
+
.is_api_response(true))
|
|
151
|
+
.execute
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Use this endpoint to delete a `spending_plan_account`.
|
|
155
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
156
|
+
# version.
|
|
157
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
158
|
+
# `user`, beginning with the prefix `USR-`.
|
|
159
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
160
|
+
# the `spending_plan`.
|
|
161
|
+
# @param [String] spending_plan_account_guid Required parameter: The unique
|
|
162
|
+
# ID for the specified account.
|
|
163
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
164
|
+
def delete_spending_plan_account(accept_version,
|
|
165
|
+
user_guid,
|
|
166
|
+
spending_plan_guid,
|
|
167
|
+
spending_plan_account_guid)
|
|
168
|
+
@api_call
|
|
169
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
170
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts/{spending_plan_account_guid}',
|
|
171
|
+
Server::DEFAULT)
|
|
172
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
173
|
+
.is_required(true))
|
|
174
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
175
|
+
.is_required(true)
|
|
176
|
+
.should_encode(true))
|
|
177
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
178
|
+
.is_required(true)
|
|
179
|
+
.should_encode(true))
|
|
180
|
+
.template_param(new_parameter(spending_plan_account_guid, key: 'spending_plan_account_guid')
|
|
181
|
+
.is_required(true)
|
|
182
|
+
.should_encode(true))
|
|
183
|
+
.auth(Single.new('basicAuth')))
|
|
184
|
+
.response(new_response_handler
|
|
185
|
+
.is_response_void(true)
|
|
186
|
+
.is_api_response(true))
|
|
187
|
+
.execute
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Use this endpoint to read the attributes of a specific spending plan
|
|
191
|
+
# account according to its unique GUID.
|
|
192
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
193
|
+
# version.
|
|
194
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
195
|
+
# `user`, beginning with the prefix `USR-`.
|
|
196
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
197
|
+
# the `spending_plan`.
|
|
198
|
+
# @param [String] spending_plan_account_guid Required parameter: The unique
|
|
199
|
+
# ID for the specified account.
|
|
200
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
201
|
+
# current page.
|
|
202
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
203
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
204
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
205
|
+
# value of `25` will be used instead.
|
|
206
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
207
|
+
def read_spending_plan_account(accept_version,
|
|
208
|
+
user_guid,
|
|
209
|
+
spending_plan_guid,
|
|
210
|
+
spending_plan_account_guid,
|
|
211
|
+
page: nil,
|
|
212
|
+
records_per_page: nil)
|
|
213
|
+
@api_call
|
|
214
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
215
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts/{spending_plan_account_guid}',
|
|
216
|
+
Server::DEFAULT)
|
|
217
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
218
|
+
.is_required(true))
|
|
219
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
220
|
+
.is_required(true)
|
|
221
|
+
.should_encode(true))
|
|
222
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
223
|
+
.is_required(true)
|
|
224
|
+
.should_encode(true))
|
|
225
|
+
.template_param(new_parameter(spending_plan_account_guid, key: 'spending_plan_account_guid')
|
|
226
|
+
.is_required(true)
|
|
227
|
+
.should_encode(true))
|
|
228
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
229
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
230
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
231
|
+
.auth(Single.new('basicAuth')))
|
|
232
|
+
.response(new_response_handler
|
|
233
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
234
|
+
.deserialize_into(SpendingPlanAccountResponse.method(:from_hash))
|
|
235
|
+
.is_api_response(true))
|
|
236
|
+
.execute
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Use this endpoint to delete a spending plan `iteration_item`.
|
|
240
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
241
|
+
# version.
|
|
242
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
243
|
+
# `user`, beginning with the prefix `USR-`.
|
|
244
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
245
|
+
# the `spending_plan`.
|
|
246
|
+
# @param [String] iteration_item_guid Required parameter: The unique ID for
|
|
247
|
+
# the `iteration_item`.
|
|
248
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
249
|
+
def delete_spending_plan_iteration_item(accept_version,
|
|
250
|
+
user_guid,
|
|
251
|
+
spending_plan_guid,
|
|
252
|
+
iteration_item_guid)
|
|
253
|
+
@api_call
|
|
254
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
255
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}',
|
|
256
|
+
Server::DEFAULT)
|
|
257
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
258
|
+
.is_required(true))
|
|
259
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
260
|
+
.is_required(true)
|
|
261
|
+
.should_encode(true))
|
|
262
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
263
|
+
.is_required(true)
|
|
264
|
+
.should_encode(true))
|
|
265
|
+
.template_param(new_parameter(iteration_item_guid, key: 'iteration_item_guid')
|
|
266
|
+
.is_required(true)
|
|
267
|
+
.should_encode(true))
|
|
268
|
+
.auth(Single.new('basicAuth')))
|
|
269
|
+
.response(new_response_handler
|
|
270
|
+
.is_response_void(true)
|
|
271
|
+
.is_api_response(true))
|
|
272
|
+
.execute
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Use this endpoint to read the attributes of a specific spending plan
|
|
276
|
+
# `iteration_item` according to its unique GUID.
|
|
277
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
278
|
+
# version.
|
|
279
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
280
|
+
# `user`, beginning with the prefix `USR-`.
|
|
281
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
282
|
+
# the `spending_plan`.
|
|
283
|
+
# @param [String] iteration_item_guid Required parameter: The unique ID for
|
|
284
|
+
# the `iteration_item`.
|
|
285
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
286
|
+
# current page.
|
|
287
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
288
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
289
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
290
|
+
# value of `25` will be used instead.
|
|
291
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
292
|
+
def read_spending_plan_iteration_item(accept_version,
|
|
293
|
+
user_guid,
|
|
294
|
+
spending_plan_guid,
|
|
295
|
+
iteration_item_guid,
|
|
296
|
+
page: nil,
|
|
297
|
+
records_per_page: nil)
|
|
298
|
+
@api_call
|
|
299
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
300
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}',
|
|
301
|
+
Server::DEFAULT)
|
|
302
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
303
|
+
.is_required(true))
|
|
304
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
305
|
+
.is_required(true)
|
|
306
|
+
.should_encode(true))
|
|
307
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
308
|
+
.is_required(true)
|
|
309
|
+
.should_encode(true))
|
|
310
|
+
.template_param(new_parameter(iteration_item_guid, key: 'iteration_item_guid')
|
|
311
|
+
.is_required(true)
|
|
312
|
+
.should_encode(true))
|
|
313
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
314
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
315
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
316
|
+
.auth(Single.new('basicAuth')))
|
|
317
|
+
.response(new_response_handler
|
|
318
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
319
|
+
.deserialize_into(SpendingPlanIterationItemResponse.method(:from_hash))
|
|
320
|
+
.is_api_response(true))
|
|
321
|
+
.execute
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Use this endpoint to update an existing `spending_plan_iteration_item`.
|
|
325
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
326
|
+
# version.
|
|
327
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
328
|
+
# `user`, beginning with the prefix `USR-`.
|
|
329
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
330
|
+
# the `spending_plan`.
|
|
331
|
+
# @param [String] iteration_item_guid Required parameter: The unique ID for
|
|
332
|
+
# the `iteration_item`.
|
|
333
|
+
# @param [SpendingPlanIterationItemCreateRequestBody] body Required
|
|
334
|
+
# parameter: Iteration item to be updated with required parameter
|
|
335
|
+
# (planned_amount)
|
|
336
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
337
|
+
def update_spending_plan_iteration_item(accept_version,
|
|
338
|
+
user_guid,
|
|
339
|
+
spending_plan_guid,
|
|
340
|
+
iteration_item_guid,
|
|
341
|
+
body)
|
|
342
|
+
@api_call
|
|
343
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
344
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items/{iteration_item_guid}',
|
|
345
|
+
Server::DEFAULT)
|
|
346
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
347
|
+
.is_required(true))
|
|
348
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
349
|
+
.is_required(true)
|
|
350
|
+
.should_encode(true))
|
|
351
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
352
|
+
.is_required(true)
|
|
353
|
+
.should_encode(true))
|
|
354
|
+
.template_param(new_parameter(iteration_item_guid, key: 'iteration_item_guid')
|
|
355
|
+
.is_required(true)
|
|
356
|
+
.should_encode(true))
|
|
357
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
358
|
+
.body_param(new_parameter(body)
|
|
359
|
+
.is_required(true))
|
|
360
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
361
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
362
|
+
.auth(Single.new('basicAuth')))
|
|
363
|
+
.response(new_response_handler
|
|
364
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
365
|
+
.deserialize_into(SpendingPlanIterationItemResponse.method(:from_hash))
|
|
366
|
+
.is_api_response(true))
|
|
367
|
+
.execute
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
# Use this endpoint to delete a user's `spending_plan`.
|
|
371
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
372
|
+
# version.
|
|
373
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
374
|
+
# `user`, beginning with the prefix `USR-`.
|
|
375
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
376
|
+
# the `spending_plan`.
|
|
377
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
378
|
+
def delete_spending_plan(accept_version,
|
|
379
|
+
user_guid,
|
|
380
|
+
spending_plan_guid)
|
|
381
|
+
@api_call
|
|
382
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
383
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}',
|
|
384
|
+
Server::DEFAULT)
|
|
385
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
386
|
+
.is_required(true))
|
|
387
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
388
|
+
.is_required(true)
|
|
389
|
+
.should_encode(true))
|
|
390
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
391
|
+
.is_required(true)
|
|
392
|
+
.should_encode(true))
|
|
393
|
+
.auth(Single.new('basicAuth')))
|
|
394
|
+
.response(new_response_handler
|
|
395
|
+
.is_response_void(true)
|
|
396
|
+
.is_api_response(true))
|
|
397
|
+
.execute
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# Use this endpoint to read the attributes of a specific spending plan
|
|
401
|
+
# according to its unique GUID.
|
|
402
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
403
|
+
# version.
|
|
404
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
405
|
+
# `user`, beginning with the prefix `USR-`.
|
|
406
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
407
|
+
# the `spending_plan`.
|
|
408
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
409
|
+
# current page.
|
|
410
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
411
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
412
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
413
|
+
# value of `25` will be used instead.
|
|
414
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
415
|
+
def read_spending_plan_user(accept_version,
|
|
416
|
+
user_guid,
|
|
417
|
+
spending_plan_guid,
|
|
418
|
+
page: nil,
|
|
419
|
+
records_per_page: nil)
|
|
420
|
+
@api_call
|
|
421
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
422
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}',
|
|
423
|
+
Server::DEFAULT)
|
|
424
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
425
|
+
.is_required(true))
|
|
426
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
427
|
+
.is_required(true)
|
|
428
|
+
.should_encode(true))
|
|
429
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
430
|
+
.is_required(true)
|
|
431
|
+
.should_encode(true))
|
|
432
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
433
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
434
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
435
|
+
.auth(Single.new('basicAuth')))
|
|
436
|
+
.response(new_response_handler
|
|
437
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
438
|
+
.deserialize_into(SpendingPlanResponse.method(:from_hash))
|
|
439
|
+
.is_api_response(true))
|
|
440
|
+
.execute
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# Use this endpoint to list all the spending plan accounts associated with
|
|
444
|
+
# the spending plan.
|
|
445
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
446
|
+
# version.
|
|
447
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
448
|
+
# `user`, beginning with the prefix `USR-`.
|
|
449
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
450
|
+
# the `spending_plan`.
|
|
451
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
452
|
+
# current page.
|
|
453
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
454
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
455
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
456
|
+
# value of `25` will be used instead.
|
|
457
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
458
|
+
def list_spending_plan_accounts(accept_version,
|
|
459
|
+
user_guid,
|
|
460
|
+
spending_plan_guid,
|
|
461
|
+
page: nil,
|
|
462
|
+
records_per_page: nil)
|
|
463
|
+
@api_call
|
|
464
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
465
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/spending_plan_accounts',
|
|
466
|
+
Server::DEFAULT)
|
|
467
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
468
|
+
.is_required(true))
|
|
469
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
470
|
+
.is_required(true)
|
|
471
|
+
.should_encode(true))
|
|
472
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
473
|
+
.is_required(true)
|
|
474
|
+
.should_encode(true))
|
|
475
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
476
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
477
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
478
|
+
.auth(Single.new('basicAuth')))
|
|
479
|
+
.response(new_response_handler
|
|
480
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
481
|
+
.deserialize_into(SpendingPlanAccountsResponse.method(:from_hash))
|
|
482
|
+
.is_api_response(true))
|
|
483
|
+
.execute
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
# Use this endpoint to list all the spending plan `iterations` associated
|
|
487
|
+
# with the `spending_plan`.
|
|
488
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
489
|
+
# version.
|
|
490
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
491
|
+
# `user`, beginning with the prefix `USR-`.
|
|
492
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
493
|
+
# the `spending_plan`.
|
|
494
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
495
|
+
# current page.
|
|
496
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
497
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
498
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
499
|
+
# value of `25` will be used instead.
|
|
500
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
501
|
+
def list_spending_plan_iterations(accept_version,
|
|
502
|
+
user_guid,
|
|
503
|
+
spending_plan_guid,
|
|
504
|
+
page: nil,
|
|
505
|
+
records_per_page: nil)
|
|
506
|
+
@api_call
|
|
507
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
508
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations',
|
|
509
|
+
Server::DEFAULT)
|
|
510
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
511
|
+
.is_required(true))
|
|
512
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
513
|
+
.is_required(true)
|
|
514
|
+
.should_encode(true))
|
|
515
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
516
|
+
.is_required(true)
|
|
517
|
+
.should_encode(true))
|
|
518
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
519
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
520
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
521
|
+
.auth(Single.new('basicAuth')))
|
|
522
|
+
.response(new_response_handler
|
|
523
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
524
|
+
.deserialize_into(SpendingPlanIterationsResponse.method(:from_hash))
|
|
525
|
+
.is_api_response(true))
|
|
526
|
+
.execute
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# Use this endpoint to read the attributes of the current spending plan
|
|
530
|
+
# `iteration`.
|
|
531
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
532
|
+
# version.
|
|
533
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
534
|
+
# `user`, beginning with the prefix `USR-`.
|
|
535
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
536
|
+
# the `spending_plan`.
|
|
537
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
538
|
+
# current page.
|
|
539
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
540
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
541
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
542
|
+
# value of `25` will be used instead.
|
|
543
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
544
|
+
def read_current_spending_plan_iteration(accept_version,
|
|
545
|
+
user_guid,
|
|
546
|
+
spending_plan_guid,
|
|
547
|
+
page: nil,
|
|
548
|
+
records_per_page: nil)
|
|
549
|
+
@api_call
|
|
550
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
551
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current',
|
|
552
|
+
Server::DEFAULT)
|
|
553
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
554
|
+
.is_required(true))
|
|
555
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
556
|
+
.is_required(true)
|
|
557
|
+
.should_encode(true))
|
|
558
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
559
|
+
.is_required(true)
|
|
560
|
+
.should_encode(true))
|
|
561
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
562
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
563
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
564
|
+
.auth(Single.new('basicAuth')))
|
|
565
|
+
.response(new_response_handler
|
|
566
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
567
|
+
.deserialize_into(SpendingPlanIterationResponse.method(:from_hash))
|
|
568
|
+
.is_api_response(true))
|
|
569
|
+
.execute
|
|
570
|
+
end
|
|
571
|
+
|
|
572
|
+
# Use this endpoint to read the attributes of a specific spending plan
|
|
573
|
+
# `iteration` according to its `iteration_number`.
|
|
574
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
575
|
+
# version.
|
|
576
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
577
|
+
# `user`, beginning with the prefix `USR-`.
|
|
578
|
+
# @param [String] spending_plan_guid Required parameter: The unique ID for
|
|
579
|
+
# the `spending_plan`.
|
|
580
|
+
# @param [Integer] iteration_number Required parameter: The current
|
|
581
|
+
# iteration number for the spending plan `iteration`.
|
|
582
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
583
|
+
# current page.
|
|
584
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
585
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
586
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
587
|
+
# value of `25` will be used instead.
|
|
588
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
589
|
+
def read_spending_plan_iteration(accept_version,
|
|
590
|
+
user_guid,
|
|
591
|
+
spending_plan_guid,
|
|
592
|
+
iteration_number,
|
|
593
|
+
page: nil,
|
|
594
|
+
records_per_page: nil)
|
|
595
|
+
@api_call
|
|
596
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
597
|
+
'/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/{iteration_number}',
|
|
598
|
+
Server::DEFAULT)
|
|
599
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
600
|
+
.is_required(true))
|
|
601
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
602
|
+
.is_required(true)
|
|
603
|
+
.should_encode(true))
|
|
604
|
+
.template_param(new_parameter(spending_plan_guid, key: 'spending_plan_guid')
|
|
605
|
+
.is_required(true)
|
|
606
|
+
.should_encode(true))
|
|
607
|
+
.template_param(new_parameter(iteration_number, key: 'iteration_number')
|
|
608
|
+
.is_required(true)
|
|
609
|
+
.should_encode(true))
|
|
610
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
611
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
612
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
613
|
+
.auth(Single.new('basicAuth')))
|
|
614
|
+
.response(new_response_handler
|
|
615
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
616
|
+
.deserialize_into(SpendingPlanIterationResponse.method(:from_hash))
|
|
617
|
+
.is_api_response(true))
|
|
618
|
+
.execute
|
|
619
|
+
end
|
|
620
|
+
end
|
|
621
|
+
end
|