Sha256: c06a7ff8544109a32c4e014f25af7bb45aa6961a2b7620f8a5ea66d011d30c26

Contents?: true

Size: 581 Bytes

Versions: 5

Compression:

Stored size: 581 Bytes

Contents

module SecondAmendmentWholesale
  class Shipping < Base

    include SecondAmendmentWholesale::API

    def initialize(options = {})
      requires!(options, :token)

      @options = options
      @headers = [ 
        *auth_header(@options[:token]),
        *content_type_header('application/json'),
      ].to_h
    end

    def fetch(since_date = nil)
      since_date = (since_date || Time.now.prev_day).strftime('%Y/%m/%d')
      endpoint = "shipmentsInformation/me?fromShipmentCreateAt=#{since_date}"
      
      orders = get_request(endpoint, @headers)
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
second_amendment_wholesale-1.0.5 lib/second_amendment_wholesale/shipping.rb
second_amendment_wholesale-1.0.3 lib/second_amendment_wholesale/shipping.rb
second_amendment_wholesale-1.0.2 lib/second_amendment_wholesale/shipping.rb
second_amendment_wholesale-1.0.1 lib/second_amendment_wholesale/shipping.rb
second_amendment_wholesale-1.0.0 lib/second_amendment_wholesale/shipping.rb