Class: OmniAuth::Strategies::Shipbob
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Shipbob
- Defined in:
- lib/omniauth/strategies/shipbob.rb
Instance Method Summary collapse
Instance Method Details
#get_channel_id(token) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/omniauth/strategies/shipbob.rb', line 26 def get_channel_id(token) log :info, 'Calling API to get Channel Id.' response = token.get('https://api.shipbob.com/1.0/channel', :headers => { 'Content-Type' => 'application/json' }) JSON.parse(response.body).dig(0, "id") rescue => e nil end |