class GmxCheckout::API
Public Class Methods
build_notification(params)
click to toggle source
# File lib/gmxcheckout/api.rb, line 7 def self.build_notification(params) Models::Notification.new params end
new(api_key = nil)
click to toggle source
# File lib/gmxcheckout/api.rb, line 11 def initialize(api_key = nil) @api_key = api_key @connection = Faraday.new url: 'https://www.gmxcheckout.com.br' do |conn| conn.use JsonMiddleware conn.request :url_encoded conn.adapter :net_http end end
Public Instance Methods
api_key()
click to toggle source
# File lib/gmxcheckout/api.rb, line 24 def api_key @api_key || GmxCheckout.api_key end
Also aliased as: key
subscriptions()
click to toggle source
# File lib/gmxcheckout/api.rb, line 20 def subscriptions @subscriptions ||= Subscriptions.new(self) end