killbill/killbill-client-ruby

View on GitHub

Showing 146 of 200 total issues

Method stop_plugin has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

        def stop_plugin(plugin_key, plugin_version=nil, plugin_props=[], local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=15, sleep_sec=1)
Severity: Major
Found in lib/killbill_client/models/nodes_info.rb - About 1 hr to fix

    Method uninstall_plugin has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            def uninstall_plugin(plugin_key, plugin_version=nil, plugin_props=[], local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=15, sleep_sec=1)
    Severity: Major
    Found in lib/killbill_client/models/nodes_info.rb - About 1 hr to fix

      Method set_blocking_state has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            def set_blocking_state(state_name, service, is_block_change, is_block_entitlement, is_block_billing, requested_date = nil, user = nil, reason = nil, comment = nil, options = {})
      Severity: Major
      Found in lib/killbill_client/models/bundle.rb - About 1 hr to fix

        Method increment_kb_clock has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

                def increment_kb_clock(days, weeks, months, years, time_zone, options)
                  params = {}
                  params[:days] = days unless days.nil?
                  params[:weeks] = weeks unless weeks.nil?
                  params[:months] = months unless months.nil?
        Severity: Minor
        Found in lib/killbill_client/models/admin.rb - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method get_queues_entries has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                def get_queues_entries(account_id, queue_name = '', service_name = '', with_history = true, min_date = '', max_date = '', with_in_processing = true, with_bus_events = true, with_notifications = true, options = {})
        Severity: Major
        Found in lib/killbill_client/models/admin.rb - About 1 hr to fix

          Method set_blocking_state has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                def set_blocking_state(state_name, service, is_block_change, is_block_entitlement, is_block_billing, requested_date = nil, user = nil, reason = nil, comment = nil, options = {})
          Severity: Major
          Found in lib/killbill_client/models/account.rb - About 1 hr to fix

            Method has_custom_fields has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                    def has_custom_fields(url_prefix, id_alias)
                      define_method('custom_fields') do |*args|
            
                        audit = args[0] || 'NONE'
                        options = args[1] || {}
            Severity: Minor
            Found in lib/killbill_client/models/helpers/custom_field_helper.rb - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Method start_plugin has 10 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    def start_plugin(plugin_key, plugin_version=nil, plugin_props=[], local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=15, sleep_sec=1)
            Severity: Major
            Found in lib/killbill_client/models/nodes_info.rb - About 1 hr to fix

              Method set_blocking_state has 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    def set_blocking_state(state_name, service, is_block_change, is_block_entitlement, is_block_billing, requested_date = nil, user = nil, reason = nil, comment = nil, options = {})
              Severity: Major
              Found in lib/killbill_client/models/subscription.rb - About 1 hr to fix

                Method change_plan has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      def change_plan(input, user = nil, reason = nil, comment = nil,
                                      requested_date = nil, billing_policy = nil, target_phase_type = nil, call_completion = false, options = {})
                Severity: Major
                Found in lib/killbill_client/models/subscription.rb - About 1 hr to fix

                  Method upload_tenant_key_value has 9 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          def upload_tenant_key_value(key_name, key_value, key_path, get_method, error_id_str, user = nil, reason = nil, comment = nil, options = {})
                  Severity: Major
                  Found in lib/killbill_client/models/tenant.rb - About 1 hr to fix

                    Method instantiate_record_from_json has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            def instantiate_record_from_json(resource_class, data)
                              record = resource_class.send :new
                    
                              kb_ancestors = resource_class.ancestors.select { |ancestor| !@@attribute_names[ancestor.name].nil? }
                              data.each do |name, value|
                    Severity: Minor
                    Found in lib/killbill_client/models/resource.rb - About 1 hr to fix

                      Method encode_params has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                              def encode_params(options = {})
                                # Plugin properties and controlPluginNames are passed in the options but we want to send them as query parameters,
                                # so remove with from global hash and insert them under :params
                                plugin_properties = options.delete :pluginProperty
                                if plugin_properties && plugin_properties.size > 0
                      Severity: Minor
                      Found in lib/killbill_client/api/net_http_adapter.rb - About 1 hr to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Method combo_payment has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            def combo_payment(user, reason, comment, options, refresh_options = nil)
                              follow_location = true
                              follow_location = options.delete(:follow_location) if options.has_key?(:follow_location)
                              begin
                                created_transaction = self.class.post "#{Payment::KILLBILL_API_PAYMENTS_PREFIX}/combo",
                      Severity: Minor
                      Found in lib/killbill_client/models/combo_transaction.rb - About 1 hr to fix

                        Method create_bulk_subscriptions has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                def create_bulk_subscriptions(bulk_subscription_list, user = nil, reason = nil, comment = nil, entitlement_date = nil, billing_date = nil, call_completion_sec = nil, options = {})
                        Severity: Major
                        Found in lib/killbill_client/models/bulk_subscription.rb - About 1 hr to fix

                          Method trigger_invoice_dry_run has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  def trigger_invoice_dry_run(account_id, target_date, upcoming_invoice_target_date, plugin_property = [], user = nil, reason = nil, comment = nil, options = {})
                          Severity: Major
                          Found in lib/killbill_client/models/invoice.rb - About 1 hr to fix

                            Method chargeback has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    def chargeback(payment_id, amount, currency, effective_date = nil, user = nil, reason = nil, comment = nil, options = {})
                            Severity: Major
                            Found in lib/killbill_client/models/invoice_payment.rb - About 1 hr to fix

                              Method create_subscription_dry_run has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      def create_subscription_dry_run(account_id, bundle_id, target_date, product_name, product_category,
                                                                      billing_period, price_list_name,  options = {})
                              Severity: Major
                              Found in lib/killbill_client/models/invoice.rb - About 1 hr to fix

                                Method cancel has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                      def cancel(user = nil, reason = nil, comment = nil, requested_date = nil, entitlementPolicy = nil, billing_policy = nil, use_requested_date_for_billing = nil, options = {})
                                Severity: Major
                                Found in lib/killbill_client/models/subscription.rb - About 1 hr to fix

                                  Method fix_transaction_state has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          def fix_transaction_state(payment_id, transaction_id, transaction_status, payment_state_param = {}, user = nil, reason = nil, comment = nil, options = {})
                                  Severity: Major
                                  Found in lib/killbill_client/models/admin.rb - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language