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,163 @@
|
|
|
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
|
+
# TransactionRulesApi
|
|
8
|
+
class TransactionRulesApi < BaseApi
|
|
9
|
+
# Use this endpoint to read the attributes of all existing transaction rules
|
|
10
|
+
# belonging to the user.
|
|
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 [Integer] page Optional parameter: Results are paginated. Specify
|
|
16
|
+
# current page.
|
|
17
|
+
# @param [Integer] records_per_page Optional parameter: This specifies the
|
|
18
|
+
# number of records to be returned on each page. Defaults to `25`. The valid
|
|
19
|
+
# range is from `10` to `1000`. If the value exceeds `1000`, the default
|
|
20
|
+
# value of `25` will be used instead.
|
|
21
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
22
|
+
def list_transaction_rules(accept_version,
|
|
23
|
+
user_guid,
|
|
24
|
+
page: nil,
|
|
25
|
+
records_per_page: nil)
|
|
26
|
+
@api_call
|
|
27
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
28
|
+
'/users/{user_guid}/transaction_rules',
|
|
29
|
+
Server::DEFAULT)
|
|
30
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
31
|
+
.is_required(true))
|
|
32
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
33
|
+
.is_required(true)
|
|
34
|
+
.should_encode(true))
|
|
35
|
+
.query_param(new_parameter(page, key: 'page'))
|
|
36
|
+
.query_param(new_parameter(records_per_page, key: 'records_per_page'))
|
|
37
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
38
|
+
.auth(Single.new('basicAuth')))
|
|
39
|
+
.response(new_response_handler
|
|
40
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
41
|
+
.deserialize_into(TransactionRulesResponseBody.method(:from_hash))
|
|
42
|
+
.is_api_response(true))
|
|
43
|
+
.execute
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Use this endpoint to create a new transaction rule. The newly-created
|
|
47
|
+
# `transaction_rule` object will be returned if successful.
|
|
48
|
+
# For more information about transaction rules, see the [Transaction Rules
|
|
49
|
+
# Guide](/products/experience/pfm/integration-guides/personalization/transac
|
|
50
|
+
# tion-rules).
|
|
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 [TransactionRuleCreateRequestBody] body Required parameter:
|
|
56
|
+
# TransactionRule object to be created with optional parameters
|
|
57
|
+
# (description) and required parameters (category_guid and
|
|
58
|
+
# match_description)
|
|
59
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
60
|
+
def create_transaction_rule(accept_version,
|
|
61
|
+
user_guid,
|
|
62
|
+
body)
|
|
63
|
+
@api_call
|
|
64
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
65
|
+
'/users/{user_guid}/transaction_rules',
|
|
66
|
+
Server::DEFAULT)
|
|
67
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
68
|
+
.is_required(true))
|
|
69
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
70
|
+
.is_required(true)
|
|
71
|
+
.should_encode(true))
|
|
72
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
73
|
+
.body_param(new_parameter(body)
|
|
74
|
+
.is_required(true))
|
|
75
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
76
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
77
|
+
.auth(Single.new('basicAuth')))
|
|
78
|
+
.response(new_response_handler
|
|
79
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
80
|
+
.deserialize_into(TransactionRuleResponseBody.method(:from_hash))
|
|
81
|
+
.is_api_response(true))
|
|
82
|
+
.execute
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Use this endpoint to read the attributes of an existing transaction rule
|
|
86
|
+
# based on the rule’s unique GUID.
|
|
87
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
88
|
+
# version.
|
|
89
|
+
# @param [String] transaction_rule_guid Required parameter: The unique id
|
|
90
|
+
# for a `transaction_rule`.
|
|
91
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
92
|
+
# `user`, beginning with the prefix `USR-`.
|
|
93
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
94
|
+
def read_transaction_rule(accept_version,
|
|
95
|
+
transaction_rule_guid,
|
|
96
|
+
user_guid)
|
|
97
|
+
@api_call
|
|
98
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
99
|
+
'/users/{user_guid}/transaction_rules/{transaction_rule_guid}',
|
|
100
|
+
Server::DEFAULT)
|
|
101
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
102
|
+
.is_required(true))
|
|
103
|
+
.template_param(new_parameter(transaction_rule_guid, key: 'transaction_rule_guid')
|
|
104
|
+
.is_required(true)
|
|
105
|
+
.should_encode(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(TransactionRuleResponseBody.method(:from_hash))
|
|
114
|
+
.is_api_response(true))
|
|
115
|
+
.execute
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Use this endpoint to update the attributes of a specific transaction rule
|
|
119
|
+
# based on its unique GUID. The API will respond with the updated
|
|
120
|
+
# transaction_rule object. Any attributes not provided will be left
|
|
121
|
+
# unchanged.
|
|
122
|
+
# For more information about transaction rules, see the [Transaction Rules
|
|
123
|
+
# Guide](/products/experience/pfm/integration-guides/personalization/transac
|
|
124
|
+
# tion-rules).
|
|
125
|
+
# @param [String] accept_version Required parameter: MX Platform API
|
|
126
|
+
# version.
|
|
127
|
+
# @param [String] transaction_rule_guid Required parameter: The unique id
|
|
128
|
+
# for a `transaction_rule`.
|
|
129
|
+
# @param [String] user_guid Required parameter: The unique identifier for a
|
|
130
|
+
# `user`, beginning with the prefix `USR-`.
|
|
131
|
+
# @param [TransactionRuleUpdateRequestBody] body Required parameter:
|
|
132
|
+
# TransactionRule object to be updated
|
|
133
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
134
|
+
def update_transaction_rule(accept_version,
|
|
135
|
+
transaction_rule_guid,
|
|
136
|
+
user_guid,
|
|
137
|
+
body)
|
|
138
|
+
@api_call
|
|
139
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
140
|
+
'/users/{user_guid}/transaction_rules/{transaction_rule_guid}',
|
|
141
|
+
Server::DEFAULT)
|
|
142
|
+
.header_param(new_parameter(accept_version, key: 'Accept-Version')
|
|
143
|
+
.is_required(true))
|
|
144
|
+
.template_param(new_parameter(transaction_rule_guid, key: 'transaction_rule_guid')
|
|
145
|
+
.is_required(true)
|
|
146
|
+
.should_encode(true))
|
|
147
|
+
.template_param(new_parameter(user_guid, key: 'user_guid')
|
|
148
|
+
.is_required(true)
|
|
149
|
+
.should_encode(true))
|
|
150
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
151
|
+
.body_param(new_parameter(body)
|
|
152
|
+
.is_required(true))
|
|
153
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
154
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
155
|
+
.auth(Single.new('basicAuth')))
|
|
156
|
+
.response(new_response_handler
|
|
157
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
158
|
+
.deserialize_into(TransactionRuleResponseBody.method(:from_hash))
|
|
159
|
+
.is_api_response(true))
|
|
160
|
+
.execute
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
end
|