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,377 @@
|
|
|
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
|
+
# CategoriesApi
|
|
8
|
+
class CategoriesApi < BaseApi
|
|
9
|
+
# Use this endpoint to retrieve a list of all the default categories and
|
|
10
|
+
# subcategories offered within the MX Platform API. In other words, each
|
|
11
|
+
# item in the returned list will have its `is_default` field set to `true`.
|
|
12
|
+
# There are currently 119 default categories and subcategories. Both the
|
|
13
|
+
# _list default categories_ and _list default categories by user_ endpoints
|
|
14
|
+
# return the same results. The different routes are provided for
|
|
15
|
+
# convenience.
|
|
16
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
17
|
+
# version.
|
|
18
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
19
|
+
# current page.
|
|
20
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
21
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
22
|
+
# range is from `10` to `100`. If the value exceeds `100`, the default value
|
|
23
|
+
# of `25` will be used instead.
|
|
24
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
25
|
+
def list_default_categories(accept_version,
|
|
26
|
+
page: nil,
|
|
27
|
+
records_per_page: nil)
|
|
28
|
+
@api_call
|
|
29
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
30
|
+
'/categories/default',
|
|
31
|
+
Server::DEFAULT)
|
|
32
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
33
|
+
.is_required(true))
|
|
34
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
35
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
36
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
37
|
+
.auth(Single.new('basicAuth')))
|
|
38
|
+
.response(new_response_handler
|
|
39
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
40
|
+
.deserialize_into(CategoriesResponseBody.method(:from_hash))
|
|
41
|
+
.is_api_response(true))
|
|
42
|
+
.execute
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Use this endpoint to read the attributes of a default category.
|
|
46
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
47
|
+
# version.
|
|
48
|
+
# @param [String] category_guid Required parameter: The unique id for a
|
|
49
|
+
# `category`.
|
|
50
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
51
|
+
def read_default_category(accept_version,
|
|
52
|
+
category_guid)
|
|
53
|
+
@api_call
|
|
54
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
55
|
+
'/categories/{category_guid}',
|
|
56
|
+
Server::DEFAULT)
|
|
57
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
58
|
+
.is_required(true))
|
|
59
|
+
.template_param(new_parameter(category_guid, key: 'category_guid')
|
|
60
|
+
.is_required(true)
|
|
61
|
+
.should_encode(true))
|
|
62
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
63
|
+
.auth(Single.new('basicAuth')))
|
|
64
|
+
.response(new_response_handler
|
|
65
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
66
|
+
.deserialize_into(CategoryResponseBody.method(:from_hash))
|
|
67
|
+
.is_api_response(true))
|
|
68
|
+
.execute
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Returns a list of categories that have transactions dated within the
|
|
72
|
+
# provided date range, and the total of all transactions that belong to each
|
|
73
|
+
# category.
|
|
74
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
75
|
+
# version.
|
|
76
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
77
|
+
# `user`, beginning with the prefix `USR-`.
|
|
78
|
+
# @param [String] account_guid Required parameter: The unique id for an
|
|
79
|
+
# `account`.
|
|
80
|
+
# @param [String] from_date Required parameter: Filter transactions from
|
|
81
|
+
# this date. This only supports ISO 8601 format without timestamp
|
|
82
|
+
# (YYYY-MM-DD). Defaults to 120 days ago if not provided.
|
|
83
|
+
# @param [String] to_date Required parameter: Filter transactions to this
|
|
84
|
+
# date (at midnight). This only supports ISO 8601 format without timestamp
|
|
85
|
+
# (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made
|
|
86
|
+
# to capture pending transactions.
|
|
87
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
88
|
+
def list_date_range_category_totals_by_account(accept_version,
|
|
89
|
+
user_guid,
|
|
90
|
+
account_guid,
|
|
91
|
+
from_date,
|
|
92
|
+
to_date)
|
|
93
|
+
@api_call
|
|
94
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
95
|
+
'/users/{user_guid}/accounts/{account_guid}/date_range_category_totals',
|
|
96
|
+
Server::DEFAULT)
|
|
97
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
98
|
+
.is_required(true))
|
|
99
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
100
|
+
.is_required(true)
|
|
101
|
+
.should_encode(true))
|
|
102
|
+
.template_param(new_parameter(account_guid, key: 'account_guid')
|
|
103
|
+
.is_required(true)
|
|
104
|
+
.should_encode(true))
|
|
105
|
+
.query_param(new_parameter(from_date, key: 'from_date')
|
|
106
|
+
.is_required(true))
|
|
107
|
+
.query_param(new_parameter(to_date, key: 'to_date')
|
|
108
|
+
.is_required(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(DateRangeCategoryTotalsResponseBody.method(:from_hash))
|
|
114
|
+
.is_api_response(true))
|
|
115
|
+
.execute
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Returns a list of categories that have transactions dated within the
|
|
119
|
+
# provided date range, and the total of all transactions that belong to each
|
|
120
|
+
# category.
|
|
121
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
122
|
+
# version.
|
|
123
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
124
|
+
# `user`, beginning with the prefix `USR-`.
|
|
125
|
+
# @param [String] from_date Required parameter: Filter transactions from
|
|
126
|
+
# this date. This only supports ISO 8601 format without timestamp
|
|
127
|
+
# (YYYY-MM-DD). Defaults to 120 days ago if not provided.
|
|
128
|
+
# @param [String] to_date Required parameter: Filter transactions to this
|
|
129
|
+
# date (at midnight). This only supports ISO 8601 format without timestamp
|
|
130
|
+
# (YYYY-MM-DD). Defaults to 5 days forward from the day the request is made
|
|
131
|
+
# to capture pending transactions.
|
|
132
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
133
|
+
def list_category_totals_by_user(accept_version,
|
|
134
|
+
user_guid,
|
|
135
|
+
from_date,
|
|
136
|
+
to_date)
|
|
137
|
+
@api_call
|
|
138
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
139
|
+
'/users/{user_guid}/date_range_category_totals',
|
|
140
|
+
Server::DEFAULT)
|
|
141
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
142
|
+
.is_required(true))
|
|
143
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
144
|
+
.is_required(true)
|
|
145
|
+
.should_encode(true))
|
|
146
|
+
.query_param(new_parameter(from_date, key: 'from_date')
|
|
147
|
+
.is_required(true))
|
|
148
|
+
.query_param(new_parameter(to_date, key: 'to_date')
|
|
149
|
+
.is_required(true))
|
|
150
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
151
|
+
.auth(Single.new('basicAuth')))
|
|
152
|
+
.response(new_response_handler
|
|
153
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
154
|
+
.deserialize_into(DateRangeCategoryTotalsResponseBody.method(:from_hash))
|
|
155
|
+
.is_api_response(true))
|
|
156
|
+
.execute
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Use this endpoint to list all categories associated with a `user`,
|
|
160
|
+
# including both default and custom categories.
|
|
161
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
162
|
+
# version.
|
|
163
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
164
|
+
# `user`, beginning with the prefix `USR-`.
|
|
165
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
166
|
+
# current page.
|
|
167
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
168
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
169
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
170
|
+
# value of `25` will be used instead.
|
|
171
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
172
|
+
def list_categories(accept_version,
|
|
173
|
+
user_guid,
|
|
174
|
+
page: nil,
|
|
175
|
+
records_per_page: nil)
|
|
176
|
+
@api_call
|
|
177
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
178
|
+
'/users/{user_guid}/categories',
|
|
179
|
+
Server::DEFAULT)
|
|
180
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
181
|
+
.is_required(true))
|
|
182
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
183
|
+
.is_required(true)
|
|
184
|
+
.should_encode(true))
|
|
185
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
186
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
187
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
188
|
+
.auth(Single.new('basicAuth')))
|
|
189
|
+
.response(new_response_handler
|
|
190
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
191
|
+
.deserialize_into(CategoriesResponseBody.method(:from_hash))
|
|
192
|
+
.is_api_response(true))
|
|
193
|
+
.execute
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Use this endpoint to create a new custom category for a specific `user`.
|
|
197
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
198
|
+
# version.
|
|
199
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
200
|
+
# `user`, beginning with the prefix `USR-`.
|
|
201
|
+
# @param [CategoryCreateRequestBody] body Required parameter: Custom
|
|
202
|
+
# category object to be created
|
|
203
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
204
|
+
def create_category(accept_version,
|
|
205
|
+
user_guid,
|
|
206
|
+
body)
|
|
207
|
+
@api_call
|
|
208
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
209
|
+
'/users/{user_guid}/categories',
|
|
210
|
+
Server::DEFAULT)
|
|
211
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
212
|
+
.is_required(true))
|
|
213
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
214
|
+
.is_required(true)
|
|
215
|
+
.should_encode(true))
|
|
216
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
217
|
+
.body_param(new_parameter(body)
|
|
218
|
+
.is_required(true))
|
|
219
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
220
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
221
|
+
.auth(Single.new('basicAuth')))
|
|
222
|
+
.response(new_response_handler
|
|
223
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
224
|
+
.deserialize_into(CategoryResponseBody.method(:from_hash))
|
|
225
|
+
.is_api_response(true))
|
|
226
|
+
.execute
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Use this endpoint to retrieve a list of all the default categories and
|
|
230
|
+
# subcategories, scoped by user, offered within the MX Platform API. In
|
|
231
|
+
# other words, each item in the returned list will have its `is_default`
|
|
232
|
+
# field set to `true`. There are currently 119 default categories and
|
|
233
|
+
# subcategories. Both the _list default categories_ and _list default
|
|
234
|
+
# categories by user_ endpoints return the same results. The different
|
|
235
|
+
# routes are provided for convenience.
|
|
236
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
237
|
+
# version.
|
|
238
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
239
|
+
# `user`, beginning with the prefix `USR-`.
|
|
240
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
241
|
+
# current page.
|
|
242
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
243
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
244
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
245
|
+
# value of `25` will be used instead.
|
|
246
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
247
|
+
def list_default_categories_by_user(accept_version,
|
|
248
|
+
user_guid,
|
|
249
|
+
page: nil,
|
|
250
|
+
records_per_page: nil)
|
|
251
|
+
@api_call
|
|
252
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
253
|
+
'/users/{user_guid}/categories/default',
|
|
254
|
+
Server::DEFAULT)
|
|
255
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
256
|
+
.is_required(true))
|
|
257
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
258
|
+
.is_required(true)
|
|
259
|
+
.should_encode(true))
|
|
260
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
261
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
262
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
263
|
+
.auth(Single.new('basicAuth')))
|
|
264
|
+
.response(new_response_handler
|
|
265
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
266
|
+
.deserialize_into(CategoriesResponseBody.method(:from_hash))
|
|
267
|
+
.is_api_response(true))
|
|
268
|
+
.execute
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Use this endpoint to delete a specific custom category according to its
|
|
272
|
+
# unique GUID. The API will respond with an empty object and a status of
|
|
273
|
+
# `204 No Content`.
|
|
274
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
275
|
+
# version.
|
|
276
|
+
# @param [String] category_guid Required parameter: The unique id for a
|
|
277
|
+
# `category`.
|
|
278
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
279
|
+
# `user`, beginning with the prefix `USR-`.
|
|
280
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
281
|
+
def delete_category(accept_version,
|
|
282
|
+
category_guid,
|
|
283
|
+
user_guid)
|
|
284
|
+
@api_call
|
|
285
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
286
|
+
'/users/{user_guid}/categories/{category_guid}',
|
|
287
|
+
Server::DEFAULT)
|
|
288
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
289
|
+
.is_required(true))
|
|
290
|
+
.template_param(new_parameter(category_guid, key: 'category_guid')
|
|
291
|
+
.is_required(true)
|
|
292
|
+
.should_encode(true))
|
|
293
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
294
|
+
.is_required(true)
|
|
295
|
+
.should_encode(true))
|
|
296
|
+
.auth(Single.new('basicAuth')))
|
|
297
|
+
.response(new_response_handler
|
|
298
|
+
.is_response_void(true)
|
|
299
|
+
.is_api_response(true))
|
|
300
|
+
.execute
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Use this endpoint to read the attributes of either a default category or a
|
|
304
|
+
# custom category.
|
|
305
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
306
|
+
# version.
|
|
307
|
+
# @param [String] category_guid Required parameter: The unique id for a
|
|
308
|
+
# `category`.
|
|
309
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
310
|
+
# `user`, beginning with the prefix `USR-`.
|
|
311
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
312
|
+
def read_category(accept_version,
|
|
313
|
+
category_guid,
|
|
314
|
+
user_guid)
|
|
315
|
+
@api_call
|
|
316
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
317
|
+
'/users/{user_guid}/categories/{category_guid}',
|
|
318
|
+
Server::DEFAULT)
|
|
319
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
320
|
+
.is_required(true))
|
|
321
|
+
.template_param(new_parameter(category_guid, key: 'category_guid')
|
|
322
|
+
.is_required(true)
|
|
323
|
+
.should_encode(true))
|
|
324
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
325
|
+
.is_required(true)
|
|
326
|
+
.should_encode(true))
|
|
327
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
328
|
+
.auth(Single.new('basicAuth')))
|
|
329
|
+
.response(new_response_handler
|
|
330
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
331
|
+
.deserialize_into(CategoryResponseBody.method(:from_hash))
|
|
332
|
+
.is_api_response(true))
|
|
333
|
+
.execute
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# Use this endpoint to update the attributes of a custom category according
|
|
337
|
+
# to its unique GUID.
|
|
338
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
339
|
+
# version.
|
|
340
|
+
# @param [String] category_guid Required parameter: The unique id for a
|
|
341
|
+
# `category`.
|
|
342
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
343
|
+
# `user`, beginning with the prefix `USR-`.
|
|
344
|
+
# @param [CategoryUpdateRequestBody] body Required parameter: Category
|
|
345
|
+
# object to be updated (While no single parameter is required, the
|
|
346
|
+
# `category` object cannot be empty)
|
|
347
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
348
|
+
def update_category(accept_version,
|
|
349
|
+
category_guid,
|
|
350
|
+
user_guid,
|
|
351
|
+
body)
|
|
352
|
+
@api_call
|
|
353
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
354
|
+
'/users/{user_guid}/categories/{category_guid}',
|
|
355
|
+
Server::DEFAULT)
|
|
356
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
357
|
+
.is_required(true))
|
|
358
|
+
.template_param(new_parameter(category_guid, key: 'category_guid')
|
|
359
|
+
.is_required(true)
|
|
360
|
+
.should_encode(true))
|
|
361
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
362
|
+
.is_required(true)
|
|
363
|
+
.should_encode(true))
|
|
364
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
365
|
+
.body_param(new_parameter(body)
|
|
366
|
+
.is_required(true))
|
|
367
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
368
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
369
|
+
.auth(Single.new('basicAuth')))
|
|
370
|
+
.response(new_response_handler
|
|
371
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
372
|
+
.deserialize_into(CategoryResponseBody.method(:from_hash))
|
|
373
|
+
.is_api_response(true))
|
|
374
|
+
.execute
|
|
375
|
+
end
|
|
376
|
+
end
|
|
377
|
+
end
|
|
@@ -0,0 +1,223 @@
|
|
|
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
|
+
# GoalsApi
|
|
8
|
+
class GoalsApi < BaseApi
|
|
9
|
+
# Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header
|
|
10
|
+
# and `skip_webhook` parameter.
|
|
11
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
12
|
+
# version.
|
|
13
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
14
|
+
# `user`, beginning with the prefix `USR-`.
|
|
15
|
+
# @param [GoalRequestBody] body Required parameter: TODO: type description
|
|
16
|
+
# here
|
|
17
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
18
|
+
def create_goal(accept_version,
|
|
19
|
+
user_guid,
|
|
20
|
+
body)
|
|
21
|
+
@api_call
|
|
22
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
23
|
+
'/users/{user_guid}/goals',
|
|
24
|
+
Server::DEFAULT)
|
|
25
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
26
|
+
.is_required(true))
|
|
27
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
28
|
+
.is_required(true)
|
|
29
|
+
.should_encode(true))
|
|
30
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
31
|
+
.body_param(new_parameter(body)
|
|
32
|
+
.is_required(true))
|
|
33
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
34
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
35
|
+
.auth(Single.new('basicAuth')))
|
|
36
|
+
.response(new_response_handler
|
|
37
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
38
|
+
.deserialize_into(GoalResponseBody.method(:from_hash))
|
|
39
|
+
.is_api_response(true))
|
|
40
|
+
.execute
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# List all goals a user can set.
|
|
44
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
45
|
+
# version.
|
|
46
|
+
# @param [String] accept Required parameter: Specifies the media type
|
|
47
|
+
# expected in the response.
|
|
48
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
49
|
+
# `user`, beginning with the prefix `USR-`.
|
|
50
|
+
# @param [Integer] page Optional parameter: Results are paginated. Specify
|
|
51
|
+
# current page.
|
|
52
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
53
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
54
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
55
|
+
# value of `25` will be used instead.
|
|
56
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
57
|
+
def list_goals(accept_version,
|
|
58
|
+
accept,
|
|
59
|
+
user_guid,
|
|
60
|
+
page: nil,
|
|
61
|
+
records_per_page: nil)
|
|
62
|
+
@api_call
|
|
63
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
64
|
+
'/users/{user_guid}/goals',
|
|
65
|
+
Server::DEFAULT)
|
|
66
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
67
|
+
.is_required(true))
|
|
68
|
+
.header_param(new_parameter(accept, key: 'Accept')
|
|
69
|
+
.is_required(true))
|
|
70
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
71
|
+
.is_required(true)
|
|
72
|
+
.should_encode(true))
|
|
73
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
74
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
75
|
+
.auth(Single.new('basicAuth')))
|
|
76
|
+
.response(new_response_handler
|
|
77
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
78
|
+
.deserialize_into(GoalsResponseBody.method(:from_hash))
|
|
79
|
+
.is_api_response(true))
|
|
80
|
+
.execute
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Delete a goal.
|
|
84
|
+
# @param [String] goal_guid Required parameter: The unique identifier for a
|
|
85
|
+
# goal. Defined by MX.
|
|
86
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
87
|
+
# `user`, beginning with the prefix `USR-`.
|
|
88
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
89
|
+
# version.
|
|
90
|
+
# @param [String] accept Required parameter: Specifies the media type
|
|
91
|
+
# expected in the response.
|
|
92
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
93
|
+
def delete_goal(goal_guid,
|
|
94
|
+
user_guid,
|
|
95
|
+
accept_version,
|
|
96
|
+
accept)
|
|
97
|
+
@api_call
|
|
98
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
99
|
+
'/users/{user_guid}/goals/{goal_guid}',
|
|
100
|
+
Server::DEFAULT)
|
|
101
|
+
.template_param(new_parameter(goal_guid, key: 'goal_guid')
|
|
102
|
+
.is_required(true)
|
|
103
|
+
.should_encode(true))
|
|
104
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
105
|
+
.is_required(true)
|
|
106
|
+
.should_encode(true))
|
|
107
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
108
|
+
.is_required(true))
|
|
109
|
+
.header_param(new_parameter(accept, key: 'Accept')
|
|
110
|
+
.is_required(true))
|
|
111
|
+
.auth(Single.new('basicAuth')))
|
|
112
|
+
.response(new_response_handler
|
|
113
|
+
.is_response_void(true)
|
|
114
|
+
.is_api_response(true))
|
|
115
|
+
.execute
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Read a specific goal.
|
|
119
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
120
|
+
# version.
|
|
121
|
+
# @param [String] goal_guid Required parameter: The unique identifier for a
|
|
122
|
+
# goal. Defined by MX.
|
|
123
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
124
|
+
# `user`, beginning with the prefix `USR-`.
|
|
125
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
126
|
+
def read_goal(accept_version,
|
|
127
|
+
goal_guid,
|
|
128
|
+
user_guid)
|
|
129
|
+
@api_call
|
|
130
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
131
|
+
'/users/{user_guid}/goals/{goal_guid}',
|
|
132
|
+
Server::DEFAULT)
|
|
133
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
134
|
+
.is_required(true))
|
|
135
|
+
.template_param(new_parameter(goal_guid, key: 'goal_guid')
|
|
136
|
+
.is_required(true)
|
|
137
|
+
.should_encode(true))
|
|
138
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
139
|
+
.is_required(true)
|
|
140
|
+
.should_encode(true))
|
|
141
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
142
|
+
.auth(Single.new('basicAuth')))
|
|
143
|
+
.response(new_response_handler
|
|
144
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
145
|
+
.deserialize_into(GoalResponseBody.method(:from_hash))
|
|
146
|
+
.is_api_response(true))
|
|
147
|
+
.execute
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# This endpoint updates a specific goal.
|
|
151
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
152
|
+
# version.
|
|
153
|
+
# @param [String] goal_guid Required parameter: The unique identifier for a
|
|
154
|
+
# goal. Defined by MX.
|
|
155
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
156
|
+
# `user`, beginning with the prefix `USR-`.
|
|
157
|
+
# @param [UpdateGoalRequestBody] body Required parameter: TODO: type
|
|
158
|
+
# description here
|
|
159
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
160
|
+
def update_goal(accept_version,
|
|
161
|
+
goal_guid,
|
|
162
|
+
user_guid,
|
|
163
|
+
body)
|
|
164
|
+
@api_call
|
|
165
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
166
|
+
'/users/{user_guid}/goals/{goal_guid}',
|
|
167
|
+
Server::DEFAULT)
|
|
168
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
169
|
+
.is_required(true))
|
|
170
|
+
.template_param(new_parameter(goal_guid, key: 'goal_guid')
|
|
171
|
+
.is_required(true)
|
|
172
|
+
.should_encode(true))
|
|
173
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
174
|
+
.is_required(true)
|
|
175
|
+
.should_encode(true))
|
|
176
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
177
|
+
.body_param(new_parameter(body)
|
|
178
|
+
.is_required(true))
|
|
179
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
180
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
181
|
+
.auth(Single.new('basicAuth')))
|
|
182
|
+
.response(new_response_handler
|
|
183
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
184
|
+
.deserialize_into(GoalResponseBody.method(:from_hash))
|
|
185
|
+
.is_api_response(true))
|
|
186
|
+
.execute
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# This endpoint repositions goal priority levels. If one goal is set to a
|
|
190
|
+
# lower priority, then any other goals need to be adjusted accordingly.
|
|
191
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
192
|
+
# version.
|
|
193
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
194
|
+
# `user`, beginning with the prefix `USR-`.
|
|
195
|
+
# @param [RepositionRequestBody] body Required parameter: TODO: type
|
|
196
|
+
# description here
|
|
197
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
198
|
+
def reposition_goals(accept_version,
|
|
199
|
+
user_guid,
|
|
200
|
+
body)
|
|
201
|
+
@api_call
|
|
202
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
203
|
+
'/users/{user_guid}/goals/reposition',
|
|
204
|
+
Server::DEFAULT)
|
|
205
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
206
|
+
.is_required(true))
|
|
207
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
208
|
+
.is_required(true)
|
|
209
|
+
.should_encode(true))
|
|
210
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
211
|
+
.body_param(new_parameter(body)
|
|
212
|
+
.is_required(true))
|
|
213
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
214
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
215
|
+
.auth(Single.new('basicAuth')))
|
|
216
|
+
.response(new_response_handler
|
|
217
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
218
|
+
.deserialize_into(RepositionResponseBody.method(:from_hash))
|
|
219
|
+
.is_api_response(true))
|
|
220
|
+
.execute
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|