=begin #Subskribe API #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.41 =end require 'uri' module SubskribeDevClient class CustomizationApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Compile and Verify a order creation customization for correctness # if this endpoint returns OK it means the plan order customization zeppa script has successfully compiled # @param order_id order id against which the compilation should happen # @param body the zeppa script that needs to be compiled # @param [Hash] opts the optional parameters # @option opts [String] :user_id order id against which the compilation should happen # @return [nil] def compile_order_creation_customization_zeppa_script(order_id, body, opts = {}) compile_order_creation_customization_zeppa_script_with_http_info(order_id, body, opts) nil end # Compile and Verify a order creation customization for correctness # if this endpoint returns OK it means the plan order customization zeppa script has successfully compiled # @param order_id order id against which the compilation should happen # @param body the zeppa script that needs to be compiled # @param [Hash] opts the optional parameters # @option opts [String] :user_id order id against which the compilation should happen # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def compile_order_creation_customization_zeppa_script_with_http_info(order_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomizationApi.compile_order_creation_customization_zeppa_script ...' end # verify the required parameter 'order_id' is set if @api_client.config.client_side_validation && order_id.nil? fail ArgumentError, "Missing the required parameter 'order_id' when calling CustomizationApi.compile_order_creation_customization_zeppa_script" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CustomizationApi.compile_order_creation_customization_zeppa_script" end # resource path local_var_path = '/beta/customization/orderCreationCustomization/compile' # query parameters query_params = {} query_params[:'orderId'] = order_id query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomizationApi#compile_order_creation_customization_zeppa_script\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Compile and Verify a plan selection customization for correctness # if this endpoint returns OK it means the plan selection customization zeppa script has successfully compiled # @param account_id account id against which the compilation should happen # @param body the zeppa script that needs to be compiled # @param [Hash] opts the optional parameters # @return [nil] def compile_plan_selection_customization_zeppa_script(account_id, body, opts = {}) compile_plan_selection_customization_zeppa_script_with_http_info(account_id, body, opts) nil end # Compile and Verify a plan selection customization for correctness # if this endpoint returns OK it means the plan selection customization zeppa script has successfully compiled # @param account_id account id against which the compilation should happen # @param body the zeppa script that needs to be compiled # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def compile_plan_selection_customization_zeppa_script_with_http_info(account_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomizationApi.compile_plan_selection_customization_zeppa_script ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling CustomizationApi.compile_plan_selection_customization_zeppa_script" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CustomizationApi.compile_plan_selection_customization_zeppa_script" end # resource path local_var_path = '/beta/customization/planSelectionCustomization/compile' # query parameters query_params = {} query_params[:'accountId'] = account_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomizationApi#compile_plan_selection_customization_zeppa_script\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Test a order creation customization zeppa script # runs the provided zeppa script and returns a list of Rule actions that were applicable after zeppa script ran # @param order_id order id against which the test needs to happen # @param body the zeppa script that needs to be tested # @param [Hash] opts the optional parameters # @option opts [String] :user_id the user id against which this test needs to happen, the user should be part of the tenancy # @return [nil] def test_order_creation_customization_zeppa_script(order_id, body, opts = {}) test_order_creation_customization_zeppa_script_with_http_info(order_id, body, opts) nil end # Test a order creation customization zeppa script # runs the provided zeppa script and returns a list of Rule actions that were applicable after zeppa script ran # @param order_id order id against which the test needs to happen # @param body the zeppa script that needs to be tested # @param [Hash] opts the optional parameters # @option opts [String] :user_id the user id against which this test needs to happen, the user should be part of the tenancy # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def test_order_creation_customization_zeppa_script_with_http_info(order_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomizationApi.test_order_creation_customization_zeppa_script ...' end # verify the required parameter 'order_id' is set if @api_client.config.client_side_validation && order_id.nil? fail ArgumentError, "Missing the required parameter 'order_id' when calling CustomizationApi.test_order_creation_customization_zeppa_script" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CustomizationApi.test_order_creation_customization_zeppa_script" end # resource path local_var_path = '/beta/customization/orderCreationCustomization/test' # query parameters query_params = {} query_params[:'orderId'] = order_id query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomizationApi#test_order_creation_customization_zeppa_script\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Test a plan selection customization zeppa script # runs the provided zeppa script and returns a list of Rule actions that were applicable after zeppa script ran # @param account_id account id against which the test needs to happen # @param body the zeppa script that needs to be tested # @param [Hash] opts the optional parameters # @return [nil] def test_plan_selection_customization_zeppa_script(account_id, body, opts = {}) test_plan_selection_customization_zeppa_script_with_http_info(account_id, body, opts) nil end # Test a plan selection customization zeppa script # runs the provided zeppa script and returns a list of Rule actions that were applicable after zeppa script ran # @param account_id account id against which the test needs to happen # @param body the zeppa script that needs to be tested # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def test_plan_selection_customization_zeppa_script_with_http_info(account_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CustomizationApi.test_plan_selection_customization_zeppa_script ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling CustomizationApi.test_plan_selection_customization_zeppa_script" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CustomizationApi.test_plan_selection_customization_zeppa_script" end # resource path local_var_path = '/beta/customization/planSelectionCustomization/test' # query parameters query_params = {} query_params[:'accountId'] = account_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CustomizationApi#test_plan_selection_customization_zeppa_script\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end