Sha256: ce4cb5b67105e588a800a20901b57a540c65898632e0c3e04d49ddcfd9197e73

Contents?: true

Size: 1.46 KB

Versions: 10

Compression:

Stored size: 1.46 KB

Contents

module GoTransverseTractApi

  module Product

    class DiscountIdentifier

      class << self

        #
        # @param {Hash} options
        #
        def find_all options={}
          params ||= GoTransverseTractApi::ApiData.new.get_query_params({}, options)
          GoTransverseTractApi.get_response_for(self, params)
        end

        #
        # @param {Long} eid
        # @param {Hash} options
        #
        def find_by_eid eid, options={}
          return nil unless eid.present?

          params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
          GoTransverseTractApi.get_response_for(self, params)
        end

        #
        # @param {Long} identifier
        # @param {Hash} options
        #
        def find_by_identifier identifier, options={}
          return nil unless identifier.present?

          params ||= GoTransverseTractApi::ApiData.new.get_query_params({identifier: identifier}, options)
          GoTransverseTractApi.get_response_for(self, params)
        end

        #
        # @param {Long} order_item_eid
        # @param {Hash} options
        #
        def find_by_order_item_order_item_eid order_item_order_item_eid, options={}
          return nil unless order_item_eid.present?

          params ||= GoTransverseTractApi::ApiData.new.get_query_params({order_item_eid: order_item_eid}, options)
          GoTransverseTractApi.get_response_for(self, params)
        end

      end

    end

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gotransverse-tract-api-0.12.0 lib/gotransverse-tract-api/product/discount_identifier.rb
gotransverse-tract-api-0.11.2 lib/gotransverse-tract-api/product/discount_identifier.rb
gotransverse-tract-api-0.11.1 lib/gotransverse-tract-api/product/discount_identifier.rb
gotransverse-tract-api-0.11.0 lib/gotransverse-tract-api/product/discount_identifier.rb
gotransverse-tract-api-0.10.0 lib/gotransverse-tract-api/product/discount_identifier.rb
gotransverse-tract-api-0.9.2 lib/gotransverse-tract-api/product/discount_identifier.rb
gotransverse-tract-api-0.9.1 lib/gotransverse-tract-api/product/discount_identifier.rb
gotransverse-tract-api-0.9.0 lib/gotransverse-tract-api/product/discount_identifier.rb
gotransverse-tract-api-0.8.1 lib/gotransverse-tract-api/product/discount_identifier.rb
gotransverse-tract-api-0.8.0 lib/gotransverse-tract-api/product/discount_identifier.rb