Module: Eship

Defined in:
lib/eship.rb,
lib/eship/version.rb,
lib/eship/endpoints.rb,
lib/eship/quotation.rb,
lib/eship/api_client.rb

Defined Under Namespace

Modules: ApiClient, Endpoints

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.base_uriObject



17
18
19
# File 'lib/eship.rb', line 17

def self.base_uri
  @base_uri
end

.base_uri=(base_uri) ⇒ Object



21
22
23
# File 'lib/eship.rb', line 21

def self.base_uri=(base_uri)
  @base_uri = base_uri
end

.config {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Eship)

    the object that the method was called on



9
10
11
# File 'lib/eship.rb', line 9

def self.config
  yield self
end

.eship_keyObject



25
26
27
# File 'lib/eship.rb', line 25

def self.eship_key
  @eship_key
end

.eship_key=(eship_key) ⇒ Object



29
30
31
# File 'lib/eship.rb', line 29

def self.eship_key=(eship_key)
  @eship_key = eship_key
end

.post_quotation(payload) ⇒ Object



4
5
6
7
8
9
# File 'lib/eship/quotation.rb', line 4

def self.post_quotation(payload)
  response = ApiClient.post(
    path: Endpoints::POST_QUOTATION,
    body: payload
  )
end

.versionObject



13
14
15
# File 'lib/eship.rb', line 13

def self.version
  @version
end