Class: Layer::BaseClient
  
  
  
  
  
    - Inherits:
 
    - 
      Object
      
        
        show all
      
    
 
  
  
  
  
  
  
  
  
  
  
    - Defined in:
 
    - lib/layer/base_client.rb
 
  
  
 
  
    
      Constant Summary
      collapse
    
    
      
        - DEFAULT_HOST =
          
        
 
        "https://api.layer.com"
 
      
    
  
  
    
      Instance Method Summary
      collapse
    
    
  
  
    Instance Method Details
    
      
  
  
    #base_url  ⇒ Object 
  
  
  
  
    
      
20
21
22 
     | 
    
      # File 'lib/layer/base_client.rb', line 20
def base_url
  DEFAULT_HOST
end 
     | 
  
 
    
      
  
  
    #client  ⇒ Object 
  
  
  
  
    
      
5
6
7 
     | 
    
      # File 'lib/layer/base_client.rb', line 5
def client
  @http_client ||= Layer::HttpClient.new(base_url, )
end 
     | 
  
 
    
      
  
  
    
      
13
14
15
16
17
18 
     | 
    
      # File 'lib/layer/base_client.rb', line 13
def 
  {
    'Accept' => 'application/vnd.layer+json; version=1.0',
    'Content-Type' => 'application/json'
  }
end
     | 
  
 
    
      
  
  
    #strip_layer_prefix(string)  ⇒ Object 
  
  
  
  
    
      
9
10
11 
     | 
    
      # File 'lib/layer/base_client.rb', line 9
def strip_layer_prefix(string)
  string.split("/").last if string
end
     |