lib/billfixers/partner/client.rb in billfixers-partner-1.1.7 vs lib/billfixers/partner/client.rb in billfixers-partner-1.2.0
- old
+ new
@@ -4,17 +4,16 @@
require 'graphlient'
module Billfixers
module Partner
class Client
- def initialize(email:, token:, test_mode: false)
- endpoint = test_mode ? 'https://billfixers-staging.herokuapp.com/partner/graphql' : 'https://billfixers.herokuapp.com/partner/graphql'
+ def initialize(api_key:, test_mode: false)
+ endpoint = test_mode ? 'https://billfixers-partner-sandbox.herokuapp.com/partner/graphql' : 'https://billfixers.herokuapp.com/partner/graphql'
@gql = Graphlient::Client.new(endpoint,
schema_path: File.join(File.dirname(__FILE__), '../../../partner_schema.json'),
headers: {
- "X-PartnerUser-Email": email,
- "X-PartnerUser-Token": token
+ "X-Partner-ApiKey": api_key
})
end
def list_providers
response = @gql.query(LIST_PROVIDERS_QUERY)