Sha256: 83afb8f66cf2c6d12620077f41d4b91b0996cb2510994c006fca3841df19ed31

Contents?: true

Size: 731 Bytes

Versions: 5

Compression:

Stored size: 731 Bytes

Contents

# frozen_string_literal: true

require_relative './../utils/ss_model'

# Root Sourcescrub
module Sourcescrub
  # Apis
  module Apis
    # Companies endpoint
    class Companies
      include ::Sourcescrub::Utils::SsModel

      attr_accessor :args

      def initialize(domain, args)
        @domain     = domain
        @model_type = args.delete(:model_type)
        @card_id    = args.delete(:card_id)
        @args       = args
      end

      def request_url
        [
          Models::Company::ENDPOINT,
          @domain,
          @card_id
        ].compact.join('/')
      end

      def search_url
        [
          'search',
          Models::Company::ENDPOINT
        ].compact.join('/')
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sourcescrub-0.1.2 lib/sourcescrub/apis/companies.rb
sourcescrub-0.1.1 lib/sourcescrub/apis/companies.rb
sourcescrub-0.1.0 lib/sourcescrub/apis/companies.rb
sourcescrub-0.0.9 lib/sourcescrub/apis/companies.rb
sourcescrub-0.0.8 lib/sourcescrub/apis/companies.rb