Class: CustomGateway::Base
- Inherits:
-
Object
- Object
- CustomGateway::Base
- Defined in:
- lib/custom_gateway/services/base.rb
Direct Known Subclasses
Constant Summary collapse
- API_INTERNAL_LOGIN =
"/apis/internal/login"- API_INTERNAL_GRAPHQL =
"/apis/internal/graphql"
Instance Attribute Summary collapse
-
#g3d_cppoms ⇒ Object
Returns the value of attribute g3d_cppoms.
-
#http_client ⇒ Object
Returns the value of attribute http_client.
Instance Method Summary collapse
-
#initialize ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 16 17 18 |
# File 'lib/custom_gateway/services/base.rb', line 10 def initialize self.http_client = Faraday.new('https://cpp.custom-gateway.net/v2') do |b| b.request :json b.response :json, content_type: 'application/json' b.adapter Faraday.default_adapter end auth! end |
Instance Attribute Details
#g3d_cppoms ⇒ Object
Returns the value of attribute g3d_cppoms.
8 9 10 |
# File 'lib/custom_gateway/services/base.rb', line 8 def g3d_cppoms @g3d_cppoms end |
#http_client ⇒ Object
Returns the value of attribute http_client.
7 8 9 |
# File 'lib/custom_gateway/services/base.rb', line 7 def http_client @http_client end |