Sha256: 886a95f15321b3d9a8614aacea2255d0f3e6e056aad41e8f64a358246b509fad

Contents?: true

Size: 743 Bytes

Versions: 1

Compression:

Stored size: 743 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(identifier, args)
        @identifier = identifier
        @model_type = args.delete(:model_type)
        @card_id    = args.delete(:card_id)
        @args       = args
      end

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sourcescrub-0.1.3 lib/sourcescrub/apis/companies.rb