# frozen_string_literal: true require 'credit_gateway/base_repository' require 'credit_gateway/company' module CreditGateway class CompanyRepository < BaseRepository # Params: # document_token - Token retrieved from ScoreDataRepository#prepare def find(name, number) result = post('/companies', params: { name: name, number: number }) Company.build(json: result.body) end end end