module BeGateway
  class Checkout
    include Connection

    def get_token(params)
      send_request('post', '/ctp/api/checkouts', checkout: params.merge('version' => '2.1'))
    end

    def query(token)
      send_request('get', "/ctp/api/checkouts/#{token}")
    end
  end
end

module BeGateway
  class Checkout
    include Connection

    def get_token(params)
      params['version'] ||= '2.1'
      send_request('post', '/ctp/api/checkouts', checkout: params)
    end

    def query(token)
      send_request('get', "/ctp/api/checkouts/#{token}")
    end
  end
end

Add version acceptance with 2.1 by default
Add version acceptance with 2.1 by default
